# APRとAPYの計算

すべてのVaultにはパフォーマンスインデックスがあり、1.00から始まり、預金トークン（Put Sellingの場合はsUSD、Covered Callの場合はsETH）に対して計算され、インデックスに対して株式が発行されるようになっています。

#### Total Projected Yield (APY)

過去4週間の年率換算パフォーマンスの平均値を取得して算出。過去4週間の週次利回りの平均値（イン・ザ・マネー週は除く）

Let $$w\_1,w\_2,w\_3,w\_4$$ be the 4 weeks in chronological order.

Let final tokenPrice at end of some week as $$f\_i$$ and start price as $$s\_i$$

Define gain $$g\_i$$ for some week $$w\_i$$ as  $$\frac{(f\_i - s\_i)}{s\_i}$$

Now average yield = $$(\prod\limits\_{i} (1+g\_i))$$ - 1

and average Apy =  $$(1 + \texttt{yield})^{\texttt{NumWeeks/4}} - 1$$.

Where $$\texttt{NumWeeks} = 52.1429$$, number of weeks in year.

**This Weeks's Projected Yield (APY)**

オプションの有効期限が切れた場合、その週の年率換算の期待パフォーマンスです。

It is calculated as

Yield = $$\frac{\texttt{totalPremiumCollected}}{\texttt{totalFunds}}$$ - 1

APY = $$(1 + \texttt{yield})^{\texttt{NumWeeks}} - 1$$

**Last Week Yield (APY)**

It is annualised performance based on last week. Let tokenPrice on last to last friday be $$f\_1$$ and tokenPrice on last friday be $$f\_2$$.&#x20;

Yield = $$\frac{f\_2 - f\_1}{f\_1} - 1$$

APY = $$(1 + \texttt{yield})^{\texttt{NumWeeks}} - 1$$

#### Historic Yield (APY)

運用開始からの年率平均利回り。（運用中**の**週を含む）

<https://hackmd.io/@mubaris/Polynomial-V2-Vaults-Calculation>
