关键词 > CS476/676

CS 476/676 Assignment 3 Winter 2023

发布时间:2023-03-17

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS 476/676 Assignment 3

Winter 2023

Programming Questions

IMPORTANT:     In this and in future assignments, most of the marks for programming questions are allocated for explanations of algorithms (e.g.  pseudo-code) and discussion of results.  If all you hand in is the listing of the  Raw Code” or  Raw Output” by itself, you will get poor marks.  All coding should be done in Matlab. All the plots should be appropriately labeled. You should submit all Matlab code used in your assignment.  Be sure to document (i.e.  add liberal comments) your code.  The TA will take off marks for poor documentation.

1  [(5 marks) ] (Numerical Scheme for SDE)

Consider the following mean reverting process for variance:

dvt  = .λ(vt . )dt + η ^vt dZt

where λ > 0, , and η > 0 are given constants.

(a)  Given vn  at tn , write down the Euler-Maruyama formula for computing vn+1  at tn+1 .  Can vn+1 become negative?  If yes, provide conditions on the standard normal sample in Euler-Maruyama formula that leads to negative vn+1 . Otherwise, explain.

(b)  Given vn  at tn , write down the Milstein method for computing vn+1 . Assumming vn  = 0, provide

an inequality using parameters λ, , η, which guarantees that vn+1  is always positive.

.

2  [ (12 marks) ] (Numerical Scheme for correlated SDEs)

A long term European option on a risky asset St  has the payoff P (ST ) at the expiry T. Assume that the underlying price process St , under the risk neutral probability, and the interest rate rt  process satisfy equations below

 = rt dt + σt dZ           

dσt  = k1 ( . σt )dt + η1 ^σt dZ

drt  = k2 ( . rt )dt + η2 ^rt dZ

EQ (dZdZ) = ρ dt

where k1 , k2 , , , η 1 , η2 , ρ are given positive constants.  In addition, the initial price S0  > 0, interest rate r0  > 0, and volatility σ0  > 0 are given. Furthermore, dZ (0)  and dZ (2)  are independent and dZ (1) and dZ (2)  are independent.

Table 1: Data for Hedging Simulations Using a Binomial Lattice

σ

r

µ

Time to expiry T    Initial asset price S(0)

Strike Price K1

Strike Price K3

N

.20

.03

0.15

1 year

$100

0.9S(0)

1.1S(0)

250

(a)  (2 marks) Let dZ (i)  = φ (i)^dt and φ = [φ(0) , φ (1) , φ (2) ].  What is the covariance matrix for φ? Describe how to generate iid samples for φ (i), i = 0, 1, 2, assuming that you are given a function randn which generates independent samples from the standard normal.

(b)  (2 marks) Let tn  = n∆t, n = 0, 1, · · · , N , where N∆t = T. Assuming that r(tn ), σ(tn ), S(tn ) are given, describe how to compute r(tn+1), σ(tn+1), S(tn+1) using the Euler’s formulae?

(c)  (8 marks) The fair value V0  of this European option can be computed based on the risk neutral valuation, i.e.,

V0  = EQ  /e 0T  r(t)dtP (ST )

Write a pseudo code, using M Monte Carlo simulations and N time steps, N∆t = T, to determine the fair value of the option at t = 0 based on (a) and (b).  You can ignore handling of potential negative rates and prices.

.

3  [(20 marks) ](Compute Delta from a Binomial Lattice)

Assume that the (no dividend) underlying price follows

dSt

St

where Zt  is a standard Brownian, µ and σ are constants.

Consider the European Butterfly Spreads, whose payoff is defined by strike prices K1   < K2   < K3 , where K2  =  (K1 + K3 ), as follows:

,

. .

payoff(ST ) =

. .

0

ST  . K1 K3 . ST 0

if ST  < K1

if K1  < ST  < K2

if K2  < ST  < K3

if ST  > K3

You are to conduct hedging effectiveness analysis for this power option using MC simulations of (1) for the underlying price so that there is no time discretization error in the simulated price.

