Serving the Quantitative Finance Community

 
User avatar
vietdung
Posts: 0
Joined: February 12th, 2007, 2:40 pm

Basket Option and Monte Carlo

February 14th, 2007, 3:54 pm

QuoteOriginally posted by: outrunVietdung,You do take the cholesky out of the time loop right? Yes, the decomposition is out of the loop, I calculate it only one time before the simulationQuoteAnd why do you do a time loop? Baskets aren't time depended.. You can do a single time step to expiration, that should bring the simulation time down to 1.5 minutes...or is there some reason for time stepping? Are you using a stochastic volatility or American baskets?Yes the reason is we want to calculate also the American, stochastic rate and the Greeks. The cost of time is saved by our distributed architeture, 9h is the time on a single processor, with 200 processors it is lower than 1 mins. The question here is I want to have some simulated results of basket option's price for referenceThanks alots
 
User avatar
Antonio
Posts: 8
Joined: June 30th, 2004, 3:13 pm
Location: Imperial College London
Contact:

Basket Option and Monte Carlo

February 15th, 2007, 8:33 am

If I may, if you do it on real data (or maybe even on simulated data), make sure the matrix is positive semi-definite, or you would have some surprise.
 
User avatar
vietdung
Posts: 0
Joined: February 12th, 2007, 2:40 pm

Basket Option and Monte Carlo

February 15th, 2007, 3:06 pm

QuoteOriginally posted by: outrunHere is a paper by Deelstra (there are more at that site) on tight bounds on priceshttp://users.ugent.be/~mvmaele/Publicaties/AsianBasket_ICCAM2006.pdfThank you for your web
 
User avatar
fman
Posts: 0
Joined: March 21st, 2007, 7:55 am

Basket Option and Monte Carlo

March 21st, 2007, 11:20 am

vietdungi tried to price asian basket option(a assets, d ovservation times) by using quasi-monte carlo, in c++.but i do not know how to caculate the price of different asset in different time periodcould you please send me your program wher i can find and learn the pricing algorithmthank you very much your help you can send me the codemy email address: dqchan@gmail.comQuoteOriginally posted by: vietdungIn java we have a very useful package for manipulate the matrix, named : JAMA (includes Cholesky , LU ... decomposition).My case particular , I tried a basket of 40 assets and around 1000000 simulations 360 time steps , it costs 9h of simulation Anyone has a good ref results for the basket option ?
 
User avatar
vietdung
Posts: 0
Joined: February 12th, 2007, 2:40 pm

Basket Option and Monte Carlo

March 21st, 2007, 1:26 pm

Yes, it's exact what I did and at the end I do a average of SQuoteOriginally posted by: outrunYou need lots of stuff in C++This is how you simulate a single asset starting at S_0 an moving to a random value at S_t. You can repeat this multiple times to simulate a path in time of that asset.S_t = S_0*exp( (r-0.5*v*v)*t + v*sqr(t)*N );withN a standard normal distributed random variable (see box muller method for generating normal distributed random values)v annualized volatilityt timestepr interest rate, (continuous compounded)If you want to simulate multiple assets, you exactly the same thing for each asset, but you have to make sure that "N" values are correlated. E.g. for two assets:S1_t = S1_0*exp( (r-0.5*v*v)*t + v1*sqr(t)*N1 );S2_t = S2_0*exp( (r-0.5*v*v)*t + v2*sqr(t)*N2 );...The correlated standard normal random numbers N1,N2,.. can be generated using the following steps:1) do a Choleski decomposition of the correlation matrix, this will give you a lower (or upper) triangular matrix2) multiply this lower triangular matrix with a vector on UNcorrelated standard normal random numbers to get a vector of correlated random numbers
 
User avatar
fman
Posts: 0
Joined: March 21st, 2007, 7:55 am

Basket Option and Monte Carlo

March 27th, 2007, 1:04 am

Thank you very much for your helpI have finished the simulation in C++, but I don't know whether the result from my simulation is correct.My one case: I tried 10 underlying assets, 1 observation time, initial prices of all assets is 100, volatility of all assets is 0.3, correlation among assets is 0, the free-risk interest is 0.05, strike price is 100, time to maturity is 1. The result is 4.39775The vector on uncorrelated standard normal random numbers is generated by Sobol sequence. Is it Ok?Now I want to caculate the relative standard deviation, thus I can improve my program. Could you tell me how to do it?QuoteOriginally posted by: outrunYou need lots of stuff in C++This is how you simulate a single asset starting at S_0 an moving to a random value at S_t. You can repeat this multiple times to simulate a path in time of that asset.S_t = S_0*exp( (r-0.5*v*v)*t + v*sqr(t)*N );withN a standard normal distributed random variable (see box muller method for generating normal distributed random values)v annualized volatilityt timestepr interest rate, (continuous compounded)If you want to simulate multiple assets, you exactly the same thing for each asset, but you have to make sure that "N" values are correlated. E.g. for two assets:S1_t = S1_0*exp( (r-0.5*v*v)*t + v1*sqr(t)*N1 );S2_t = S2_0*exp( (r-0.5*v*v)*t + v2*sqr(t)*N2 );...The correlated standard normal random numbers N1,N2,.. can be generated using the following steps:1) do a Choleski decomposition of the correlation matrix, this will give you a lower (or upper) triangular matrix2) multiply this lower triangular matrix with a vector on UNcorrelated standard normal random numbers to get a vector of correlated random numbers
 
User avatar
fman
Posts: 0
Joined: March 21st, 2007, 7:55 am

Basket Option and Monte Carlo

March 27th, 2007, 7:34 am

Yes, the interest rate is continuously compounded.Is that right?QuoteOriginally posted by: outrunI get (for a call option):a basket of stocks (yield 0.05) 6.6759514a basket of futures (yield 0.00) 3.6733617using the same Sobol sequence, 10.000 samplesHere's the first 3 10-d vectors:0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.500.75 0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.25 0.750.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75 0.75 0.25Is your interest rate continuously compounded?
 
User avatar
fman
Posts: 0
Joined: March 21st, 2007, 7:55 am

Basket Option and Monte Carlo

March 27th, 2007, 8:11 am

Thanks a lot for your adviceI just have a try. The values from my simulation is far away the value with BS.I don't know where is wrong in my program.Could you help me find the problem? Please tell me your email, I will send my code to you.Thank you in advanceQuoteOriginally posted by: outrunIts not right or wrong, just a convention. If you use exp(-r*t) type of terms you should use continuously compounded interest rates.So how come we get different values? What about testing a basket with a single underlying, that should be easily verifiable with black & scholes
 
User avatar
fman
Posts: 0
Joined: March 21st, 2007, 7:55 am

Basket Option and Monte Carlo

March 27th, 2007, 8:21 am

My code is sent to you, please check it.QuoteOriginally posted by: outrunthijs[]sitmo.com, I'll take a quick look, but I've also got a heavy deadline today so I might not be able to spot the issue...