| Library: | finance |
| See also: | BlackScholesPathIndependentMDDiv BlackScholesPathIndependentMD BlackScholesPathIndependent1D BlackScholesPathDependent1D |
| Quantlet: | BlackScholesPathDependent1DQMC | |
| Description: | calculates the price for path dependent options in the Black Scholes model by applying Quasi-Monte Carlo simulation in connection with a Brownian Bridge construction. |
| Usage: | z = BlackScholesPathDependent1DQMC(s0,r,vola,timepath,payoff,iterations,gennum) | |
| Input: | ||
| s0 | scalar, price of the underlying at time 0 | |
| r | scalar, risk free interest rate 5% = 0.05 | |
| vola | scalar, volatility of the log price process | |
| timepath | T x 1 vector of time values for which the underlying values have to be generated. The first entry represents the starting time. | |
| payoff | string, name of the payoff function for the option product | |
| iterations | scalar, number of simulations | |
| gennum | scalar, number of the low discrepancy sequence used in the simulation | |
| Output: | ||
| z | scalar, estimated option price | |
library("finance")
proc(v) = Asian50Call(spath)
avg = sum(spath)/50
v =(avg > 100).*(avg-100)
endp
times =(0:49)/49
BlackScholesPathDependent1DQMC(100,0.045,0.2,times,"Asian50Call",1000000,2)
Contents of z [1,] 5.6194