In addition, you will compute hedging positions by modifying your code for option pricing under a binomial lattice in Assignment 2.

Assume that the initial option price is computed from your binomial model. Specifically,

(a) Write a Matlab function  [V0 , S, δ] = binomialDeltaButtery(S0 , K1 , K3 , r, σ, T, N) which re- turns, the initial option value V0 , S and δ, representing the underlying price and delta hedging positions on the binomial lattice nodes over equally spaced N time periods in [0, T]. The interest rate r and volatility σ are constants.

(b)  Now consider a vector of underlying price S (not necessarily equal to any binomial lattice price,

e.g., from simulations), using linear interpolation to determine the corresponding hedging positions δ(S) from the binomial lattice price vector Sn and delta δ n as follows: When a simulated price in S does not equal to any lattice price Sn , interpolate using the hedging values at lattice nodes at each rebalancing time to approximate the hedging position (you can use matlab function interp1). To avoid potentially large extrapolation error, reset the hedging position equal to that of the nearest binomial price Sn , if an underlying price exceeds the range of the price Sn .   Write a Matlab function δ =interpDelta(δn , Sn , S) to implement this interpolation.

(c)  Using the data in Table 1, binomialDeltaButtery, and interpDelta, write a matlab script to          compute hedging positions at time tn , n = 0.8N, for a European Butterfly S = linspace(0.6S0 , 1.4S0 , 100) and plot the computed hedge position δ against S .

(d)  Using the parameter values given in Table 1, determine the hedging error using discrete delta hedging for the Butterfly Spread option . Plot the histogram of the relative hedging error P&L, for no hedging, n = 1 : 1 : N (daily), n = 5 : 5 : N (weekly),  n = 20 : 20 : N (monthly) respectively. assuming hedging positions are computed using binomialDeltaButtery and interpDelta,. The Matlab functions histc,  bar might prove useful.   Use at least 50 bins in your histogram. Comment on your observations.

(e) Write a Matlab function  [var,cvar]=dVaRCVaR(P&L,  β) which returns VaR and  CVaR for a discrete P&L distribution with M independent samples using the procedure described. In Matlab, ordering can be done using sort. For the Butterfy, compute and report in a table, mean, standard deviation, VAR (95%), CVAR (95%), of P&L for no hedging, rebalancing monthly, weekly, and daily. Discuss how hedging performance changes with the rebalancing frequency.

(f) In general, a hedging rebalancing time tn(rb)  may not coincide with the discrete time tn of the lattice. How would you change your code to implement the hedging analysis?

.

4  [(10 marks)].  (Trading simulation)

You think that you have discovered an arbitrage dynamic trading strategy. Does it work?              Simulation can be used to analyze your strategy. Consider the following dynamic trading strategy

Let’s assume that it is possible to trade continuously in time, without transaction cost. For simplicity, we also assume that the interest r = 0.

Let St  and Ct  denote time t values of the stock and a European call with strike K and expiry T.       Suppose that today you sell the European call option with strike K and expiry T. Assume that S0  < K , i.e. the initial asset price is less than K .

Assume that you then implements the following simple hypothetic hedging strategy: As soon as St  > K , you borrow from cash account and buy the stock at t. As soon as St  < K, you sell the stock at t.

Let δt St + Bt  denote the value of the hedging portfolio of the underlying and bond. At t = 0, the cash

account is set such that .C0 + δ0 S0 + B0  = 0.

Assume that the interest r = 0.

(a) What is the value of B0 ? Write down a mathematical expression for the writer’s trading strategy δt , 0 < t < T.

(b)  Under the above continuous trading assumption, the value of hedging portfolio δt St + Bt  is either St  . K + C0  or C0  for any 0 < t < T .  When does the value δt St + Bt  equals to St  . K + C0 ? When does the value δt St + Bt  equals to C0 ? Explain your answers.

