|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Join Date: Feb 2008
Posts: 2
|
Help! Monte Carlo simulation_ Importance sampling
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_ It'd be grateful to have your help. 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 Function |
|
|
|
|
|
#2 |
|
Join Date: May 2007
Posts: 2,299
|
A Monte Carlo method is a technique that involves using random numbers and probability to solve problems. The term Monte Carlo Method was coined by S. Ulam and Nicholas Metropolis in reference to games of chance, a popular attraction in Monte Carlo, Monaco.
Computer simulation has to do with using computer models to imitate real life or make predictions. When you create a model with a spreadsheet like Excel, you have a certain number of input parameters and a few equations that use those inputs to give you a set of outputs (or response variables). This type of model is usually deterministic, meaning that you get the same results no matter how many times you re-calculate. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help! Monte Carlo simulation_ Importance sampling | Destiny2000 | Numerical Methods | 0 | 02-06-2008 06:08 PM |
| looking for chevy monte carlo signature series Jeff... | jg24 nascar fan | The Underground | 2 | 09-15-2007 02:48 AM |
| Monte Carlo vs Black-Scholes pros and cons | bestdev | Numerical Methods | 3 | 09-09-2007 01:46 AM |
| can you help me find a certain monte carlo? | cyclotex@sbcglobal.net | The Underground | 2 | 09-09-2007 01:14 AM |
| Monte Carlo option model | bestdev | Terms Definitions | 0 | 05-13-2007 10:52 PM |