Library: | finance |
See also: | MertonPut MertonCall HestonCallMC |
Quantlet: | MertonCallMC | |
Description: | calculates European call option prices in Merton model using Monte Carlo method. |
Usage: | y = MertonCallMC(S,K,T,r,lambda,sigma,delta,mu,I,M) | |
Input: | ||
S | scalar, asset price | |
K | scalar, exercise price | |
T | scalar, time to maturity | |
r | scalar, interest rate | |
lambda | scalar, expected number of jumps in time unit | |
sigma | scalar, standard deviation of jump | |
delta | scalar, standard deviation of jump | |
mu | scalar, expected value of jump | |
I | scalar, number of grid points | |
M | scalar, number of trajectories | |
Output: | ||
y | scalar, call option price |
library("finance") randomize2(100) S=100 K=100 T=1 r=0.02 lambda= 12 sigma =0.1 delta = 0.01 mu = 0.1 I = 200 M = 1000 y=MertonCallMC(S,K,T,r,lambda,sigma,delta,mu,I,M) y
Contents of y [1,] 16.211