Python代写-MGMTMFE406-Assignment 1
时间:2022-02-16
UCLA Anderson School of Management
Binomial Trees and Least-Square Monte Carlo
Assignment 1 – Derivative Markets MGMTMFE406 – Winter 2022
We want to evaluate American put options written on an ordinary share of ACG
Corp. on January 18, 2022. We will first use a binomial tree, then the Longstaff
& Schwartz method. At the close, the stock of ACG Corp. is worth 100$, the
one-month risk-free rate is 3% and, historically, the volatility of the ACG Corp.
stock has been of 35%. The stock does not yield dividends.
(1). At the close on January 18, European puts maturing on February 18 with
strikes $90, $95, $100, $105 et $110 were respectively priced at $2.1809,
$2.5394, $4.1029, $6.7978, $11.0215. Plot the implied volatility smile cor-
responding to those prices;1 that is, report on the y-axis the puts’ Black-
Scholes implied volatility as a function of, on the x-axis, the puts’ money-
ness M defined as M = 0.5−N(d1). Use the historical volatility to define
d1.
(2). Using a linear interpolation, find the implied volatility of European puts
with one month to maturity and struck at 92.50$, 97.50$, 102.50$ and
107.50$.
(3). For the 5 European puts in (1), as well as for a sixth European put struck
at $97.50, compute the CRR prices2 for N = 10, 11, 12, . . . , 500 time steps.
For each of the puts, use its (interpolated) implied volatility. Plot the 6
convergence graphs (subplots, with the number of steps on the x-axis) as
a 3x2 figure such that:
(a) The graphs are in increasing order of exercise prices, with the strike
as title of the subplot.
(b) Each graph reports the relative error (y-axis), in percentage points,
against the Black-Merton-Scholes price, with (i) a dashed line ’–’ at
0 (ii) a dotted line ’:’ at -0.1% and (iii) a dotted line ’:’ at +0.1%.
The three latter lines will provided visual reference for graphs that
would not be on the same y-axis scale. See the example at the end
of this PDF.
(4). What is the price of the 4 American puts with strikes 92.50$, 97.50$,
102.50$ and 107.50$ in the 500-steps CRR binomial tree?
In a 2x2 figure, plot the exercise frontier of each of the puts using the same
tree; that is, report your best approximation of the price (y-axis) below
which it is optimal to exercise as a function of time remaining before
maturity (x-axis) in the 500-steps binomial tree (conceptually, you’ll walk
the tree backwards). How do the exercise frontiers change if all implied
volatilities are 10% higher?
1If you are not familiar with the concept of implied volatility, please read the first two
pages of McDonald’s Section 12.5 Implied Volatility.
2Prices obtained using the binomial tree suggested by Cox, Ross and Rubinstein (1979),
in which u = eσ

h and d = 1/u.
1
(5). We now want to compare the prices and exercise frontiers obtained in
the CRR tree with those obtained from using the Longstaff & Schwartz
method. This csv file:
https://www.dropbox.com/s/9h4kkbihuf8nsmb/simulated_prices.csv?dl=1
contains npaths = 10, 000 simulations (columns) of the ACG Corp. price
process over the next month. The nth row contains simulated prices at
time t = nh, where h is the same as in the tree. Let S0 = 100 and load
the prices in the csv file into a variable named S.
Write a function putLongstaffSchwartz with the following signature:
putLongstaffSchwartz(S0, S, K, r, h)
with arguments: the initial value of the underlying, the nperiods × npaths
matrix of simulated trajectories for S, the strike, the risk-free rate, and
the length of a period. The linear regression in the LS algorithm here
should use a constant as well as X1 and X2 defined as follows:
X1,t =
St
S0
X2,t =
(
St
S0
)2
The function should return (i) the price of the American put with strike
K and (ii) the corresponding exercise frontier. Repeat the analysis in (4)
and compare both sets of results.
(Bonus) A Hawaiian option is essentially an Asian option with an American-style
exercise. Otherwise stated, it is an American option where the underly-
ing3 at time t, is the average price from time 0 to time t.4
Without modifying the inner workings (i.e. the code) of the above
putLongstaffSchwartz, you can straightforwardly repeat the L&S part
of the analysis in (5). Compare your results with those of “simple” Ameri-
can put options. Could you price the Hawaiian option as straightforwardly
in the 500-steps CRR tree?
3In the case of the fixed-strike option, considered here, the average is the underlying. We
could consider a floating-strike variation of the option. We won’t.
4Given the discretization in the L&S methodology, at tk, please consider the average price
from time t1 to time tk, k ∈ {1, . . . , N}.
2
Example for Question (3b)
0 100 200 300 400 500
-1
0
1
R
el
at
iv
e
Er
ro
r (
in
%)
Strike: 90
0 100 200 300 400 500
-0.5
0
0.5
Strike: 95
0 100 200 300 400 500
-0.2
0
0.2
R
el
at
iv
e
Er
ro
r (
in
%)
Strike: 98
0 100 200 300 400 500
-0.2
0
0.2
Strike: 100
0 100 200 300 400 500
Number of steps in the tree
-0.2
0
0.2
R
el
at
iv
e
Er
ro
r (
in
%)
Strike: 105
0 100 200 300 400 500
Number of steps in the tree
-0.1
0
0.1
Strike: 110
3

essay、essay代写