MATLAB European Call antithetic Flashcards Preview

Derivate > MATLAB European Call antithetic > Flashcards

Flashcards in MATLAB European Call antithetic Deck (9)
Loading flashcards...
1
Q

Generate M samples from N(0,1)

A

X = randn(M,1)

2
Q

Simulate first set of M trajectories in one step that are negatively correlated

A

ST_plus = S0exp((r-0.5sigma^2)T+sigmasqrt(T)*X)

3
Q

Simulate second set of M trajectories in one step that are negatively correlated

A

ST_minus = S0exp((r-0.5sigma^2)T-sigmasqrt(T)*X)

4
Q

Define payoff from the first set

A

payoff_plus = max(ST_plus-K,0)

5
Q

Define payoff from the second set

A

payoff_minus = max(ST_minus-K,0)

6
Q

Define average payoff for each trajectory

A

payoff = 0.5*(payoff_plus+payoff_minus)

7
Q

Discount Factor

A

discountFactor = exp(-r*T)

8
Q

MC price

A

price_MC = discountFactor*mean(payoff)

9
Q

Standard deviation of MC estimate

A

stdev_MC = discountFactor*std(payoff)/sqrt(M)