Least Squares Method
Least Squares Method
Author: Xi Yang
September 2014
Schwartz (2001), called Least-Squares Monte Carlo (LSM) method. The key to this
Methods.......................................................................................................................... 35
5. Numerical Results............................................................................................................. 61
6. Conclusion......................................................................................................................... 63
References............................................................................................................................. 64
1. Introduction
European options can be exercised only on the expire date, whereas American
options can be exercised on any trading date before exercise. Valuation of derivatives
with American-style exercise features become one of the most significant practical
problem in option pricing. These types of derivatives exist in all major financial
Since American option can be exercised at any time up to the expiration date,
closed-form expressions for derivative prices do not exist. Thus, although the
analytical expressions can be found in some cases, the numerical approaches for
suggested by Cox, Ross & Rubinstein (1979) and Finite Difference methods. The
major problem for the Binomial methods is that they become infeasible when handle
more than a couple of stochastic factor, since the number of nodes required grows
exponentially in the number of factors. And those two methods cannot be extend to
The more efficient approach is still a Monte Carlo one. Valuing a derivative security
1
using Monte Carlo typically involves simulating paths of stochastic processes, and
then estimate the option price by discounting the average of the payoff for each path.
However, since the Monte Carlo approach estimate the valuation of American option
using pathwise method, it not been widely applied to pricing American derivatives.
The main difficulty for applying Monte Carlo techniques is to find the conditional
problem, least squares regression on a finite set of functions can be used as a proxy
Longstaff and Schwartz (2001), called Least Squares Monte Carlo (LSM). The idea is
to estimate the continuation value using least squares regression jointly with the
cross-sectional information obtained from Monte Carlo simulation. Besides, the LSM
The focus of this paper is to assess the performance of LSM Approach. Section 2
gives the financial background of LSM approach. Section 3 introduced in details the
2
2. The Financial Background
Options are financial derivatives that give holder right, but not the obligation, to buy or
sell an underlying asset at a specified strike price at a prescribed time in the future
(Choudhury, King, Kumar & Sabharwal, 2008). Call options give holder the right to
buy the underlying asset, whereas put options give the right to sell. There are
exercise date. For instance, European options can only be exercised on the expire
date while Bermudan options are exercisable at specific dates on or before maturity.
American options have the additional features that exercise is permitted at any time
during the life of the options. Therefore, not only must a value be assigned to the
American option, but we must determine when it is best to exercise the option.
One of the basic concepts concerning the valuation of derivatives is arbitrage. This
can be state as, owing to the law of supply and demand, the opportunity to make an
instantaneously risk-free profit must vanish quickly (Wilmott, Howison & Dewynne,
1995). Besides, the largest return that one can make on a risk-free investment is
3
No-arbitrage valuation principle implies that the price of portfolio in the present is the
V (t) V(T) e r (T t) .
M s EQ M t | t for 0 s t T .”
determines the martingale property of M (Föllmer & Schied, 2002). Furthermore, if the
EQ X ti and X si EQ X ti | s , 0 s t T , i = 1,...,d.
4
2.3. Risk Neutrality
The risk-neutral method is set out in the papers by Cox & Ross (1976) and Harrison &
Pliska (1981). Those papers proposed a different point of view about option pricing
dV 1 2 2 d 2V dV
S 2
rS rV 0 ,(2.8)
dt 2 dS dS
with
dS
dX dt (2.9)
S
dV
and consider the portfolio V S with , with this strategy, all risks have
dS
d
been eliminated instantaneously and r . The value of in (2.9) does not affect
dt
that of V in (2.8).
The risk neutral world denote a world where all risks are hedged away, the only
growth rate is the risk free interest r. Thus, equation (2.9) can be rewrited as
5
dS
dX rdt .(2.10)
S
defined as follows:
S 1
[log (r 2 )(t t)]2
S 2
1
p[S, t;S, t ] e 2 2 (t t)
,(2.11)
S 2 (t t )
t t .
Next, suppose the payoff function for an option V is V (S, T) (S) , then the expected
value of payoff (S) can be calculated by the probability density function. To start
integrating from zero to infinity, over all possible future asset prices . Eventually, the
value of V can be calculated by discounting the expected value of payoff (S) , the
resulting formula is
V(S,t) e r (T t) (S') p(S, t;S, t )dS
0 (2.12)
6
2.4. Simulating from a Geometric Brownian Motion
If log S(t) is a Brownian motion with initial value log S(0), than the stochastic process
S(t) is a geometric Brownian motion (Glasserman, 2004). Moreover, all methods for
through exponentiation.
1
dS (t ) f ( X (t ))dX (t ) 2 f ( X (t ))dt
2
1
S (0) exp( X (t ))dt dW (t ) 2 S (0) exp( X (t ))dt
2
1
S (t)( 2 ) dt S(t) dW(t). (2.14)
2
dS (t )
dt dW (t ) .(2.15)
S (t )
7
Then, it can be verified through Itô's formula or comparison with (2.14) that
1
d logS(t) ( 2 ) dt dW(t) .(2.16)
2
(2.13). For the parameter in this notation, represents drift parameter whereas
As can be seen from (2.16), given a starting level of S(0), if S ~ GBM ( , 2 ) , then
1
S (t) S(0) exp([ 2 ] t W(t)) .(2.17)
2
1
S (t) S(0) exp[( 2 ) t t Z(t)] ,(2.18)
2
where Z (t) ~ N(0,1) . Besides, due to W are independent and normally distributed, to
expressed as
1
S (t i 1 ) S(t i ) exp([ 2 ](t i 1 t i ) ti 1 ti Zi 1 ),
2 (2.19)
i 0,1, , n 1,
8
where Z (t i 1 ) ~ IIN(0,1).
The Monte Carlo method was first suggested as an approach to price option by Boyle
(1977).
There are three main steps to be followed to calculate an estimate of the option value
1. Simulating the paths for underlying asset prices until expire date T and then
calculate the value of payoff functions. Repeating this steps for M times to get M
paths.
3. Discounting the average of the payoff for each path to obtain the estimated option
price.
Suppose a path of underlying asset prices is random. For Monte Carlo approach, the
Section 2.3:
9
1 n
lim e r (T t)
n
Pay off (Si ),
n i 1
dS rSdt SdX ,
1
where dX Z (dt) 2
and Z (t) ~ N(0,1) , as mentioned in section 2.4.
T
If there are m time steps from t = 0 to t =T, then dt . Thus,
m
1
Si (dt) Si (0) r Si (0)dt Z Si (0)(dt) 2 ,
1
Si (2 dt) Si (dt) r Si (dt)dt Z Si (dt)(dt) 2 ,
1
Si (3dt) Si (2 dt) r Si (2 dt)dt Z Si (2 dt)(dt) 2 ,
1
Si (T) Si (T dt) r Si (T dt)dt Z Si (T dt)(dt) 2 .
10
options, two basis issue need to be concerned. The first is to estimate the optimal
performance when dealing with multiple factors. Those issues are raised since that
Monte Carlo method typically generate the simulating processes pathwise, whereas
programming techniques.
A commonly method to denote Markov chain i.e. discrete Markov process assumes
that there is a filtered probability space (, , ( n ) n0 , P) and a state space (E, ) ,
that is to say, a measurable space E with a σ -algebra of its subsets such that
If the random variable X n are n / -measurable and the following Markov property
holds:
P (X n 1 B | n )( ) P (X n 1 B | X n )( )
for all n 0 and B , then the stochastic process X (X n , t ) n0 is called a
In term of stopping rule, the price time zero price V (h) depending on the payoff and
11
the stopping time is given by
If N denotes the number of time steps and M the number of paths, a set of prices can
process S (t), t 0, T on fixed time points t1 , , t N , P (i) can be the option values
with payoff h at the i th exercise opportunity ti . The optimal stopping time can be
formulated by
i P ( i ) es sup i i P ( ) : S p (t i ) ,
values in {t1 , , t N } (Kienitz & Wetterau, 2012) . Besides, S p (t i ) is called the Snell
12
3. The Least-Squares Monte Carlo Approach
An American option can be exercised at any time up to the expiration date, thus the
option values differ from the specific exercise policy used by different investors. On
the expire date, the optimal strategy is to exercise the option if it is in the money, or let
is expire if it is out of money. More precise, the holder of the option is supposed to
compare the value of the option of exercise it immediately with its conditional
expected value of continuation. Thus, the most crucial point of whether or not
exercise the option is to determine its value of continuation under the risk neutral
condition.
The approaches for valuation of American options can be typically divided into two
classes. Binomial models and finite difference methods are classified as backwards
method and are well suited to solve the problem of early exercise opportunities
(ukessays, 2014) . Those two similar approaches generate the discrete lattice points
during the life time of American options, and then iterate backward from the expire
date to calculate the immediate exercise value and the risk-neutral expected value of
holding the option. The lattice points, for which exercise immediately is more
beneficial than continue is called exercise frontier (Choudhury, King, Kumar &
13
Sabharwal, 2008). Moreover, binomial and finite difference methods are adopted to
low dimension of problems and dynamics, typically three or four dimensions. The size
supplement method when compare with binomial approaches and finite different
methods. Monte Carlo methods can be efficient when pricing option with high
dimensions, since the rate of convergence rate does not rely on the number of
dimensions (Choudhury, King, Kumar & Sabharwal, 2008). Those advantages allow
However, two issues need to be take into consideration, one is that the Monte Carlo
techniques become inefficient when dealing with options which have early exercise
for options with multiple processors. Ultimately, the main issue is that Monte Carlo
options recently, called Least Squares Monte Carlo (LSM). LSM also use simulation
14
to value American options, it is based on the information provided by Monte Carlo
methods. Specifically, LSM starts with simulating forward paths, and then iterate
backward and estimate the continuation value of the option at each exercise date.
introduces a set of basis function from underlying asset prices. Comparing these
approximations with the immediate exercise values to determine the optimal exercise
C ( ,s; t, T) , s (t , T ] denote the path of cash flows, conditional on the option not
being exercised at or before time t and the option-holder following the optimal
At the expire date, the option holder exercise the option if it is in the money, or let it
expire otherwise. Prior to maturity at time tk , the investor must make decision about
whether to exercise at that time step or continue and reconsider at the next time step.
Although, the option-holder knows the value of exercise immediately, he has no idea
15
about the cash flow generated by continuation. According to the arbitrage free theory,
K
F ( ; t k ) E Q exp( r ( ,s) ds) C( , t j ; t k , T) | tk ,
tj
tk
j k 1
where r ( , t j ; t k ) is the interest rate in period tk for riskless securities that expire in
conditional on the information set tk at time tk (Longstaff & Schwartz, 2001).
continuation is required. Let Fˆ ( ; t k ) denote this estimate. Once the expected value
Fˆ ( ; t k ) , and then exercise as soon as the immediate exercise value is greater then
or equal to Fˆ ( ; t k ) .
After the optimal exercise policy is determined, the procedure of American option
pricing is to first simulating the paths of underlying asset price by Monte Carlo
methods from risk-neutral pricing measure Q. For each path, find the optimal stopping
point through the estimator functions of continuation value obtained above. According
to the option pricing theory, an optimal exercise strategy can only generate one
unique cash flow for each path((Choudhury, King, Kumar & Sabharwal, 2008)). Then,
the American option pricing problem is solved by discounting the resulting cash flow
16
from exercise back to time zero, and averaging the discounted cash flows over all
paths .
If no further information is provided, let B be the set of all possible vector and
B k . The goal is to find a vector b (b1 ,..., b K ) from B that minimize the error i.e.
T
S ( ) et2 ee (y X ) '(y X ) (3.1)
t 1
dS ( )
2 X ' X 2 X ' y, (3.3)
d
2 S ( )
2 X 'X. (3.4)
2
17
Equating (3.3) to zero to derive the normal equations
It can be proved that the empirical predictor of y, ŷ Xb , has equivalent value for all
X (X'X) X ' y
18
Another theorem describes that S ( ) is able to achieve the minimum value for any
The prime of the LSM approach is to approximate the conditional expected function of
(Longstaff & Schwartz, 2001). Particularly, if the first m basis function are represented
m
F ( , t j ) ak Lk (S(t j , )) .
k 1
19
where S(t j , ) is the underlying asset values at the j th time step for the path ,
Moreover, the option values and underlying asset prices are information used to
Let Aj be the n m design matrix for the j th time step with Aj (i, k) L k (S(t j , i )) ,
where i is the i th path with i 1,..., n . Let X j ak j be the unknown vector of the
(Choudhury, King, Kumar & Sabharwal, 2008). The objective is the find the basis
function coefficient that minimizes || Aj X j Y j ||2 (ibid). The column vector values
[Y j ]i are calculated by discounting the option price on path i from time t j 1 to time
determined by
m
F ( , t j ) ak Lk (S(t j , )) . (3.8)
k 1
For each j, minimizing this expression in the sense of the least-squares error. Using
vectors Y, X, given by
20
y1 x1 1
y2 x2
Y ,X , 2 n .
yn xm n
For the basis function Lk , k 1,..., m from (3.8), let Lk (S j , n) be the value of the j th
AT AX AT Y ,
which gives
X (AT A) 1 AT Y .
Considering a discrete American option which can only be exercised at N+1 limited
probability space equipped with a discrete time filtration (t j ) j1,...,N . Then,
21
choosing an D valued and -adapted Markov chain ( St j ) j 1,..., N as model for
ensure that the resulting variables Z t j f (t j ,St j ) | j 1,..., N are square integrable.
Furthermore, the initial asset value S0 is deterministic. If the set 0,N of all
-stopping times with values in {t 0 , t1 ,..., t N } are given, the price U 0 of American
U N Z N
(3.10)
U j max Z t j , (U j 1 | t j ) , 0 j N 1
j min k j | U k Z k .
Then, rewrite the dynamic programming principle with respect to the optimal stopping
time to give
N N
j 0 j N 1 . (3.11)
j Zt j (U j1|t j ) j 1 Zt j (U j1|t j ),
22
In particular U 0 sup 0,N Z Z 0 .
Hence, j (St )
j
is the projection of U j 1 on the space
conditional expectation using finite dimensional space L2j instead of the infinite
where
2
j arg min U j 1 e(St ) .
m j
23
stopping time generated by (3.13) is as follows:
Nm N
m j (3.14)
mj 1 0 j N 1.
j tj j tj
Z e (S ) tj j tj
Z e (S ) ,
possible to write
j (St ) nj e(S )
j tj
with
1 n
nj arg min (U (n)j 1 e(St(n)j ))2
m n i 1
1 n
arg minm
(Z (i)m,n ,i e(St(ij ) ))2 .
n i 1 j1
Nm ,n ,i N
m ,n ,i j .
m , n ,i 0 j N 1
j Zt(i)j nj e (St(i)j ) j 1 Zt(i)j nj e (St(i)j ),
24
U 0 max(Zt0 , Z1 )
is first estimated by
U 0m max(Zt0 , Z m )
1
and then by
1 n (i)
U 0m ,n max(Zt0 , Z m,n ,i ) .
n i 1 1
For details of this algorithm, refer to Clément, Lamberton & Protter (2002).
The valuation of American options is simple: generate the paths of underlying asset
prices using Monte Carlo simulations form the risk-neural measure Q. For each
stochastic process the optimal stopping time is determined by the estimator functions.
cash flows from the optimal stopping point to time zero, and take the average of the
The specific steps of the LSM algorithm for American put options are:
25
a. Generate the paths of underlying asset prices.
Suppose the expire date for a single asset American option is T, and the optimal
exercise date of the option is t * , t* [0, T] . Let S denote the underlying asset prices
and X is the strike price for the American option. Under the risk neutral condition, the
where, S0 ,S1 ,...,St* ,...,ST is the stochastic path for underlying asset prices, while
f(S0 ,S1 ,...,St* ,...,ST ) is the option price at the optimal stopping point t*. Then P is the
0 t0 t1 t j T is given by setting
1
S (t j 1 ) S(t j ) exp([ 2 ](t j 1 t j ) t j 1 t j Z j 1 ),
2 (3.15)
j 0,1, , N 1,
where Z (t j 1 ) ~ IIN(0,1) (as mentioned in section 2.4). Then the sample of underlying
26
b. Estimate the optimal stopping time for each path and calculate the option value at
For American put options, the value of immediate exercise equals the intrinsic value
H (Sij ) E Q exp( rt) C(S j 1 ) | S ij . Since American options can be exercised at any
time before the maturity, the optimal stopping time can be found by comparing the
It can be seen from the expression of H (Sij ) that the continuation value relies on the
the option value of the next time step, thus the conditional expected value of
deal with this problem, LSM construct the least-squares regression model
which take the underlying asset prices S j and S 2j as explanatory variables for all
simulating paths and the corresponding option value at the next stopping point as
explained variable.
27
estimated value of coefficients is denoted by aˆ1 , aˆ2 , aˆ3 and the estimated regression
equation become Yˆj aˆ1 aˆ2 S ij aˆ3 S ij 2 . By substituting the value of underlying asset
prices into this regression equation, the approximated value of continuation is finally
obtained:
Furthermore, Theorem 1.2.1 of Amemiya(1985) implies that Yˆi is the best linear
In this section, the choice of basis functions is the set of power basis:
Afterwards, iterating backward from maturity to calculate the optimal stopping time
and the option value at each exercise point for all the paths. At expire date T, the
value of exercise the American put option is simple max{X SiN , 0} . At time N-1, if
option is in the money i.e S Ni 1 X , compare the intrinsic value and the continuation
value and then exercise the option if immediate exercise is more valuable than
continue. Considering only the in-the-money paths in the estimation, the regression
28
equation for approximated conditional expected value of continuation is
where , i I N 1 , I N 1 is the set of all the in the money paths at time N-1. With the
data of underlying asset price S Ni 1 at time N-1, comparing the intrinsic value
max{X SiN 1 , 0} with the conditional expected value of continuation yˆ Ni 1 to make the
decision about whether exercise the option immediately or not. Similarly, the
each path i, the option can take the opportunity to exercise at the optimal stopping
c. Discount the resulting cash flows back to time zero and averaging the discounted
After simulating M processes of underlying asset prices and finding the optimal
exercise opportunity ti* for each path, the option value at that point is denoted by
*
Due to the optimal stopping time is different, the value of discount factor e rti differs
for each path. Thus, the average of discounted cash flow should be calculated
respectively, and the ultimate estimated option value of American option can be
29
expressed as
exp( rt ) I(S
*
i
i
ti*
)
P Eˆ Q
exp( rt *) f(S0 ,S1 ,...,St* ,...,ST ) i 1
.
n
In this section , the focus is on the effect of different type and number of basis
functions on the estimated option price. To be precise, considering ten different type
The polynomials in the table above can be expressed in three alternative methods:
30
a. Explicit expression
f n (x) N dm cm g m (x)
Wn (x) 0 1 1 xn
n 2n 2m
Pn (x) [n/2] 2 n (1) m x n2m
m n
(1) m n
Ln (x) n 1 xm
m! n m
1
H n (x) [n/2] n! (1) m (2 x) n 2 m
m !(n 2 m)!
1
H en (x) [n/2] n! (1) m x n2m
m !(n 2 m)!
(n m 1)!
Tn (x) [n/2] n/2 (1) m (2 x) n 2 m
m !(n 2 m)!
(n m 1)!
Cn (x) [n/2] n (1) m x n2m
m !(n 2 m)!
(n m 1)!
Tn* (x) [n/2] 2 n n (1) m (2 x) n 2 m
m !(n 2 m)!
(n m)!
U n (x) [n/2] 1 (1) m (2 x) n 2 m
m !(n 2 m)!
(n m)!
S n (x) [n/2] 1 (1) m x n2m
m !(n 2 m)!
The basis functions are special cases of the Explicit expression which is given by
31
N
f n (x) d n cm g m (x)
m0
where the value of N is differ from different polynomials and n 0 denotes the
b. Rodrigues’ formula
(2 n)!
Wn (x) 1 xn
n!
Pn (x) (1) n 2n n ! 2 n x n2m
Ln (x) n! 1 xm
H n (x) (1) n n! (2 x) n 2 m
1
(n )
Tn (x)
(1) n 2n 2 n/2 (2 x) n 2 m
1
(n )
Cn (x)
(1) n 2n 2 n x n2m
1
(n )
Tn* (x) (1) 2 n 2 n 1 2 2 n n (2 x) n 2 m
32
3
(n )
U n (x) (1) n 22 n 1 2 1 (2 x) n 2 m
(n 1)
3
(n )
S n (x) (1) n 22 n 1 2 1 x n2m
(n 1)
1 dn
f n (x) (x)(g(x)) n ,
n
an g (x) dx
c. Recurrence law
Wn (x) 1 0 1 0 1 x
H n (x) 1 0 2 2n 1 2x
H en (x) 1 0 1 n 1 x
Tn (x) 1 0 2 1 1 x
33
Cn (x) 1 0 1 1 2 x
U n (x) 1 0 2 1 1 2x
S n (x) 1 0 1 1 1 2x
b 0, n m.
a
f n (x) f m (x) dx
1, n m.
For different polynomials, the limits of this integral i.e. the value of a and b varies. See
Abramowitz & Stegun (1972) for details. However, if the range of underlying asset
prices is not in the interval [a,b] like in most cases, the basis function will not be
orthonormal basis and the number of terms used in the regressions need to be
added.
34
Furthermore, it is proved by Abramowitz & Stegun (1972) that the relationships
x
H en (x) 2 n /2 H n ( ),
2
1
Tn (x) U n (x) U n2 (x) ,
2
x
Cn (x) 2 Tn ( ),
2
x
Sn (x) U n ( ).
2
It is showed in Abramowitz & Stegun (1972), from tables 22.3 to 22.10, the
nonsingular matrix which implies that each polynomial generate the same span as
power function. Thus, different types of polynomial generate identical results when
3.3. Another Numerical Method for Pricing American Derivatives: Binomial Methods
For the purpose of comparing the resulting option price simulated by LSM approach
with the option value calculated using binomial method, the main objective of this
The value of options and other derivatives are assumed to vary continuously as a
function of time through the Black Scholes approach. However, stocks and options
35
are purchased at discrete times in reality. Binomial methods introduced by Cox, Ross
& Rubinstein (1979) provide a convenient method for valuing options and other
derivative securities by modeling the continues random walk with a discrete random
walk.
Suppose that the life time of an option is divided into M discrete steps from t 0 to
known at time t, then at time S (t t) it may take only two possible values; see
figure (3.1).
Assume that the probability Pup p of stock s will increase in value from S to uS with
u 1 is known (as is the probability Pdown 1 p that the value of the stock S will
The three unknown parameters u, d, p is chosen in such a way that the crucial
36
statistic properties of the discrete random walk described above coincide with those
of the continuous random walk (Wilmott, Howison & Dewynne, 1995). Then, those
parameters can be determined by comparing the discrete random walk with the
Starting with a given value of asset price, the remainder of the life time of this option is
divided into M time steps with size of t (T t ) / M . The asset prices S is assumed
binary tree is built from a given value of S, and then generate two possible underlying
asset prices (uS and dS) at the first stopping point, after that produce three possible
asset prices at the second time step, and so forth until the maturity; see figure 3.2.
Note that the binary tree reconnects with itself, that is to say, an up jump followed by a
down jump will lead to the asset price as a down jump followed by an up jump.
37
Figure 3.2. The binomial tree of possible asset prices.
Let S m denotes the asset price at time step M. To ensure that the discrete random
walk alone the tree has the same variance and mean as the continuous random walk
under the risk neutral condition, an up jump with probability p and the jump sizes u
and d are chosen, i.e., given S S m at time step m t , the value of u, d, p are
under continuous random walk in a risk neutral world and the discrete random walk.
Given the asset value S m at time step m t , the expected value of S m 1 for the
continuous case is
Ec S m 1 | S m S ' p (Sm , m t;S', (m 1) t) dS'
0
e r t S m ,
2
S' 1
log( ) (r 2 )(t' t)
S 2
1
where p (S, t;S', t') e 2 2 (t' t)
is the probability density function
S ' 2 (t' t)
dS
dX rdt .
S
Under the circumstance of the discrete binomial random walk, the expected value of
38
S m 1 , given S m is
Ed S m 1 , S m pu (1 p) d S m .
pu (1 p) d e r t . (3.16)
Ec (Sm 1 ) 2 | S m ( S ') 2 p (Sm , m t;S', (m 1) t) dS'
0
2
e(2r ) t
(Sm ) 2 .
Varc S m 1 | S m Ec (Sm 1 ) 2 | S m ( Ec S m 1 | S m ) 2
2
e 2 r t (e t 1)(Sm ) 2 .
39
Vard S m 1 | S m (pu 2 (1 p) d 2 e 2 r t )(Sm ) 2 .
2
pu 2 (1 p) d 2 e(2r ) t
. (3.17)
(3.16) and (3.17) determine all the statistically important properties of discrete
random walk, the choice of another equation is arbitrary to some extent. There are
1
u (or ud 1 ), (3.18)
d
and
1
p . (3.19)
2
1
a. The case u .
d
In this case, u, d, and p are determined by equation (3.16), (3.17) and (3.18).
40
e r t d
p .
ud
2
e(2r ) t d 2
p . (3.20)
u2 d 2
2
e(2r ) t d 2
ud .
e r t d
2
(u d)(e r t d) e(2r ) t
d2
which gives
1 r t 2
e de r t 1 d 2 e(2r ) t d 2 ,
d
or
2
d 2 e r t (1 e(2r ) t
) d e r t 0 .
41
d 2 2 Ad 1 0 ,
1 2
where A (e r t e(r ) t ) .
2
Solving for d and using (3.18) to determine u and (3.20) to find p, which gives
e r t d
d A A2 1 , u A A2 1 , p .
ud
1
b. The case p .
2
1
If p , equations (3.16) and (3.17) yield
2
2
u d 2e r t , u 2 d 2 2e(2r ) t
.
2
(2e r t d ) 2 d 2 2e(2r ) t
,
or
2
4e 2 r t 4de r t 2d 2 2e(2r ) t
42
Which gives
2 2 1
d e r t (1 e t
1) , u e r t (1 e t
1) , p ,
2
where once again t cannot be too large due to the requirement u 1 and
0 p 1.
With the above result of the value of u,d and p, a binary tree of possible asset prices
could be built. Let S nm denote the n possible values of the asset at time step m with
S nm d m nu n S00 for n 0,1, 2,..., m and m 0,1, 2,.., M , where S00 is the current asset
price. The coefficient n represents the number of up jumps. Note that the total number
of lattice points growth quadratically with the number of time steps, which means that
a large number of time steps can be taken. After determining the values of asset price
S nm at all lattice points in the binary tree, the value of option at the expire date
t T with m M can be obtain according to the payoff function. For example, the
The next step is to move backwards down the tree and calculate the value of the
43
The present value of the option can be calculated by discounting the expected value
of the option at time step m t obtained from the values at time step (m 1) t using
This gives
For American options, the possibility of early exercise of an option can be easily
incorporate into the binomial model. The American option can be exercised at any
time t before maturity T, its payoff function is denoted by (S) . Then V (S, t) (S) , if
the option. The value of the option is the maximum of two possibilities, i.e.
The option prices need to be evaluated from the payoff functions in the case of
construction of the binomial tree, which implies that the memory requirements vary
quadratically with the number of time steps, as does the execution time.
44
4. C++ Code for the Algorithm
In this section, the implementation of LSM approach and Binomial methods in C++
This section provide a brief description of functions and variables used in the C++
project.
45
void InverseMatrix(matrix<double> m1, matrix<double> & m2);
double dt = T/N;
46
NormalDistribution(R);
CF=zero_matrix<double>(N+1, M);
start = clock();
vector<int> Jdx(C.size1());
MaxKC(X, Jdx, K, C);
vector<int> IJdx;
Corresponding(vec, Jdx, IJdx);
vector<double> XJdx;
47
vector<double> tempX(X.size2());
for(int j=0;j<tempX.size(); j++)
tempX(j)=X(0, j);
Corresponding1(tempX, Jdx, XJdx);
std::cout << "LSM--the option price is:" << Price << ",the time is(ms):
" << finish-start << std::endl;
}
The matrix R, matrix S and matrix CF are used to store the normal distribution, all the
simulated underlying asset price paths and the option cash flow paths, respectively.
48
boost::normal_distribution<double> nor_d(0.0, 1.0);
boost::variate_generator<boost::mt19937 ,
boost::normal_distribution<double> > myrandom(engine, nor_d);
r, double sigma, double dt) is introduced to simulate the underlying asset price paths,
49
End(matrix<double> m1,matrix<double> &m2,double K) to change the last row of
matrix CF to the option value at the expire date i.e. the value of payoff function
(S) max(E S, 0) :
Moreover, the key point of LSM approach is to estimate the continuation value and
find the optimal stopping time. First, set vector vec and Matrix X to store the location
and the value the underlying asset prices at a specific time step for all the
50
Count = 0;
for(int i = 0;i < S.size2(); i++)
{
if(S(x, i) < K)
{
vec(count) = i;
X(0, count) = S(x,i);
count++;
}
}
}
&m2, int x) to save the option price corresponding to in the money paths in the row
51
case 0:{
Laguerre(m1(0, i), temp);
break;}
case 1:{
Power(m1(0, i), temp);
break;}
case 2:{
Hermite(m1(0, i), temp);
break;}
}
Laguerre(m1(0, i), temp);
for(int j = 0; j < 3; j++)
{
m2(i, j) = temp(0, j);
}
temp.clear();
}
}
void AmericanOption::Laguerre(double current,matrix<double> &m)
{
m(0,0)=exp(-current/2);
m(0,1)=(exp(-current/2))*(1.0-current);
m(0,2)=(exp(-current/2))*1.0/2*(2-4*current+current*current);
}
52
Then, with the values stored in matrix R1 and matrix Y, the coefficient matrix a of
for(int i=0;i<m1.size1()-1;i++)
for(int j=i+1;j<m1.size1();j++)
{
double Proportion=m1(j,i)/m1(i,i);
for(int k=i;k<m1.size1();k++)
53
{
m1(j,k)=m1(j,k)-m1(i,k)*Proportion;
}
for(int k=0;k<m1.size1();k++)
{
m2(j,k)=m2(j,k)-m2(i,k)*Proportion;
}
}
for(int i=m1.size1()-1;i>=1;i--)
for(int j=i-1;j>=0;j--)
{
double Proportion=m1(j,i)/m1(i,i);
for(int k=m1.size1()-1;k>=i;k--)
{
m1(j,k)=m1(j,k)-m1(i,k)*Proportion;
}
for(int k=0;k<m1.size1();k++)
{
m2(j,k)=m2(j,k)-m2(i,k)*Proportion;
}
}
for(int i=0;i<m1.size1();i++)
for(int j=0;j<m1.size1();j++)
{
m2(i,j)=m2(i,j)/m1(i,i);
}
}
After that, determine the stopping rule by compare value of exercise immediately and
double K, matrix<double> m3), and set the elements representing time step when
54
matrix<double> m3)
{
for(int i = 0; i < m1.size2(); i++)
{
if(K - m1(0, i) > m3(i, 0))
vec1(i) = 1;
else
vec1(i) = 0;
}
}
Then, setting vector IJdx and Xjdx to store the location and value that option is
55
{
int count = 0;
for(int i = 0; i < vec2.size(); i++)
{
if(vec2(i) == 1)
count++;
}
vec3.resize(count, true);
count = 0;
for(int i = 0; i < vec2.size(); i++)
{
if(vec2(i) == 1)
{
vec3(count) = vec1(i);
count++;
}
}
}
Moreover, the following loop is used to update the data in matrix CF:
56
for(int j = 0; j < M; j++)
{
int position = isInVector(IJdx, j);
if(position > 0)
{
CF(i,j) = K - XJdx(position) > 0 ? K - XJdx(position): 0;
}else{
CF(i, j) = exp(-r*dt)*CF(i + 1, j);
}
}
}
Eventually, calculate the average of the discounted cash flows over all paths to get
double Price = 0;
for(int i = 0; i < M; i++)
{
Price += CF(1, i);
}
Price = exp(-r*dt)*Price/M;
The following code is the C++ implementation of using Binomial method to pricing
American option.
57
double u = A + sqrt(A*A - 1);
double p = (exp(r*deltat) - d)/(u - d);
double q = 1 - p;
}
}
58
F(g,h) = t1;
else
F(g,h) = t2;
}
double Price;
if(exp(-r*deltat)*(p*F(0, 0) + q*F(0, 1)) > 0)
Price = exp(-r*deltat)*(p*F(0, 0) + q*F(0, 1));
else
Price = K - S0;
Finish = clock();
std::cout << "Binomial--the option price is:" << Price << ",the time
is(ms):" << finish-start << std::endl;
}
The users of this project could choose the items they want to change from the list in
59
figure 4.1, or the option price will be calculated using the default values. The result will
60
5. Numerical Results
Besides, the American option is approximated for 70 exercise dates. The data in table
5.1 American option prices and running time simulated using 1000, 5000, 10000,
20000, 30000 stochastic processes respectively. The first row shows the 3
polynomial used. For Binomial method with the same parameters and 1000 time
61
As expected, for a specific type of polynomial, the option prices do not fluctuate
significantly, since the coefficient of each of these three polynomials with respect to
power functions form a nonsingular matrix, which implies that the span generated by
each of polynomial is identical to the one generated by power functions (Moreno &
Navas, 2001).
Notice that the option prices estimated using LSM approach are generally lower than
those calculated by Binomial methods, this is because that only 100 stopping points is
considered.
62
6. Conclusion
realistic example to pricing American put options as well. To compare the different
results of numerical methods for American option pricing, the binomial method is
However, the C++ project for the implement of the LSM technique is still inefficient in
some respects. The running time become much too long when the number of
simulation paths increase, thus the algorithm in C++ still need to be optimized in the
future. Moreover, the implementation should also be extended to include the pricing
For further research, LSM methods should compare the results with more other
approaches for American option pricing such as the traditional finite difference
63
References
Abramowitz, M., & Stegun, I. (1972). Handbook of mathematical functions (1st ed.).
University Press.
Choudhury, A., King, A., Kumar, S., & Sabharwal, Y. (2008). Optimizations in
Schwartz, 1--11.
Clément, E., Lamberton, D., & Protter, P. (2002). An analysis of a least squares
regression method for American option pricing. Finance And Stochastics, 6(4),
449--471.
Cox, J., Ross, S., & Rubinstein, M. (1979). Option pricing: A simplified
Föllmer, H., & Schied, A. (2002). Stochastic Finance (2nd ed.). Berlin: Walter de
Gruyter.
64
Glasserman, P. (2004). Monte Carlo methods in financial engineering (1st ed.). New
York: Springer.
Harrison, J., & Pliska, S. (1981). Martingales and stochastic integrals in the theory of
Kienitz, J., & Wetterau, D. (2012). Financial modelling (1st ed.). Chichester, West
Moreno, M., & Navas, J. (2001). On the robustness of least-squares Monte Carlo
Moreno, M., & Navas, J. (2003). On the robustness of least-squares Monte Carlo
107--128.
Peskir, G., & Shiryaev, A. (2006). Optimal stopping and free-boundary problems (1st
Rao, C., & Toutenburg, H. (1999). Linear models (2nd ed.). New York: Springer.
65
Sarwar, B., Karypis, G., Konstan, J., & Riedl, J. (2002). Incremental Singular Value
Wilmott, P., Howison, S., & Dewynne, J. (1995). The mathematics of financial
ukessays,. (2014). Comparing Binomial Tree, Monte Carlo Simulation And Finite.
http://file:///C:/Users/apple/Downloads/ukessays.com-Comparing_Binomial_Tree_Mo
nte_Carlo_Simulation_And_Finite.pdf
66