# Pricing Variance Swap [closed]

I want to calculate the NPV of a Variance Swap wherein the cash flow happens every months based on the standard Variance formula of the close prices of S&P500 for prior 30 business days. We may assume the strike as K.

Is there any standard formula for pricing this? As far as I know, the standard formula for Variance swaps assume continuous price during the life time of Swap.

I prefer to use QuantLib Python library for such valuation.

Any pointer will be highly appreciated.

Your swap is essentially a few forward variance swaps grouped together and you are asking a single fair strike $$K$$ so that the payoff will be the same as the sum of the payoff of the forward variance swaps. Therefore $$K^2 = \frac{\sum_{i=1}^{n}D_iK_i^2}{\sum_{i=1}^n D_i}$$, where $$K_i$$ are the strikes of the individual forward var swaps and $$D_i$$ are the corresponding discounting factors.
• How you have come up for $K^2 = ...$. Sorry if my question appears stupid – Daniel Jul 13 at 18:30
• Suppose the realized vols of the periods of those individual forward var swaps are $v_i$, then the discounted payoff would be $\sum_{i=1}^n D_i (v_i^2 - K_i^2)$, you want this to be equal to $\sum_{i=1}^n D_i(v_i^2 - K^2)$. Here I am assuming the var units to be the same. – CABLE Jul 13 at 18:33