(c) What is the relative P&L for the writer (.CT +δT ST +BT )/C0 ? What are the mean and variance of this relative P&L?

(d)  The answers to the above questions seem to suggest the existence of an arbitrage.  Perform the following computation to investigate whether this is true.  Assume that the underlying follows the following Black-Scholes model. Simulate writer’s strategy above, assuming S0  = 95, K = 105 and other parameters in Table 1.  Compute the relative P&L ( .CT  + δT ST  + BT )/C0  by MC simulations.  Assume C0  equals the initial call value computed by Black-Scholes formula.  Use about 80, 000 simulations. Use 100, 200, 400, 800 rebalancing times. Show a table of results (mean, standard deviation, 95% VAR and CVAR) versus number of rebalancing times. Generate plot of

the probability density of the relative P&L for the case of 800 rebalancing times. What do you observe about the mean and variance of the hedging error?

(e)  Bonus. Explain the discrepancy in the variance hedging error between the theoretical value under

the continuous hedging assumption and the computed values using MC simulations.

.

5  [ (12 marks)] (MC Pricing Under Jump Model)

Assume that Zt  is a standard Brownian motion. Let qt  denotes a Poisson counting process where the change dqt  is defined as

dqt  =

where λ > 0 denotes the jump intensity. Consider the following risk neutral jump-diffusion process

dS(t)

S(t  )

where the value S(t ) is the price just before jump and κ = E[J . 1]. Note that, if dqt  = 1, then after the jump

S(t) = S(t )J

where J corresponds to the random jump amplitude.  In Merton’s jump model, log J has a normal distribution, see ?9, 9.1, 9.2, 9.4, 9.5 in the course notes for discussions on the Merton’s jump diffusion model and its implementation.

In contrast to the original Merton’s jump process, here we assume, instead, a double exponential jump process.  Specifically, assume that, when jump occurs, the up-jump occurs with a probability pu  and down-jump occurs with a probability 1 . pu  and the density function of the jump amplitude J is a double exponential, i.e., the density function f(y) of y = log(J) is

f(y) = pu µu exp(.µu y)1y>=0 + (1 . pu )µd exp(µd y)1y<0

where 1y>=0  is an indicator which equals 1 if y >= 0 and 0 otherwise.

(a)  Assume that µu  > 1. Verify that

