Pricing American Options with Non

 Pricing American Options with Non­Negative Constrained Least Squares A White Paper by Visual Numerics, Inc. April, 2010 Visual Numerics, Inc. 2500 Wilcrest Drive, Suite 200 Houston, TX 77042 USA www.vni.com Pricing American Options with Non-Negative Constrained
Least Squares by Richard J. Hanson, Charles Riedhauser 1 © 2010 by Visual Numerics, Inc. All Rights Reserved Printed in the United States of America Publishing History: Written November, 2009 – April, 2010 Trademark Information
The Rogue Wave Software name and logo, the Visual Numerics name and logo, SourcePro, Stingray, HostAccess,
IMSL and PV-WAVE are registered trademarks of Rogue Wave Software, Inc. or its subsidiaries in the US and other
countries. JMSL, JWAVE, TS-WAVE, PyIMSL and Knowledge in Motion are trademarks of Rogue Wave Software,
Inc. or its subsidiaries. All other company, product or brand names are the property of their respective owners.
IMPORTANT NOTICE: The information contained in this document is subject to change without notice. Rogue Wave
Software, Inc. and Visual Numerics, Inc. make no warranty of any kind with regard to this material, including, but not
limited to, the implied warranties of merchantability and fitness for a particular purpose. Rogue Wave Software, Inc.
and Visual Numerics, Inc, shall not be liable for errors contained herein or for incidental, consequential, or other
indirect damages in connection with the furnishing, performance, or use of this material.
1
Pacific Gas and Electric Company, San Francisco, CA. This material does not reflect the views or conclusions of the
Pacific Gas and Electric Company. Abstract The problem of pricing American options remains an interesting one because there is typically no closed form solution. The American option problem may be formulated as a differential linear complementarity problem (LCP). Standard variable transformations convert the differential LCP to a form analogous to the 1‐d heat equation. Finite difference methods lead to a set of matrix LCPs at each time step. Traditionally, these LCPs have been solved via iterative techniques. In this paper we explore the use of a direct solver for the matrix LCP. We first show that the LCP may be converted into a nonnegative constrained least squares (NNLS) problem. The direct solver takes advantage of the special structure of this problem. The result is an exact solution for the LCP achieved in a finite number of steps. We demonstrate with some examples that the NNLS method can be significantly faster than a commonly used iterative algorithm, the projected successive over‐relaxation method. Source code for the direct solver is made available. About the Authors Dr. Richard Hanson, Ph.D. is a Senior Scientist at Visual Numerics. His major project responsibilities include technical supervision, project management, and involvement in the full cycle of software development. For the past twenty‐five years, Dr. Hanson has served on the IFIP WG 2.5 Committee on Numerical Software. Charles Riedhauser is Director, Quantitative Analysis at Pacific Gas and Electric Company, PG &E. He is the head of the Quantitative Analysis group which is responsible for contract valuations and portfolio analysis.
TABLE OF CONTENTS 1 Introduction …………………………………………………………………. 2 Derivation of the NNLS Approach………………………………….. 3 The American Cash‐or‐Nothing Put………………………………… 4 The American Vanilla Put………………………………………………. 5 Conclusion…………………………………………………………………….. 6 References…………………………………………………………………….. A Analytic Solution for Cash‐or‐Nothing American Put Option B Boundary Conditions and Intrinsic Values……………………… C Discretization of the Differential LCP……………………………… D Solving NNLS Bidiagonal Systems………………………………….. 1 2 4 8 9 10 10 13 15 17 Richard J. Hanson
Charles Riedhauser
1 Introduction
The problem of pricing American options remains an interesting one because there is typically no
closed form solution. Thus, numerical methods or direct simulations are used to approximate the
solution. While simulation techniques have become popular in recent years, for lower dimensional
problems, finite-difference (FD) techniques offer fast, rigorous, and highly accurate solutions.
In FD approaches, both the price and time dependence are represented on a discrete grid. The
standard approach involves solving a matrix linear complementarity problem (LCP) at each time
step. The solution typically involves some form of iterative method with projected successive
over-relaxation (PSOR) being one of the most popular. This paper explores the use of a direct
solver method, constrained least squares [1], to solve the numerous LCPs that make up an
American option pricing problem. In particular, we consider the use of non-negative least squares
(NNLS) as a solution method and compare its performance to a conventional implementation of
PSOR.
From a practical standpoint, the PSOR method can suffer from some significant limitations. The
choice of an optimal or even good relaxation parameter ω is problem specific and often difficult to
determine. While a choice of 0 < ω < 2 will guarantee convergence, it is guaranteed only in the
limit as the number of iterations approaches infinity. The practitioner must decide, for any given
problem, how many iterations are sufficient for the desired accuracy. In practice, an accurate,
stable solution may then lead to long execution times. In contrast, the direct NNLS algorithm
has no free parameter (such as ω) to be determined. It has the theoretically attractive feature
that it provides an exact solution (within the working precision) to the LCP in a finite number of
iterations. The practical advantage is an algorithm that can be substantially faster than PSOR. (A
limitation of NNLS, related to its initialization, is discussed in Section 3.)
The next section provides a derivation of the NNLS problem as applied to a typical American
option pricing problem. The third section applies both PSOR and NNLS to the valuation problem
of an American cash-or-nothing (CON) put. The American CON call and put are some of the
few American options for which a closed form solution exists. This provides a useful test bed
to compare PSOR and NNLS solutions. The fourth section investigates the application of both
methods to the conventional or “vanilla” American put. A short conclusion section ends the paper.
1
2 Derivation of the NNLS Approach
A derivation, following [1], showing how the American option problem may be cast as a
non-negative least squares problem is provided in this section. As a purely illustrative example, we
will consider options written on a futures contract although the methods can easily be generalized
to other asset classes. In addition, we assume a time-independent interest rate and volatility. This
is not required and Reference [8] discusses the transformations necessary in the time-dependent
case. Assuming a constant interest rate and volatility will allow us to compare our finite-difference
solutions to an exact solution in the next section.
Consider a put option on a futures contract with price F (t) at time t ≥ 0. The option, with value
P (F, t), expires at t = T , which is prior to the futures maturity date. Standard arbitrage arguments
[8, Chapter 7] show that an American put satisfies the differential LCP
∂P
1
∂2P
+ σ 2 F 2 2 − rP ≤ 0
∂t
2
∂F
P − Pe(F, t) ≥ 0
µ
¶
³
´
∂P
1 2 2 ∂2P
e
P −P ·
− rP
= 0
+ σ F
∂t
2
∂F 2
(2-1a)
(2-1b)
(2-1c)
where σ is the volatility, r is the continuously compounded interest rate, and Pe(F, t) is the intrinsic
value which, of course, depends upon the particular option being considered. LCP (2-1) should
also be supplemented with expiry and boundary conditions. At expiry,
P (F, T ) ≥ Pe(F, T )
(2-2)
P (0, t) = Pe(0, t)
(2-3)
P (∞, t) = 0.
(2-4)
while the boundary conditions may be expressed as
and
In this paper, we will be interested in two types of put options: the cash-or-nothing (CON) put and
the vanilla put. Suppose H is a strike price. The CON put is characterized by the intrinsic value
PeCON (F, t) =
½
1
0
F ≤H
.
F >H
(2-5)
By a “vanilla” put, we simply mean the traditional put with intrinsic value
Pevan (F, t) = max (0, H − F ) .
(2-6)
2
Prior to discretization, it is useful to convert to dimensionless variables. This is often recommended
to better understand the dependencies in the problem. First, define the dimensionless parameter
k=
2r
.
σ2
(2-7)
The dimensionless “spatial” and time variables (x, τ ) are then defined as
F = Hex
t = T − 2τ /σ 2 .
(2-8a)
(2-8b)
We also define a re-scaled option value U (x, τ ) as
P (F, t)
= ex/2−(k+1/4)τ U (x, τ ) .
e
P (0, t)
(2-9)
The set of transformations (2-7, 8, 9) is recommended to improve stability and convergence [8,
Sec. 18.7]. In terms of these variables, LCP (2-1) becomes
∂U
∂2U
≥ 0
−
∂τ
∂x2
e ≥ 0
U −U
¶
³
´ µ ∂U
2
∂ U
e ·
= 0
U −U
−
∂τ
∂x2
(2-10a)
(2-10b)
(2-10c)
e =U
e (x, τ ) is the corresponding intrinsic value. Appendix C shows that use of a fully
where U
implicit finite difference scheme allows us to convert (2-10) to a set of matrix LCPs
Zm ≥ 0
MZm − qm ≥ 0
T
Zm (MZm − qm ) = 0.
(2-11a)
(2-11b)
(2-11c)
e m where Um and U
e m are discrete
for m = 1, . . . , Mτ time steps. In (2-11), Zm = Um − U
e respectively. The superscript T indicates a matrix transpose.
approximations of U and U,
The matrix M and the vector qm are defined in Appendix C. Now, since M is symmetric
positive-definite1 , the matrix LCP (2-11) is equivalent to the quadratic program (QP) [7]
minimize
1 T
Zm MZm − qTm Zm
2
subject to Zm ≥ 0.
(2-12)
1
The presence of a drift term, that is, a first-order derivative in the valuation LCP (2-1) destroys the symmetry of M. The drift
term should first be removed via a transformation, such as decribed in [8]. The analysis can then proceed as in the body of this
paper.
3
Let the Cholesky factorization of M be
M = RT R.
(2-13)
Since M is tridiagonal, R is upper bidiagonal. If the vector hm solves the equation
RT hm = qm ,
(2-14)
the QP (2-12) may be expressed as
minimize
i
1h
(RZm − hm )T (RZm − hm ) − hTm hm
2
subject to Zm ≥ 0.
(2-15)
This, in turn, is clearly equivalent to the non-negative constrained least squares (NNLS) problem
RZm ' hm
subject to Zm ≥ 0.
(2-16)
The matrix problem defined by (2-14) and (2-16) is solved at each time step using a fast algorithm
which takes advantage of the sparse nature of R (see Appendix D). When we reach the final time
step m = Mτ , we have the option extrinsic value. The full option value is obtained by adding the
intrinsic value to ZMτ . If desired, one can transform back to the financial variables (F, t).
The next section compares the use of NNLS to a more conventional method of solution for
the American cash-or-nothing put option. This option possesses a closed form solution which
facilitates a rigorous comparison of the two methods. Section 4 compares the two methods for a
case in which an exact solution is not known–the American vanilla put.
3 The American Cash-or-Nothing Put
American cash-or-nothing (CON) options have the unusual characteristic among American options
of possessing an exact solution when the interest rate and volatility are constant (see Appendix
A). This makes them ideal for assessing the accuracy of various solution methods. In this section,
we consider the accuracy of both the projected successive over-relaxation (PSOR) method and
the non-negative least squares (NNLS) algorithm derived in the previous section. In particular,
we consider a CON put option on a futures price with a strike of H = 10. The option may be
exercised any time prior to expiry. When exercised, the option pays out $1 if F ≤ H and 0
otherwise. The volatility is 40% and the interest rate is 5%. There are 10 years to option expiry.
The τ -time dimension is discretized with 51 points. In the first case, we consider 201 spatial
grid points spanning from F = 0.1 to approximately F = 1000 for a mesh ratio of 7.54. With
the normalization assumed in (2-8a), the strike price occurs at x = 0. The x-spatial grid has
100 points equally spaced on each side of the strike. The choice of the relaxation parameter ω
is more problematic. Some authors [10] suggest a value of 1.0 as a safe choice, while others [9]
recommend 1.1. We will consider 1.0 along with a more aggressive value of 1.5. (We have not
considered adaptive schemes for the selection of ω. We expect that any serious user of PSOR will
investigate the choice of the relaxation parameter that best matches their specific problem.) The
PSOR algorithm is the standard one as described, for example, in [8].
4
A key feature of the specific NNLS algorithm is an input array of indices which provides a guess
as to where the vector Z is positive (see Appendix D for details). The guess, which need not be
exact, can significantly reduce the time needed to find a solution. Typically, one uses the solution
at one time step as a guess for the following time step. However, the guess at the initial time
requires some consideration. At τ = 0, we have Z0 ≡ 0 since the option value is equal to the
intrinsic value. The initial array of indices is that used by NNLS in solving the least-squares
problem at the first time step. A reasonable expectation is that, in general, the put option value
will become positive for futures prices greater than the strike and remain at the intrinsic value for
(most) futures prices less than the strike. For the CON put, the option value remains at the intrinsic
value for all prices less than the strike and for all time steps. Usually this is not the case and one
should consider the option to be valued when selecting the initial set of indices. The calculations
in this section all use an initial choice of indices assuming Z is positive for prices greater than the
strike. The runtime, although not the accuracy, can be sensitive to the choice of this initial array.
Figure 1 shows the CON put value as a function of futures price for both solution methods with
approximately the same runtimes. (The PSOR ω = 1.0 solution has a root sum square (RSS) error
that is about 40 times larger than the NNLS solution.) Note that the horizontal axis is in units of
dollars. That is, we have converted the solution back to the natural price variables, P (F, t). With
an increasing number of PSOR iterations, there is good agreement between the methods and with
the exact solution (not shown as it is visually the same as the NNLS solution).
American Cash-or-Nothing Put
Strike = 10, 10 years to expiry, 201 spatial points
1
Option Price ($)
0.8
0.6
0.4
NNLS
0.2
PSOR
w = 1.0
10 iterations
0
0
40
80
120
160
200
Futures Price ($)
Figure 1. Comparison of PSOR (ω = 1.0) and NNLS for American CON with similar runtimes.
NNLS solution is visually the same as the exact solution.
Figure 2 shows convergence of the PSOR value as a function of the number of iterations. The RSS
5
error is computed relative to the exact solution for both the NNLS and PSOR methods. Unlike
the PSOR method, the user of NNLS is not required to speculate on the number of iterations
needed. As the number of iterations increases, the PSOR solution error approaches that of the
NNLS solution ($0.016). Even though the NNLS algorithm can provide an exact solution to the
matrix LCP, there can still be differences with the exact option solution. The finite-difference
implementation introduces discretization errors and truncation errors at both spatial (price) end
points. These errors are introduced prior to solution of the LCP.
PSOR Root Sum Square Error for American CON Put
201 points, Mesh Ratio = 7.54, 10-year Expiry
0.8
Root Sum Square Error ($)
0.6
0.4
w = 1.0
0.2
w = 1.5
0
10
100
PSOR Iterations
Figure 2. Convergence of the PSOR method. Error is relative to the exact solution. The large
iteration limit is the same as that achieved by the NNLS method.
For timing considerations, the algorithms were coded with Intel’s Visual Fortran version 11.0 and
compiled in release mode. No specialized libraries were employed. The single-threaded compiled
code was run on a Dell Optiplex 755 with an Intel Core2 Duo CPU running at 2.40 GHz. The
NNLS solution took approximately 1.9 ms. The PSOR code runtime was relatively insensitive
to the relaxation parameter and was roughly linear in the number of iterations employed. Ten
iterations took 2.2 ms while 100 iterations lasted 20.5 ms. For the same accuracy, the PSOR
method took two to four times as long as the NNLS method, depending upon the choice of
relaxation parameter.
A second case used 1001 spatial grid points also spanning from F = 0.1 to approximately
F = 1000 for a mesh ratio of 189. Figure 3 shows the two methods for similar runtimes. (The
PSOR ω = 1.5 solution has a root sum square (RSS) error that is about 160 times larger than the
NNLS solution.) With more PSOR iterations, there is excellent agreement with the exact solution
for both methods.
6
American Cash-or-Nothing Put
Strike = 10, 10 years to expiry, 1001 spatial points
1
Option Price ($)
0.8
0.6
0.4
NNLS
0.2
PSOR
w = 1.5
10 iterations
0
0
40
80
120
160
200
Futures Price ($)
Figure 3. Comparison of PSOR (ω = 1.5) and NNLS valuation of CON put for similar runtimes.
NNLS solution is visually the same as the exact solution.
PSOR Root Sum Square Error for American CON Put
1001 points, Mesh Ratio = 189, 10-year Expiry
2
1.6
w = 1.0
Root Sum Square Error ($)
w = 1.5
1.2
0.8
0.4
NNLS RSS Error
0
10
100
1000
PSOR Iterations
Figure 4. Convergence of the PSOR method. Error is relative to the exact solution.
7
Figure 4 shows the convergence of the PSOR solutions to the NNLS solution as measured by
root sum square error. The NNLS method takes about 9.7 ms for a solution. As before, the
PSOR algorithm is roughly linear in the number of iterations and insensitive to the relaxation
parameter: 10 iterations lasted 10.3 ms and 100 iterations took 103 ms. For the same accuracy, the
PSOR method took 50 to 100 times as long as the NNLS method, depending upon the choice of
relaxation parameter.
4 The American Vanilla Put
We use the term “vanilla” to mean an option with the usual payoff. For the put, this is
max (0, H − F ). As in the previous section, we consider both the PSOR and NNLS algorithms
for solving this problem. Unfortunately, for our comparison purposes, an exact solution is not
available. We observe that in all cases, the PSOR solution converges to the NNLS solution. PSOR
runtimes are comparable to those for the CON option while the NNLS algorithm takes 2.3 ms for
the 201-point case and 29.5 ms in the 1001-point case. We see that for this more interesting option
pricing problem the NNLS method provides a faster solution than PSOR.
American Vanilla Put
Strike = 10, 10 years to expiry, 201 spatial points
10
Option Price ($)
8
6
4
NNLS
2
PSOR
w = 1.0
10 iterations
0
0
40
80
120
160
200
Futures Price ($)
Figure 5. Comparison of PSOR (ω = 1.0) and NNLS valuation of American vanilla put for
similar runtimes.
8
American Vanilla Put
Strike = 10, 10 years to expiry, 1001 spatial points
10
Option Price ($)
8
6
4
NNLS
PSOR
w = 1.5
10 iterations
2
0
0
40
80
120
160
200
Futures Price ($)
Figure 6. Comparison of PSOR (ω = 1.5) and NNLS valuation of American vanilla put for
similar runtimes.
We have used almost the same choice of the initial array of indices of positive Z elements as with
the CON put. In the 201-point case, we found better performance (faster run time) by assuming
the zero elements of Z extend three points beyond the strike and for the 1001-point case, one
element beyond the strike. While not necessarily intuitive, this emphasizes the sensitivity to the
initial conditions and reinforces our recommendation that the choice be tailored to the specific
problem under consideration.
5 Conclusion
In this paper we have considered an alternative method to the finite-differencing solution of
American options. As is usual, at each time step the valuation problem is cast as a matrix LCP.
We show that each LCP may be formulated as a nonnegative constrained least squares (NNLS)
problem. The set of NNLS problems are solved at each time step using a specialized direct solver
algorithm which takes advantage of the structure of the problem. In particular, we use the fact
that the NNLS problem is bidiagonal and that the solution at the previous time step can provide
useful information for the current time step. In all the cases investigated, the direct solver was
significantly faster than a traditional iterative approach. Furthermore, unlike iterative methods, the
NNLS algorithm does not require the specification of any free parameters or a stopping criterion.
When sensitivities, or Greeks, are computed via finite-differencing, the efficiencies from NNLS
may be even more advantageous. The NNLS approach appears to provide a highly competitive
approach to solving American option pricing problems.
9
6 References
[1] R. J. Hanson, “Evaluating American-Style Call Option Prices Based on Constrained Least Squares,” in Iterative
Methods in Scientific Computation IV, ed. by D. R. Kincaid and A. C. Elster, IMACS, 1999, pp. 381-389.
[2] C. Riedhauser, “A General Approach to Pricing Barrier Options,” May 15, 1996.
See http://207.67.203.54/elibsql05_P40007_Documents/QUANT%20DOCS/General_Barrier_Option_pge_ts.pdf.
[3] C. Riedhauser, “Single Barrier and Double Barrier Rebates,” July 21, 1997.
See http://207.67.203.54/elibsql05_P40007_Documents/QUANT%20DOCS/Barrier_rebates2_pge.pdf.
[4] C. Riedhauser, “The American Cash-or-Nothing Option,” September 18, 2001.
See http://207.67.203.54/elibsql05_P40007_Documents/QUANT%20DOCS/Am_CON_pge.pdf.
[5] A. P. Prudnikov, Yu. A. Brychkov, O. I. Marichev, Integrals and Series, Volume 1: Elementary Functions,
Gordon and Breach, 1986, p. 141, #1.3.3.20.
[6] P. Zhang, Exotic Options: A Guide to Second Generation Options, 2nd Edition, World Scientific, 1998, p. 407,
(15.6).
[7] R. W. Cottle, J.-S. Pang, R. E. Stone, The Linear Complementarity Problem, Academic Press, 1992, Chapter 1.
[8] P. Wilmott, J. Dewynne, and S. Howison, Option Pricing: Mathematical Models and Computation, Oxford
Financial Press, 1993.
[9] W. Shaw, Modelling Financial Derivatives with Mathematica, Cambridge U. Press, 1998.
[10] D. Tavella and C. Randall, Pricing Financial Instruments: The Finite Difference Method, Wiley, 2000.
[11] C. L. Lawson and R. J. Hanson, Solving Least Squares Problems, SIAM, 1995.
[12] J. Cantarella and M. Piatek, “tsnnls: A solver for large sparse least squares problems with non-negative
variables.” See http://www.jasoncantarella.com/downloads/papers/tsnnls/tsnnls.pdf.
[13] The source code for BIDIAG_NNLS may be found at: http://www.vni.com/company/whitepapers/bidiag_nnls.f90.
Appendix A. Analytic Solution for Cash-or-Nothing American Put Option
In the body of the paper, the American cash-or-nothing (CON) put option is used as a test case for
comparison with the non-negative least squares (NNLS) algorithm and the projected successive
over-relaxation (PSOR) algorithm. Since an exact solution exists for the American CON, it
provides a convenient test of the accuracy and efficiency of both finite-difference algorithms. A
derivation of the exact solution with certain, more than usual, details is given here. The subscript
“CON” is dropped in this appendix to simplify the notation. Only the CON put is considered in
this appendix.
Consider a put option on a futures contract with price F (t) at time t. The option, with value
P (F, t), expires at t = T , which is prior to the futures maturity date. While alive, the value
satisfies the partial differential equation (PDE)
∂P
∂2P
1
+ σ 2 F 2 2 − rP = 0
∂t
2
∂F
(A-1)
where σ is the constant volatility and r is the constant interest rate. If the futures price ever falls
below the strike H, the American CON put may be exercised with a payment of $1. Since the
amount of cash paid is fixed there is no benefit in continuing to hold the American CON once the
strike has been breached. As soon as the strike is hit, the option should be exercised. But, this just
describes the situation of a rebate common with barrier options. In particular, a down-and-out
10
rebate with payment at hit has the same financial description [3], and so must have the same value
as the American CON put at any time. At the level F = H we have the boundary condition (BC)
P (H, t) = 1.
(A-2)
At this point, it is convenient to introduce dimensionless variables x, τ , and k by
F = Hex
t = T − 2τ /σ 2
2r
k =
.
σ2
(A-3)
(A-4)
(A-5)
We also define a re-scaled option value U (x, τ ) as
P (F, t) = ex/2−(k+1/4)τ U (x, τ )
(A-6)
where U still has units of dollars. In terms of these new variables, the PDE (A-1) becomes
∂U
∂ 2U
=
∂τ
∂x2
(A-7)
U(0, τ ) = e(k+1/4)τ .
(A-8)
and the BC (A-2) is
The solution to (A-7, 8) is [3]
U (x, τ ) =
Z
0
τ
∂G
(x, τ |x0 = 0, τ 0 ) U (0, τ 0 ) dτ 0
∂x0
(A-9)
where G (x, τ | x0 , τ 0 ) is the Green function for the half-space [0, ∞) satisfying homogeneous
boundary conditions. It has the representation [2]
´
Θ (τ − τ 0 ) ³ −(x−x0 )2 /4(τ −τ 0 )
0 2
0
− e−(x+x ) /4(τ −τ )
e
G (x, τ | x0 , τ 0 ) = p
2 π (τ − τ 0 )
(A-10)
where the Heaviside step function Θ is defined as
Θ (t) =
½
1 if t > 0
.
0 if t < 0
Taking the derivative of G leads to
¯
∂G ¯¯
xΘ (τ − τ 0 ) −x2 /4(τ −τ 0 )
=
e
.
√
∂x0 ¯x0 =0 2 π (τ − τ 0 )3/2
(A-11)
(A-12)
11
Substituting (A-8) and (A-12) into (A-9) gives
xe(k+1/4)τ
√
U (x, τ ) =
2 π
Z
τ
0
2 /4(τ −τ 0 )
e−(k+1/4)(τ −τ )−x
0
The substitution
dτ 0
(τ − τ 0 )3/2
.
(A-13)
−1/2
ξ = (τ − τ 0 )
converts (A-13) to
Z
xe(k+1/4)τ
√
U (x, τ ) =
π
∞
√
1/ τ
(A-14)
2 ξ 2 /4−(k+1/4)/ξ 2
e−x
dξ.
(A-15)
At this point, we have several choices on how to finish the integration in (A-15):
1. We can use a symbolic computer program, such as Mathematica, to do the integration.
2. We can use the tabulated integral [5]
Z
∞
−a2 ξ 2 −b2 /ξ 2
e
z
√ n
i
h √
io
π 2ab h √
e N − 2 (az + b/z) + e−2ab N − 2 (az − b/z)
dξ =
2a
(A-16)
to finish (A-15).
3. We can use one or more change of variables to convert (A-15) to well-known expressions. We
will follow that path here.
If we let ν 2 = 4k + 1 and
√
z = (xξ − ν/ξ) / 2
then
e−νx/2+ν
√
U (x, τ ) =
2π
"Z
2 τ /4
∞
√
(x−ντ )/ 2τ
The additional change of variable
e
dz +
Z
∞
√
(x−ντ )/ 2τ
¡
¢1/2
y = z 2 + 2νx
in the second integral results in
e−z
2 /2
zdz
(z 2 + 2νx)1/2
#
.
(A-18)
(A-19)
Z
2
eνx/2+ν τ /4 ∞
2
√
e
dz +
e−y /2 dy (A-20)
√
√
2π
(x−ντ )/ 2τ
(x+ντ )/ 2τ
¶
¶
µ
µ
x − ντ
x + ντ
−νx/2+ν 2 τ /4
νx/2+ν 2 τ /4
+e
(A-21)
N − √
N − √
= e
2τ
2τ
e−νx/2+ν
√
U (x, τ ) =
2π
2 τ /4
Z
−z 2 /2
(A-17)
∞
−z 2 /2
12
which is the desired solution for U . Transforming to financial variables from (A-3, 4, 5, 6) gives
¶
ln (H/F ) + σφ(T − t)/2
√
P (F, t) =
N
σ T −t
¶
¶(φ+σ)/2σ µ
F
ln (H/F ) − σφ(T − t)/2
√
+
N
H
σ T −t
µ
H
F
µ
¶(φ−σ)/2σ
where
φ=
µ
√
8r + σ 2 .
(A-22)
(A-23)
(A-22) is equivalent to previous results [4, 6]. It is valid for F ≥ H, while for F < H,
P (F, t) ≡ 1. Note that we also easily verify that limF ↓H P (F, t) = 1.
Appendix B. Boundary Conditions and Intrinsic Values
In order to solve for either European or American option values, the boundary and initial
conditions must be known. To solve for American option values the intrinsic value must also
be identified. In this appendix, we summarize this information for the options considered in the
body of the paper in both (F, t)-space and (x, τ )-space. First consider the European CON put,
pCON (F, t). We introduce the transformed value u(x, τ ) via
1
pCON (F, t) = ex/2−(k+ 4 )τ uCON (x, τ ) .
(B-1)
Now, we know that for geometric Brownian motion (GBM), if the price F ever hits zero, it will
stay there and hence the option will pay $1 at expiry t = T . Hence we have the boundary condition
at F = 0:
pCON (0, t) = e−r(T −t) = e−kτ .
(B-2)
Using (B-1),
1
e−kτ = ex/2−(k+ 4 )τ uCON (−∞, τ )
(B-3)
or
uCON (−∞, τ ) = e−x/2+τ /4
(B-4)
where uCON (−∞, τ ) is shorthand for limx→−∞ uCON (x, τ ) . For large values of F , the put value
must approach zero, so
uCON (∞, τ ) = 0.
(B-5)
The intrinsic value peCON (F, t) is the value of the option if it could be exercised at time t. For the
CON put, this is $1 if F ≤ H, and zero otherwise. In terms of the transformed variables, this is
1
u
eCON (x, τ ) = e−x/2+(k+ 4 )τ
x≤0
(B-6)
and 0 otherwise. The initial condition is just this function at τ = 0:
uCON (x, 0) = e−x/2
x≤0
(B-7)
13
and 0 otherwise.
For the American CON put PCON (F, t), there is a pay out of $1 at t if the price F reaches 0. That
is, the boundary condition is
PCON (0, t) = 1.
(B-8)
In terms of the transformed variables, this is
1
UCON (−∞, τ ) = e−x/2+(k+ 4 )τ .
(B-9)
The intrinsic value and initial condition are the same as for the European CON put.
Consider now a European vanilla put with a pay off at expiry of
p(F, T ) = max(0, H − F ).
(B-10)
We transform to a dimensionless put value u (x, τ ) by
1
p(F, t) = Hex/2−(k+ 4 )τ u (x, τ ) .
(B-11)
As with the CON put case, if F ever reaches 0, it will remain there and the option will pay H at
expiry. The boundary conditions are
u (−∞, τ ) = e−x/2+τ /4
(B-12)
u (∞, τ ) = 0.
(B-13)
pe(F, t) = max(0, H − F )
(B-14)
and
The intrinsic value is
so the dimensionless value is
¡
¢
1
u
e (x, τ ) = e(k+ 4 )τ max 0, e−x/2 − ex/2 .
(B-15)
The initial condition is the intrinsic value at τ = 0:
¢
¡
u (x, 0) = max 0, e−x/2 − ex/2 .
(B-16)
The American vanilla put P (F, t) has a pay out of H at t if the price F reaches 0 at t. That is, the
boundary condition at 0 is
P (0, t) = H
(B-17)
while for large values of F,
P (∞, t) = 0.
(B-18)
14
In terms of the transformed variables, this is
1
U (−∞, τ ) = e−x/2+(k+ 4 )τ
(B-19)
U (∞, τ ) = 0.
(B-20)
and
The intrinsic value and initial condition are the same as for the European case.
Appendix C. Discretization of the Differential LCP
The differential LCP (2-10) can be converted to a set of matrix LCP by considering finite-difference
approximations to the derivatives. Suppose the function U(x, τ ) is sampled on an (x, τ )-grid
with spacings (δx, δτ ). In the time dimension, there are M grid points spanning from τ = 0 to
τ = 12 σ 2 T. In the spatial dimension, there are N points on each side of zero for a total of 2N − 1
points. The points are chosen so that the boundary conditions can be well approximated at the
points −Nδx and Nδx. We now define
Un,m = U(nδx, mδτ )
(C-1)
where the indices are m = 0, 1, . . . , Mτ and n = −N, −N + 1, . . . , N − 1, N. The initial
conditions we are interested in are non-smooth and so it makes sense to use a fully implicit
(specifically, a backward Euler, fixed step size) finite-difference method to ensure stability [9].
Other schemes may also produce acceptable results. However, our main interest is in the spatial
dimension and so we confine ourselves to the safe and simple fully implicit choice. The derivatives
are approximated as
∂U
Un,m − Un,m−1
≈
(C-2)
∂τ
δτ
for m = 1, . . . , Mτ , (the value of Un,m at m = 0 is given by the initial condition) and
∂2U
Un+1,m − 2Un,m + Un−1,m
≈
2
∂x
(δx)2
(C-3)
for n = −N + 1, . . . , N − 1 (the values of Un,m at n = −N and n = N are given by the boundary
conditions). Substituting these approximations into (2-10a) gives
(1 + 2α)Un,m − α (Un+1,m + Un−1,m ) − Un,m−1 ≥ 0
(C-4)
15
where the mesh ratio is α = δτ / (δx)2 . For a given m, consider the column vectors
Um
em
U
bm
⎞
⎛
U−N+1,m
..
⎟
⎜
.
⎟
⎜
⎟
⎜
= ⎜ U0,m ⎟ ,
⎟
⎜
..
⎠
⎝
.
UN−1,m
⎞
⎛
e−N+1,m
U
⎟
⎜
..
⎟
⎜
.
⎟
⎜
⎟
e
= ⎜
⎜ U0,m ⎟ ,
⎟
⎜
..
⎠
⎝
.
eN−1,m
U
⎛
⎞
U−N,m
⎜ 0 ⎟
⎜ . ⎟
⎟
= ⎜
⎜ .. ⎟ ,
⎝ 0 ⎠
UN,m
(C-5a)
(C-5b)
(C-5c)
e m is the discretized intrinsic value from (2-10). The tridiagonal matrix M (not to be
where U
confused with Mτ ) is defined with 1 + 2α along the diagonal and −α along both sub- and
super-diagonals. For each m, that is for each τ time step, we have a matrix LCP
MUm − Um−1 − bm ≥ 0
em ≥ 0
Um − U
´T
³
e
Um − Um (MUm − Um−1 − bm ) = 0.
e m and
Let Zm = Um − U
(C-6a)
(C-6b)
(C-6c)
e m−1 + bm − M U
e m.
qm = Zm−1 + U
(C-7)
Zm ≥ 0
MZm − qm ≥ 0
T
Zm (MZm − qm ) = 0.
(C-8a)
(C-8b)
(C-8c)
The matrix LCP is now in the standard form
16
Appendix D. Solving NNLS Bidiagonal Systems
In describing the computing algorithm2 , we simplify the notation for the core problem. This
problem, sticking close to (2-16), is the least-squares system Rn×n Z ' h, subject to all
components of Z ≥ 0. The matrix R is upper bidiagonal. It has all diagonal terms positive, so
it is of full rank. Solving this system can also be stated as computing Z ≥ 0 that minimizes
1
kRZ − hk22 . For the NNLS algorithm considered here, this latter statement is cast as a linear
2
complementarity problem (LCP)3 . Namely, compute Z and Y such that
V = RZ − h
T
Y=R V
Z≥0
Y≥0
ZT Y = 0
(D-1a)
(D-1b)
(D-1c)
(D-1d)
(D-1e)
Our development uses the work of Cantarella and Piatek (CP) [12]. What is novel in our version
of an algorithm for solving (D-1) is a reworking of the block principal pivoting algorithm of CP.
Their form of the algorithm contained a tolerance with a fixed value, 10−12 . This is used for
constraining components of Y and Z to be re-classified as having values of zero. Apparently,
the authors developed their ideas based on using IEEE double precision floating point. This
tolerance does not fit for working precisions based on IEEE single precision floating point or
the non-standard quadruple precision supported by some modern Fortran compilers. The CP
algorithm also contained a cycle-breaking step that required clarification. We have changed that
step to cyclically exchange variables with the largest index.
We are solving upper bidiagonal least squares system at each step. Certain of the components
of Z are constrained to be active, namely have the value zero (the constraint is binding). For
each sub-problem we use the technique of heavily weighting the active variables and solving the
tridiagonal system AZ ≡ (RT R + H)Z = RT h ≡ b for Z. The matrix H is diagonal and has
large positive values at entries corresponding to the active variables. Otherwise the diagonal terms
are zero for the non-active variables, namely those that may be non-zero. This idea is summarized
in Lawson and Hanson [11, Chapter 22]. That technique was first published by Powell and Reid,
Ref. (1968a), in Lawson and Hanson [11].
2
The NNLS algorithm discussed in [1] contained an error in the implementation of a primal algorithm. This has been
corrected with the primal-dual algorithm presented in this paper.
3
For the particular solution approach considered in this Appendix, the intermediate step of formulating the problem as a
constrained least squares problem is superfluous. One could work solely in terms of the LCP formulation.
In particular, with q and h defined by (C-7) and (2-14), respectively, one could factor (C-8) to get (D-1). Not all NNLS algorithms are
expressed in terms of an LCP (compare the algorithm in [11]) and so the constrained least squares formulation is useful.
17
This inner loop tridiagonal system is non-singular since R is non-singular and the diagonal matrix
H has non-negative values. Our solution method for the sub-problems AZ = b utilize the
square-root-free Cholesky method. Namely we compute the factorization A = U T DU, where U
is unit upper bidiagonal, and D is diagonal with positive diagonal terms. The solution is obtained
by consecutively computing Z ← U −T b, Z ← D−1 Z, and Z ← U −1 Z. Some of these operations
are combined for computing efficiency. Divide steps are replaced by reciprocals and subsequent
multiplication when this would result in efficiency. The floating point operation count for solving
each system is 2n − 1 divides and 7n − 6 adds or multiplies. There are no square-root operations.
We chose this algorithm because it yields the same structured problem at each iteration, but with
different diagonal terms for the matrix A. These details can be noted in the Fortran 90 subprogram
BIDIAG_NNLS [13].
We describe our changes to the CP algorithm. The algorithm is entered with a partition of the
integers {1, . . . , n} into sets F and G. At each step we maintain F ∪ G = {1, . . . , n}, and
F ∩ G = null. The set F represents the variables that are expected to be non-active, that is, strictly
positive. It is not necessary that F be correct, but having it close to correct is likely to result in
efficiency.
It is useful to start the algorithm in this form because the problem of (D-1) is often one member of
a sequence of similar problems. That is the situation in our application, of course. Often the sets
F or G do not change much as one integrates backward using the implicit one-step Euler method.
The CP algorithm started with F = null but it could be easily modified to accept F and G as
inputs.
Our criteria for convergence is based on computing the constraint violations α = kRkmin{Z :
Zi < 0} and β = kRk−1 min{Y : Yi < 0}. We consider the duality error or gap γ = α + β.
The following algorithm cycles until it achieves γ ↑ 0, which is equivalent to (D-1). When
−γ is sufficiently small we use (D-1a) and compute the residual vector norm at the solution,
kVk = kRZ − hk. Prior to achieving a small duality gap, the value of kVk may not correspond to
a feasible Z.
18
A pseudo-code implementation of the BIDIAG_NNLS algorithm follows:
D O INPUT CHECKING AND COMPUTE THE LARGE VALUE USED AS A DIAGONAL TERM IN H.
U SE THE INPUT SET F AND SOLVE FOR THE STARTING VALUE OF Z.
C OMPUTE THE STARTING VALUE OF Y.
S ET K = ∞ AND ENTER THE ITERATIVE ALGORITHM :
WHILE (T RUE )
C OUNT THE NUMBER , m, OF NEGATIVE VALUES IN Z AND Y.
I F m = 0 E XIT WHILE .
I F m < K THEN
K = m AND p = 3.
E XCHANGE ALL INFEASIBLE VARIABLES BETWEEN F AND G.
E LSE
I F p > 0 THEN
S ET p := p − 1 AND EXCHANGE INFEASIBLE VARIABLES BETWEEN F AND G
E LSE
E XCHANGE ONLY INFEASIBLE VARIABLE WITH LARGEST PERIODIC INDEX .
E ND IF
E ND IF
C OMPUTE Z, V, AND Y BASED ON THE CURRENT F .
C OMPUTE THE DUALITY GAP γ.
I F −γ ≤ τ E XIT WHILE .
END WHILE
C OMPUTE THE RESIDUAL NORM kVk.
S ET ANY NEGATIVE VALUES OF Z AND Y TO ZERO .
Some important comments about this algorithm are:
• During each traversal of the while loop, many entries for F and G can switch places. This is
the primary reason for the efficiency of this method. Contrast this to the algorithm NNLS of
Lawson and Hanson [11, Chapter 23, Section 3]. That method moves from one feasible Z to the
next, with reductions in kVk, or else convergence. For large problems with many components
of Z non-active, this is likely to be inefficient.
• There is a need to have a maximum iteration count for the number of times the while loop is
executed. We use a default value of 2n for this maximum, where n is the dimension of the LCP.
Typically this loop is traversed only a small number of times before the duality gap is small,
whence convergence. Occasionally, this default needs to be replaced by 4n for some problems.
When convergence has been achieved, the solution is the exact one to within the working
precision.
• Convergence of our algorithm has not been proved. One could propose a refinement that would
switch to using the NNLS algorithm of [11, Chapter 23, Section 3] after traversing the while
loop several times without convergence. This clean-up step would converge, and can be entered
using the positive entries of F for the non-active variables. We have not found this necessary in
any of our tests.
19
• We have removed the need to have tolerances on the values of Z and Y. In their place we have
a tolerance for the duality gap, τ . We use a default value of τ = (machine precision)1/2 , and
have found this to be satisfactory for our class of problems.
• The residual norm kVk is computed using values of Z that may have small negative values.
After setting such values to be zero, one could compute kVk again. We have not found this to
be necessary since it involves a small absolute error.
20