Serving the Quantitative Finance Community

 
User avatar
DESTINY2008
Topic Author
Posts: 0
Joined: February 6th, 2008, 5:25 pm

Monte Carlo_ Importance sampling method

February 6th, 2008, 11:34 pm

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
 
User avatar
jnwickremasinghe
Posts: 0
Joined: November 28th, 2007, 4:42 pm

Monte Carlo_ Importance sampling method

February 8th, 2008, 8:00 pm

Ummm.. well, what were you expecting, & what did you get?
 
User avatar
DESTINY2008
Topic Author
Posts: 0
Joined: February 6th, 2008, 5:25 pm

Monte Carlo_ Importance sampling method

February 8th, 2008, 10:52 pm

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.