pu µu           (1 . pu d

(b)  Assuming the underlying follows a jump diffusion process (2) with

pu µu           (1 . pu d

using Monte Carlo method with Euler time stepping., write a Matlab function to compute the fair value of a European Butterfly Spreads

val = Butterfly(S0 , r, σ, pu , µu , µd , λ, K1 , K3 , T)

Table 2: Model Parameter Data

σ

r

Time to expiry      Initial asset price S(0)

Strike Price K1

Strike Price K3

µu

µd

pu

Intensity of Poisson Process λ t

.15

.05

1 years

$1

0.9S(0)

1.1S(0)

3.04

3.08

0.34

.1

1/1000

with strikes K1 , K3  and expiry T, the payoff of a European Butterfly Spreads (in Question 3) is as below: let K1  < K2  < K3 , where K2  =  (K1 + K3 ), as follows:

,

. .

payoff(ST ) =

. .

(

0

ST  . K1 K3 . ST 0

if ST  < K1

if K1  < ST  < K2

if K2  < ST  < K3

if ST  > K3

(4)

Using parameter values in Table 2,, plot the computed option values with the number of (timesteps, simulations) = (800, 25000) for K1  = (0.6 : 0.1 : 0.9) and K3  = 2S(0) . K1 , hence  = 0.4 : .0.1 : 0.1. How does the computed option value depend on  ? Explain why your observa- tion is reasonable.  You can use the matlab function exprnd which generates a random sample from an exponential distribution in [0, +o) with a probability density function

fX (x) = {

where µ > 0 is a parameter.

if x e [0, +o)

otherwise

(5)

(c)  Show that the Butterfly Spread in  (4) becomes a standard call option when K3   =  +o.   Use Matlab function blsimpv to plot the implied volatility of the standard option price using your Butterfly(S0 , r, σ, pu , µu , µd , λ, K1 , K3 , T),  by setting K3   =  +o, with  (timesteps,  simulations) = (800, 25000) against the strike, e.g., K=linspace(.7, 1.2, 20) and T = 1.

(d)  Discuss observed characteristics of the implied volatility from the assumed jump model.

6  [(Graduate Student Question)] (10 marks)

Practitioner’s BS delta hedging consists of a portfolio Π(t) with the following components at rebalancing time t = tn :  an option position .Vn , δn  shares at price Sn , and the dollar amount Bn  in a risk-free cash account, where

VBS

∂S

and  (Sn , tn ; n ) is the BS delta at tn  using the implied volatility n  computed from the market option price Vn  at the rebalancing time tn .  In [Hull and White(2017)], hedging position function for the underlying is learned from the market price data 1 .  More specifically, the mean variance delta, δMV is modelled in a quadratic form

δM V  = δBS +  a + b · δBS + c · δB(2)S,

see (5) in [Hull and White(2017)]. Your task is to read this paper to understand their proposed method and then conduct a comparative computational study on the data below.

You are given the S&P 500 index option data, in the le RawData.mat, from 01-Jan-2009 to 31-Dec- 2010 as the training data set and the data from 01-Jan - 2011 to 31-Dec-2011 as the testing data set. In RawData.mat, values of following additional variables are also provided for you to use for training and testing:

●  CSTrain: Daily change of the market index price for the training set.

●  CVTrain: Daily change of the market index option price for the training set.

●  CSTest: Daily change of the market index price for the testing set.

●  CVTest: Daily change of the market option price for the testing set.

●  DeltaTrain: BS delta 6BS  computed using implied volatility σimp  for the training set.

●  DeltaTest: BS delta 6BS  computed using implied volatility σimp  for the testing set.

● VegaTrain: BS vega v。cABS  computed using implied volatility σimp  for the training set.

● VegaTest: BS vega v。cABS  computed using implied volatility σimp  for the testing set.

●  STrain: market index price, S, for the training set.

●  STest: market index price, S, for the testing set.

●  TauTrain: time to expiry, τ , for the training set.

●  TauTest: time to expiry, τ , for the testing set.

Consider daily hedging error V . 6∆S, where V = V (S(tn+1), tn+1) . V (S(tn ), tn ), ∆S = S(tn+1) . S(tn ), 6 is the position of the underlying at tn . Using the provided data, you are to

(a)  For practitioner’s BS delta hedging defined in (6), plot the histogram of the hedging error V . 6∆S, tabulate its mean, standard deviation,  95% VaR and CVaR when the hedging position 6 = 6BS  using given training data and testing data respectively.

(b)  Learn the MV hedging model (7), see (5) in [Hull and White(2017)] , using the training data.

(1)  Report the ratio GAIN defined in (3) in [Hull and White(2017)] for the learned MV hedging model (7) using the training data and testing data respectively.

(2) In addition, plot the histogram of the hedging error V . 6∆S, tabulate its mean, standard deviation, 95% VaR and CVaR with respect to the training data and testing data respectively, when the hedging position 6 comes from the MV model (7) learned from the training data. How does the testing performance compare to training performance?

(c)  Assume now that the hedging position function 6 at time t has a different parametric form given below

6 = 6BS + c1 · S + c2 · v。cABS + c3 · v。cABS  · 6BS                                                 (8)

where 6BS  denotes the BS delta, v。cABS  denotes the BS vega.  Learn this parametric function for the 6 position by minimizing the MV error as defined in [Hull and White(2017)].

Repeat the same performance assessment in (b) using the position in the underlying 6 learned from training data but assuming the parametric form (8).  Compare results from (c) with the

parameterizations in (b). What do you observe? Is the observation reasonable? Why? You can use Matlab function blsprice, blsimpv, blsdelta.