Page 1 of 1

Monte Carlo_ Importance sampling method

Posted: February 6th, 2008, 11:34 pm
by DESTINY2008
I try to price a call option very out of money using the importance sampling method in Monte Carlo. My results are not what I was expecting but I can't find out the problem_ Here is the code in VBA:Function MCOptionValue5(S0, K, r, T, sigma, c, nsim) Dim rnmut, sum, sum1, S, F, W, W1, payoff1, payoffsqr, Z Dim var1 Dim i As Long Dim nRows As Integer nRows = Application.WorksheetFunction.CountA(Range("B:B")) Randomize rnmut = (r + c - 0.5 * sigma ^ 2) * T sum1 = 0 sum = 0 For i = 1 To nsim W = Application.NormSInv(Rnd) * Sqr(T) W1 = W - (c / sigma) * T S = S0 * Exp(rnmut + W1 * sigma) Z = Exp(0.5 * (c / sigma) ^ 2 * T + (c / sigma) * W1) F = Exp(-r * T) * Application.Max((S - K), 0) payoff1 = F / Z payoffsqr = (F / Z) ^ 2 sum = sum + payoff1 sum1 = sum1 + payoffsqr Next i MCOptionValue5 = sum / nsim var1 = sum1 / nsim - (sum / nsim) ^ 2 Cells(nRows + 14, 6) = var1 End FunctionThank you for your help

Monte Carlo_ Importance sampling method

Posted: February 8th, 2008, 8:00 pm
by jnwickremasinghe
Ummm.. well, what were you expecting, & what did you get?

Monte Carlo_ Importance sampling method

Posted: February 8th, 2008, 10:52 pm
by DESTINY2008
With the classical Monte-carlo the following exemple: sigma= 0,25; r=0; S0=100; K=150; T=1 we obtain a result of 0,672 wich is the fair price for 100000 simulations_ Using c= 0,5 I find about 0,04 and the variance in the price is very big when I change c.