Variance Swap Implementation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Variance Swap Implementation

animesh
I have been trying to price Variance Swap using Monte carlo simulation. After trying various codes including the one in test-suite I wasn't able to get the correct price. There is a huge different in fair price. For example fair strike of variance swap for 20% volatility generally is implied vol of 90 Strike put. Roughly this is around 30% - 33%.
Quantlib gives out 20%.
Initially I thought I was doing something wrong in my code. I then checked the various classes "McSimulation.hpp, mcvarianceswapengine.hpp". I traced down the "Strategy" pattern being used and the code

            McSimulation<SingleVariate,RNG,S>::calculate(requiredTolerance_,
                                                         requiredSamples_,
                                                         maxSamples_);

Again this uses the MonteCarlo model and the path generator to generate the random walk. Problem is it's using the variance and mean of the random walk!!!
For variance swap
1. Generate the random walk,
2. Calculate Log returns (Missing Step)
3. Calculate variance of Log returns
4. Annualize it (x 252), take square root. = Fair strike of variance swap.

I think the Variance swap replication implementation is correct, but generally I don't trust it coz of mathematical anomaly I described in my blog.
(Just read the last paragraph)

http://quantanalysis.wordpress.com/2010/08/21/variance-swaps-%E2%80%93-simple-mistakes/

-- 
Regards,
Animesh Saxena

(http://quantanalysis.wordpress.com)
Ph: (+91)9920098221

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Variance Swap Implementation

Luigi Ballabio
On Mon, 2010-08-30 at 15:11 +0530, animesh saxena wrote:
> I have been trying to price Variance Swap using Monte carlo
> simulation. After trying various codes including the one in test-suite
> I wasn't able to get the correct price. There is a huge different in
> fair price. For example fair strike of variance swap for 20%
> volatility generally is implied vol of 90 Strike put. Roughly this is
> around 30% - 33%.
> Quantlib gives out 20%.

Animesh,
        sorry I haven't had a chance to come back on this.  Did you make any
progress (or any patch) in the meantime?

Thanks,
        Luigi



--

I hate quotations.
-- Ralph Waldo Emerson



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev