代写 R STAD70 Assignment 5

STAD70 Assignment 5
1. Consider the arithmetic Brownian motion X  t W , where W is standard
Brownian motion.
ttt Xt 
a.
tn 1 (a.k.a. the multivariate Brownian bridge). Write the parameters of the distribution in terms
of (x,,,t1, ,tn)
1
Find the conditional distribution of  |X1 x,where 0t1 
X 
t
n

.
Xt1 t1 t1 t1 t1  
The (unconditional) joint distribution is  ~N ,2  X t t tt
 tn  n 1 n n X 1 t1 tn 1
1  Using the Normal conditional distribution formula,
Z1  μ1  Σ11 Σ12  
~N , Z |Z z~N μ Σ Σ1zμ , Σ Σ Σ1Σ
Z μΣ Σ 1 2 2 221 22
Xt1 weget
 t
12 22
n n 1 
 t1  t1(1t1) t1(1t2)  t t(1t) t(1t)
1 t1
2 t1 t1
11
12 22 21
 X
 1         t  t  t
t  t  n n
n  
  t1 t1
|X x~N  x,2
 t    1

t Xt1 

n

t1(1tn) t(1t)
X 
 t2|Xx~Nx2,21 2 2 2
2 n 
1 
X t t(1t)t(1t) t(1t) t n1n2n nn

 
n
b.
ConsiderthegeometricBrownianmotion St 50exp.03t.2Wt,fix n20 and
lettii(n1),i0, ,n n1
. Write an R script that simulates a paths of the process S sampled at times tii0 using the result from part a. That is, first generate
T | S using Cholesky decomposition of the tn11 tt1
S
Sandthengenerate S S 
conditional covariance matrix.

1n

Write S 50exp.03t.2W50expX , where X .03t.2W , and use the result ttttt
from part a. as follows:
 Generate X1 ~ N .03,.2
 Generate (Xt1, ,Xtn )|X1 asinthepreviouspart
 Set(St1, ,Stn,S1)50exp(Xt1, ,Xtn,X1) 

2.
A European lookback option is a path-dependent option whose payoff at maturity depends on the maximum/minimum price of the underlying asset before maturity. There are two types of lookback options, namely fixed strike & floating strike, with payoff functions given by:
,whereMT maxSt&mT minSt 0t T 0t T
a. Perform Monte Carlo simulation in R for estimating the price of a floating strike European lookback call option. Assume the underlying asset price follows Geometric BM with S0  90, T  1, r  2%,   20% , and use unbiased estimation (i.e. simulate from the exact distribution of the minimum). Use n  100, 000 samples and create a 95% confidence interval. Compare you result with the exact price of the option, given by the R function FloatingStrikeLookbackOption in the package fExoticOptions.
b. Perform Monte Carlo simulation in R for estimating the price of a fixed strike European lookback call option. Assume the underlying asset price follows Geometric BM with S0  90, K  100, T  1, r  2%,   20% , and use unbiased estimation (i.e. simulate from the exact distribution of the maximum). Use n  100, 000 samples and create a 95% confidence interval. Compare you result with the exact price of the option, given by the R function FixedStrikeLookbackOption in the package fExoticOptions.
c. Repeat part b., but assuming the risk-neutral asset price dynamics:
(see attached .R code)
(payoff at maturity)
Call
Put
Fixed strike
MT K
KmT 
Floating strike
ST mT 
MT ST 
MC estimate
95% C.I.
Exact price
14.27339
14.24871 → 14.29806
14.26674
MC estimate
95% C.I.
Exact price
8.304169
8.281272 → 8.327067
8.295269
dS(t,S)dt(t,S)dWrSdtcos(et) S dW
ttttt
t
t

Use Euler discretization with m  50 steps and simulate n  10, 000 paths. In order to approximate the maximum of each path, simulate the maximum of each step using the result for the extrema of an arithmetic BM:
S  S2 2t2(t ,S )log(U) M |S ,S S  ti ti i1 ti1 ,
ti ti1 ti ti1
where M ti  max {St }, Sti  Sti  Sti 1 , t  ti  ti 1 & U ~ Uniform(0,1) . The
ti1tti
maximum of the entire path will be the maximum over all steps in the path, i.e.
MT max{St} max{Mt }.Includea95%confidenceintervalinyouranswer. 0tT i0, ,m i
2
MC estimate
95% C.I.

2.209548
2.195220 → 2.223876
3.
(Note: changed the strike from K  100 to K  90 , to get positive price)
A rainbow option is a derivative exposed to two or more underlying assets. Consider
a European rainbow option with payoff given by
max{S(i)} S(i)
, i.e. the payoff
1d

i1, ,d i1 
Td
T
is the maximum final price minus the average final price of all d assets (note that the maximum/average is over assets, not over time). Estimate the price of this option using Monte Carlo simulation with n  10, 000 d-dimensional paths, and provide a 95%
confidence interval with your answer. Assume that d  5 , K  100 , T  1 , r  .03 ,
S(i)(0)100,i1, ,5
withσ.1 .2 .3 .4 .5andCorWi(1),Wj(1).3,ij.
, and:
a. The assets follow multivariate Geometric BM dS(t)  r S(t)dt σ S(t) dW(t)
,
MC estimate
95% C.I.
36.45105
35.89322→ 37.00889
b. The assets follow the SDE dS(t)  r S(t)dt σ S(t) dW(t) , with σ.1 .2 .3 .4 .5, CorWi(1),Wj(1).3, i j and
S(t)  S(5) (t) S(1) (t)T is the reverse of S(t). This process is not a 
multivariate Geometric BM, so use Euler discretization with m  25 steps to approximate the final prices of the assets.
MC estimate
95% C.I.
33.69687
33.34725→ 34.04649