Numerical Methods for Contingent Claims Analysis of Investment Decisions by

advertisement
Numerical Methods for Contingent Claims Analysis
of Investment Decisions
by
James C. Meehan
MIT-EL 88-O1OWP
May 1988
NUMERICAL METHODS FOR CONTINGENT CLAIM ANALYSIS
OF INVESTMENT DECISIONS
by
James Carl Meehan
Submitted to the Alfred P. Sloan School of Management
on May 6, 1988, in partial fulfillment
of the requirements for the degree of
Master of Science in Management
ABSTRACT
In this thesis I examine the numerical methods used in
option valuation with analysis focusing on the more complex
options associated with investment decisions. Two options
implicit in many projects are identified and analyzed: i)
the option to halt construction of a project, and ii) the
option to shut down the production lines once the project is
complete. The partial differential equations governing the
values of these two options are derived, discretized, and
solved using numerical techniques.
Thesis Supervisor: Dr. Robert S. Pindyck
Title: Mitsubishi Bank Professor of Applied Economics
2
Acknowledgements
I wish to acknowledge the Center for Energy Policy
Research of the MIT Energy Laboratory for financial support.
I would like to thank my thesis advisor Robert Pindyck, my
reader Patricia O'Brien, Max Senter, and Rich Bernius for
their comments and suggestions.
I wish to thank Marcy Abelson for her patience and
understanding throughout the process.
I also thank my
parents for their love and support during my five years at
MIT.
3
1.
Introduction
Since the publication of the seminal paper by Black and
Scholes in 1972 [2], contingent claims analysis has been one
of the most studied topics in finance.
The purpose of my
thesis is to show how contingent claims analysis can be
applied to the valuation of investment decisions which often
include imbedded options.
Many investment decisions have options-like
characteristics which are ignored when standard discounted
cash flow (DCF) methods are employed in the valuation of
projects.
These implicit options can often significantly
impact the valuation of a project as has been shown in Majd
and Pindyck [7], McDonald and Siegel [8,9], and Myers and
Majd
[11].
The value of this thesis lies in the extension of
current models which incorporate contingent claims analysis
in investment decision making.
I will focus on the
numerical methods used in solving the equations arising from
these models.
The importance of a methods paper such as
this is that as models grow in complexity, analytical
solutions are often unavailable, and
numerical analysis
must be employed to estimate solutions.
In this thesis, I will concentrate on a problem which
exhibits two different types of options characteristics and
explain how numerical methods are used to value the
contingent claims.
The problem can be broken down so that
4
each of the options can be analyzed with relatively
straight-forward numerical techniques.
The problem is also
one in which the deficiencies of DCF methods are readily
apparent.
In Section 2 I will describe the general nature of the
problem, and I will give a specific example of a project
which can be analyzed using these methods.
In Sections 3
and 4 I will provide a complete analysis of each part of the
problem.
These two sections will be broken down into
subsections each of which will focus on a specific aspect of
the problem.
In Subsections 3A and 4A I will derive the
partial differential equations (PDEs), from which most of
the analysis proceeds in the literature.
Subsections 3B and
4B will focus on the transformation and discretization of
the PDEs used to obtain finite difference approximations of
the PDEs.
In the C Subsections, I will explore the
numerical methods used in solving the finite difference
equations.
2.
Section 5 will conclude.
The Problem
Suppose a firm is deciding whether or not to invest in
a project with the following characteristics:
1) spending decisions and associated cash outlays occur
continuously over time,
2) there is a maximum rate at which the cash outlays
can be productively spent over time,
5
3) there are no cash inflows from the project until
construction is complete,
4) capital in place has no alternative use and thus no
salvage value,
5) the size of the project is fixed, i.e. there exists
no flexibility to build half a factory or two
factories,'
6) construction can be stopped and started again
costlessly, and,
7) the capital markets are sufficiently complete so
that the completed project will not affect the
opportunity set available to investors.
A project which exhibits these characteristics includes
an embedded option that is ignored in DCF analysis.
More
precisely, the decision to invest in the project at any
given time is like a compound option.
For example, assume
that in any period, I have the option to invest one million
dollars in a project that is currently ten million dollars
from completion.
If I invest this period, then next period
I have the option to invest one million dollars in a project
that is currently nine million dollars from completion.
If
I choose not to invest this period, then next period I would
have exactly the same option as I have this period.
1 This
As we
is another option which can be valued using
methods similar to those described below; however, we will
ignore this option in our analysis.
6
shall see this option can be valued independently of the
other underlying option that we will study.
In addition to the above assumptions, suppose that the
project, once completed:
8) produces a good which has an observable price in a
competitive market,
9) produces a good with a constant, known marginal cost
10) can be shut down if the price of the good falls
below marginal cost, and re-started later
costlessly, and
11) has a known
life expectancy
of T.
The economics of this option value is readily seen from
assumption (10), and adds to the value of a completed
factory.
The above set of assumptions may seem overly
restrictive; however, some of the restrictions serve only to
simplify the analysis and can be relaxed.
To frame the problem in more concrete terms, as well as
to build a base case scenario with which to later test the
numerical methods, consider a firm that is trying to decide
whether to build a widget factory which will take a minimum
of five years to complete.
By a minimum completion time of
five years, I mean that if construction were to proceed at
the maximum possible rate and not stop, the factory would be
complete in five years.
7
Suppose, for example, that the widget factory were only
half completed and the price of widgets were to drop to one
tenth of the variable cost to produce widgets.
It may make
sense for the firm to treat the half completed factory as a
sunk cost and stop investing in the project.
A value
maximizing firm will value this option to halt construction
in much the same fashion that financial options are valued.
This implies that the firm will demand that the price of
widgets be at some value above the variable cost of
production before it will invest in a given period.
This option to halt construction and restart it makes
the time it takes to complete a widget factory dependent on
the price evolution of widgets, and thus uncertain.
I will
suppose, though, that a completed widget factory has a
useful life of 10 years, independent of the number of years
for which it is actually profitable for the factory to
produce widgets.
An important difference between the two
parts of the problem is that the time it takes to complete
the factory is uncertain due to the uncertainty of price
evolution, whereas the useful life of the factory is known
with certainty once construction has been completed.
Lastly, I will take the marginal cost of producing
widgets to be a constant $1, the maximum rate of investment
in a widget factory to be $1 million per year, and the
maximum rate of production of widgets to be 1 million per
year.
8
We assumed above that the price of the good, in our
example the price of widgets, is exogenous.
We will also
assume that price evolves according to:
dP = (
- 6)Pdt + oPdz
(1)
In other words, the price of widgets follows geometric
Brownian motion, also known as the diffusion process, where
dz is the increment of the Wiener process.
The parameter
is the total rate of return demanded by the market for
holding widgets and includes an appropriate risk premium.
As can be seen from (1), the rate of growth of P is
less than
by an amount 6, which corresponds to the
convenience yield, or rental rate, realized by holding
widgets in reserve.
The convenience yield on a commodity is
similar to a dividend paid on common stock, as it is the
return from holding the asset which when added to the
capital appreciation of the asset gives the total return.
The assumption that the price of widgets is exogenous, along
with the need to further assume that widgets can be shorted
makes the analysis especially well-suited to handle projects
which produce commodities.
The option to halt construction is the same as in Majd
and Pindyck's time-to-build paper [7] where the price of the
underlying good has replaced the value of a completed
factory as the exogenous state variable.
The problem is
still one of optimal control of investment decisions leading
to the completion of the project.
9
Their model estimates the
value of flexibility implicit in projects which require a
period of time to be built and provides an optimal decision
rule which gives the minimum value needed for investment to
occur over time.
Since we assume price, not value, is exogenous, the
valuation of the flexibility associated with time-to-build
and the derivation of the optimal decision rule will
encompass the second part of our problem.
The first problem
is to calculate the value of a completed factory.
To do
this we will draw on McDonald and Siegel's valuation model
of the option
They argue that since the
to shut down [9].
firm can decide to shut down at any time during the life of
the project, the value of a completed factory is equivalent
to the value of an infinite number of options to produce.
Summing the value of these options will give the value of
the completed project that takes into account the option to
shut down.
3.
Modeling the Option to Shut Down
Given that a completed widget factory exists, how much
is it worth?
[0, T], the firm has the
At every time
option to produce widgets
or to shut the factory down.
I
will write the value of this option for any price level and
time prior to maturity as:
C = C(P(t),T
On the "maturity date"
- t)
the value of the cash flow,
10
(2)
and the
r(P(r)), depends upon the price of widgets at time
marginal cost of producing widgets MC.
This future cash
flow is:
(3)
i(P(T)) = max[O, P(T) - MC]
per widget produced at time
.
For 6 > 0 McDonald and Siegel [9] show that the present
value of this claim on future earnings, conditional on
information at time O, corresponds to the value of a
European call option on a stock paying a continuous
proportional dividend of 6 expiring at time
.
They also
show that the value of a completed project is obtained by
summing the values of the individual claims:
V(P(O)) =
(4)
C(P(O),)d
The first subsection will go through the steps used to
replicate the individual claims on the future cash flows;
however, keep in mind we are really interested in the total
value of the project given by (4).
3a.
Replicating the Option to Shut Down
Suppose you construct a portfolio W consisting of an
option to produce one widget at time
, and short C,
widgets, where subscripts denote partial derivatives:
(5)
W = C - CP
Total differentiation of (5) gives dW = dC - CdP;
the portfolio W includes a short position of C
however,
widgets.
In
order to short, restitution of the convenience yield must be
11
made to the party from which the widgets were borrowed.
Thus, the amount 6PCpdP must also appear in the equation
describing the change in the value of the
portfolio
W:
dW = dC - CdP
- 6PCpdt
(6)
By Ito's Lemma we know:
dC = -Ctdt + CdP
2 Cppdt
oa2p
+
(7)
The first two terms in the right-hand side of (7) appear
from non-stochastic differentiation of (2).
The third term
arises from the stochastic process assumed on P.
Substituting
(7) into (6) yields:
dW = [o02 p2
C
(8)
6PCp - Ct]dt
-
The important characteristic of (8) is that the terms
involving dP have dropped, and with them the uncertainty
involving the change in the value of the portfolio W.
This
implies that the portfolio should earn a riskless rate of
return over any time period:
(9)
dW = rWdt
where r is the continuously compounded riskless rate of
return.
Substituting
(9) into (8) yields:
rW
=
-
a2p2Cpp
PCp - Ct
(10)
Substituting (5) into (10) and rearranging gives the oft
seen second order PDE:
½f2 p 2 Cpp
+
(r - 6)PCp - Ct
12
-
rC = 0
(11)
The call price must satisfy (11) for every price and
for each point in time.
The equation is subject to the
following boundary conditions:
C(P(T),O) = max[O,P(T) - VC]
(12a)
C(O,T - t) = 0
(12b)
- t) = e6 (t -
lim C(P(t),T
P-+
)
(12c)
Condition (12a) states that at expiration, the call
expiring at time T is either worthless, or worth the
difference between the prevailing price P(T) and the
variable cost to produce.
Condition (12b) states that if
the price drops to 0 the call is worthless.
Condition (12c)
states that as the price of the underlying asset gets very
large, the value of the option to not produce goes to zero,
and the value of the option to produce the underlying asset
grows at the fair market rate discounted by the convenience
yield.
McDonald and Siegel [9] show that (11), subject to the
boundary conditions (12a) - (12c), has a closed-form
solution given by:
C(P(O),T) = P(O)ed,
6
TN(d1 ) - VCe-rTN(d 2 )
[ln(P(O)/VC) + (r - 6 + %
d2
d
-
)]do t
JT
(13)
(13a)
(13b)
where N(x) denotes the area under the standard normal curve
between -
and x.
However, no closed-form solution to (4)
exists unless the project is infinitely lived.
Given that T
is finite, the solution to (4) would normally proceed as an
13
approximation of the left-hand side of (4) using the righthand side of (13).
The approximation involves numerical
integration of the area under the standard normal curve.
I will present an alternative method for approximating
the left-hand side of (4) using finite differencing
techniques.
The reason for this approach is twofold; the
simplicity of (13) will provide a good example to illustrate
the numerical methods before attempting more difficult
models, and the approximations obtained using the numerical
technique can be directly compared to the closed-form
solutions to estimate how quickly the numerical method
converges.
3b.
Transformation and Discretization
There are two things which we hope to accomplish
through
a transformation
of (11).
The first is to write
dimensionless, or unitless, equation.
a
By doing this we are
left with a simple, but very general form devoid of
unnessary symbols and units.2
To accomplish this in (11)
we divide everything currently denominated in dollars, i.e.
C, P, MC, by the marginal cost MC, which is analogous to the
strike price of a financial option.
The second goal of the transformation is to eliminate P
from the coefficients of the partial derivative terms in
2 For
more on dimensionless forms and a more indepth
coverage of numerical methods see Ames [1].
14
(11).
I will describe why this elimination is desirable
from a numerical perspective in the next subsection.
Ignoring the reason for a moment I will employ the following
3
transformation:
C(P(t),
- t)
X
where
(MC)D(X,T
- t)
(14)
(14a)
ln(P/MC)
and the variable cost VC has been normalized to 1.
Notice
that since C(P(t),T - t), MC, and P are denominated in
dollars, D(X,T - t) and X are dimensionless.
(14) we find:
Differentiating
(15)
Cp = DxMC/P
2
Cpp = [DXX - D]MC/P
(16)
(17)
Ct = DMC
of (15) - (17) into (11) and (12a) - (12c)
Substitution
gives:
½o2 DX
+ (r -
6 -
22
)Dx
- Dt
- rD = 0
(18)
Subject to:
D(X,O)
= max[0,ex
(19a)
- 1]
(19b)
lim D(X,T - t) = 0
X
-o
= e 6 (t - t)
lim e-XD
X-+
Notice
that all of the coefficients
side of (18) are constant.
(19c)
of the left-hand
By applying the transformation
(14), we have succeeded in writing a unitless equation with
3 Brennan
paper
and Schwartz use this transformation in their
[3].
15
constant coefficients.
An equation that is to be solved
numerically should exhibit these two properties at a minimum
before the methods to be described below are applied.
Recall from calculus the following Taylor expansions:
D(X + X) =
2 + (1/6)Dx..X
3 + O(X4 )
D(X) + DX + DXX.X
(20)
D(X - X)
D(X) - DX + D.XX
2
3 +
- (1/6)D...X
(X4)
(21)
To obtain a finite difference approximation to (18) we will
discretize the function D(X,r - t) as follows:
D(X,T - t) = D(iAX,jAt) = D,j
(22)
By subtracting (21) from (20) and rearranging we obtain
as an approximation
to D.:
D.--(DLj -D 1,j)/X
By adding (20) and (21) we can approximate D.
D. .
(D.+,j
- 2Dij
+ D,_,j
)/(AX)
(23)
as:
(24)
Finally, to obtain a forward difference approximation of Dt,
we can write
the same Taylor
expansion
as in (20), but for t
which gives:
Dt
(Di,j.1
- D,j)/At
(25)
Applying these particular discretizations to (18) with
some rearranging gives:
= cDi.l,j
Di,j+l
with
k
t,
h
+ coDi,j + c 1Di 1,j
X,
R - k/h2
2 + h(r - 6 - o2 )]
c, = R[ld
c, - 1 - R2 - kr
16
(26)
(26a)
(26b)
(26c)
- h(r - 6 -
c 1 =-R[a2
2 )]
(26d)
As can be seen from (26) any value Di,j.1
in terms of Di,j.
This method
is classified
can be solved
as an explicit
method in numerical analysis since any value can be
calculated explicitly from values already known.
The most
desirable property of the coefficients of (26) is that they
do not depend on i or j.
The importance of this properties
will be addressed in the next section where I will focus on
the numerical methods used to solve (26).
3c.
Numerical Method
Perhaps the main theme of numerical analysis is
convergence.
Convergence requires that the solution to
(26) approach the solution of (18) using boundary
conditions (19a) - (19c), as both h and k go to 0.
Proving
the convergence of a numerical method is equivalent to
showing that the method is both consistent and stable.
Stability of a method is guaranteed if the error associated
with the numerical solution does not grow with the number of
steps required to arrive at the solution.
In other words,
any roundoff error introduced in computing the values of the
option at the boundaries must be bounded as both k and h
decrease.
Numerical solutions obtained by unstable methods
are of no value, since errors soon swamp the solution of the
finite difference equation.
17
A numerical method is consistent if in the limit as h
and k go to 0, the finite difference equation is no longer
an approximation of the partial differential equation, but
is exactly the same as the PDE.
Most finite difference
approximations are derived to ensure consistency; however,
an excellent example of inconsistency in a reasonably
derived finite difference equation is given in Ames, p. 62
[1].
In Ames' example the difference equation approximating
one PDE converges to the solution of another PDE even though
a stable numerical method was employed.
Our explicit method is easily shown to be consistent.
If we subtract (26), which is the approximation to (18)
obtained by approximating the derivative terms using (23) (25), from the exact representation
expansions
[-%½a/12
of (18) using the Taylor
(20) and (21), we get:
- (r - 6 - ½o 2 )/6]X2D ,,z
+
tDt + O(X4
+
t2 )
(27)
which approaches 0 as both X and t approach 0.
Stability is guaranteed provided that the sum of the
coefficients of the right-hand side of (26) is less than or
equal to one, and that the coefficients are all positive.
By adding (26b), (26c), and (26d) we see that the sum of the
coefficients of (26) is less than or equal to one.
From
(26b) - (26d) it can also be seen that two restrictions on k
and h ensure that the coefficients are always positive:
h <
'2 /2r 18
6 - ~2
(28)
R < (1 - r)/o2
(29)
Notice that the stability conditions are simple functions of
the parameters and not of the state variables as they would
have been if the transformation had not eliminated the
dependence
of the coefficients
on P.
A good approximation to the left-hand side of (4) can
be calculated by numerically integrating (26) over the range
0 to T.
The result will be used as a boundary
condition
for
the second part of the problem to be described in the next
section.
The code for implementing the algorithm given above can
be found in Appendix A.4
Table 1 compares approximations of
the value of the option to produce one widget generated by
the code in Appendix A with the closed form solutions for a
given set of parameter values.
Table 1 includes option
values for three different price levels: MC, and the nearest
grid points to 10% above and below MC.
4 All
results were obtained using programs written in
FORTRAN 77 for the IBM 4341. Appendix B contains an older
implementation of the algorithm that I wrote in TruBasic for
the IBM PC.
19
Table
r = 0.02
Yr
1
2
3
4
5
10
4.
6 = 0.06
1
o = 0.2
MC = 1
Price
1.0000
Actual Estimate
0.0585
0.0586
0.0702
0.0709
0.0747
0.0759
0.0760
0.0776
0.0754
0.0774
0.0634
0.0658
Price
0.9013
Actual
Estimate
0.0131
0.0250
0.0282
0.0381
0.0360
0.0451
0.0402
0.0488
0.0425
0.0506
0.0420
0.0471
k = 0.01
Price
1.1095
Actual Estimate
0.1106
0.1168
0.1190
0.1212
0.1203
0.1209
0.1184
0.1183
0.1148
0.1146
0.0899
0.0903
Modeling the Option to Delay Investment
We have solved above for the value of a completed
factory over a range of prices.
as a boundary
condition
to delay investment.
These values will be used
in the problem
of valuing
the option
First, I would like to give a general
description of the second part of the problem which examines
the value of the option to delay investment while in the
process of investment.
In the next subsection I will
discuss the boundary condition details.
Firms which are considering an investment program face
the following decision at any point in time: should they
invest today and get one step closer to a completed factory,
or should they delay investment?
In our simple model this
decision is based on two variables, the price of the good
which the factory produces, and the amount of money per unit
of good to be produced which still needs to be invested in
construction, which will be designated K.
20
It is useful to
view this decision as an option whose value I will designate
as F(P(t),K(t)).
I will use I(t) to represent the control variable which
is the rate at which the firm decides to invest at any time.
K is related to I in the following manner:
dK = -Idt
such that
(30)
K(0) = K,,.
(30a)
where I is bounded by 0 and some maximum rate i.
As was the case above, the economic idea motivating the
application of contingent claims analysis is straightforward.
In the analysis that follows, we hold that it is
not one decision which is being made to invest or not
invest; rather, that a stream of decisions need to be made,
taking into account any changes that have occurred in the
marketplace.
In short a decision to invest today does not commit one
to invest in the future.
What does happen; however, is that
a firm which invests today relinquishes the option value
which it enjoys if it does not invest today.
A firm will
invest in a given project if and only if the current option
is worth more exercised than not exercised.
From options theory we know that a call option is
always worth more unexercised than exercised unless the call
is written on a dividend paying stock.
As described above
the parameter 6 in the assumption of price evolution (2), is
similar to a dividend payout.
21
In fact, by assuming 6 > 0,
we have allowed for the possibility of the option to be
worth more exercised than not exercised.
For the case of
8 = 0, investment would never occur since the value of the
option to invest would grow at the same risk-adjusted rate
as the underlying asset.
4a.
Replicating the Option to Delay Investment
Drawing to a large extent on the above analysis,
consider a portfolio consisting of a long option to invest
in the project and short F
units of a completed project or
a portfolio which spans the completed project:
W = F - FP
(31)
The change in the value of the portfolio W is slightly
different from above.
Letting I represent the control
variable which is the rate of investment per unit of good to
be produced we can write:
dW = dF - FdP
- 6FpPdt - Idt
(32)
The first three terms of the right-hand side of (32) appear
for the same reason as they appear in (6); the last term is
the amount of investment which the firm makes during any
time period.
Majd and Pindyck [7] show that a firm which can
costlessly start and stop construction on a project which
does not expire (i.e. in 100 years the investment
opportunity will still exist) will either choose to invest
at the maximum rate i or not invest at all.
22
Using Ito's Lemma and the above fact we see that the
value of the option associated with the investment program
must satisfy:
O2 p2
P > P
Fpp + (r - 6)PFp - iF,, - rF - i = 0,
½2 p2 fp
+ (r - 6)Pfp - rf = 0,
where
P
P*
F(P,O) = V(P)
(33a)
(33b)
(34a)
lim F(P,K) = e6 K/i
P- oo
(34b)
f(O,K) = 0
(34c)
f(P*,K) = F(P*,K)
(34d)
fp(P*,K) = F(P* ,K)
(34e)
I have used f(P,K) to represent the value of the
investment program when P is below the critical value P*, so
that I could explicitly write the continuous condition (34d)
and the differentiable condition (34e) at the free boundary
P .
Equation (33b) has an analytic solution given by:
f(P) = aP"
a
[(2rc 2
+
(r -
6 -d2
)2 )
(35)
-
(r -
6
-_
2
)]/cr 2
(35a)
and the coefficient a must be determined along with the
solution for F in the upper region using the conditions
(34d) and (34e).
Notice that the solution
to (33b) is
independent of K.
Using (34d), (34e), and (35) we can write the free
boundary condition for the upper region as:
F(P*,K) = P*Fp (P*,K)/a
(36)
which will serve as the lower bound in the upper region.
23
4b.
Transformation and Discretization
The transformation which will be employed is necessary
for the same reasons as explained above; however, it is more
complex and will therefore be explained in steps.
Integrating (30) subject to the initial condition (30a)
gives:
t = (.x
- K)/I
(37)
Recall that (33a) describes the upper region in which
investment always occurs, which implies that the control
variable I is always chosen to be the maximum rate i.
Letting
F(P,K)
G(P,
equal the minimum completion time K ../i and
- t) we have:
ha 2p 2 Gp
+ (r - 6)PGp - Gt - rG - i = 0
(38)
which is the same as (11) except for the constant term i.
The form of (38) is more often seen in the literature than
(33a), and I believe it to be more natural since t has
replaced K as a state variable.
I will write (38) in dimensionless form, as above, by
dividing everything denominated in dollars by the marginal
cost of production.
Unlike the transformation used on (11),
which had to be kept rather simple in order to perform the
numerical integration, I further transform (34a) using:
G(P,
X
- t)
MCe-r tH(X,T - t)
(42/a)[ln(P/MC) - (r - 6 -
a2)t]
(39)
(39a)
The same theme is apparent if you compare (39) and (39a)
24
with (14) and (14a), and the additional complexity will be
justified below.
Differentiating (39) we obtain:
Gp = MCe-r t (2/(P))Hx
= MCe-rt (42/(oP2 ))[(T2/6)Hx
Gp
Gt
=
(40)
MCert
[-rH
Substitution
+ Ht -
(42/o)(r -
6 -
- H.]
(41)
o 2 )H.]
of (40) - (42) into (38), (34a),
(42)
(34b),
(36) gives:
- ier t /MC
Ht = H
lim exp[-rt
X oo
-
/
(43)
(ci/2
- (4
H(X,O) = e
VO (X)/MC
4
6 _ ½2 )t)]H (X,T - t) =
2 (X
+ (r -
(44a)
)'
H(X',
- t) =
2/(ca)H 1(X*,u - t)
(44c)
The most striking feature of (43) is its simplicity in
relation to (33a) gained by the transformations.
This
simplicity allows for numerical methods which when employed
lead to rapidly converging approximations, and which also
have broader application.
Again, using discretizations of the form of (22), (23),
(25), and the definition of the mesh ratio R in (26), yields
an approximation
Hi, j+
of the form:
= RHi+ 1 ,j + (1 - 2R)Hi j + RHi
,j - kier t /MC
(45)
In the next subsection I will discuss the numerical method
used to solve
(45).
25
4c.
Numerical Method
Equation (43) is the simple diffusion equation with the
addition of the last term which is a function of time.
The
simple diffusion equation has been thoroughly studied in
engineering disciplines, and (45) is known to be a
consistent approximation to (43).
To assure convergence
then we only have to prove stability.
The coefficients of the H terms in the right-hand side
of (45) are easily seen to sum to one.
In addition, the
coefficients will all be non-negative provided that the mesh
ratio R < .
This simple condition assures stability, and
therefore convergence.
Notice that the condition on the
mesh ratio R is no longer a function of the parameters of
the problem.
This allows for a general routine to be
written which will be stable for any set of parameters.
Also, Ames [1] shows that by setting R = 1/6, convergence is
obtained at a quicker rate due to the symmetry of the
numerical method.
Figure 1 shows the critical price for at every stage of
the investment project.
As expected the critical price is
well above the marginal cost of production before the
construction begins due to the lead time required for
construction.
As the project nears completion the critical
price approaches the marginal cost of $1.
26
critical price
oO 0o*+
b
o0* c)
0
b
t4
-
O
-
obb¼%
t
-
t.
-
t4 .6* t+
- o
bob
O
a
t*
tor
o3
4
3o
¼%~
00000 cb b
1
0
0B
1
b
3
, 0
a
oc
Cn
to
CD
a
CD
-S
-h
0
0
aoI
r
i
m CD b
0
b
a
0q
0
27
C
Figure 2 shows the value of a completed factory at the
critical price level over the investment period.
This value
is always seen to be above the present value of the amount
remaining to be invested.
NPV analysis suggests investment
if the present value of the completed project is above the
present value of the costs.
However, Figure 2 makes it
clear that by including the value of the option to delay
investment, a spread above construction costs is required
for investment to be optimal.
5.
Conclusion
I have thus far tried to avoid discussing the practical
problems encountered when applying these methods to "real
life" decisions, mainly to allow the focus to be on the
methods themselves.
In addition, I have made some overly-
restrictive assumptions which served to simplify the models
so that the most important aspects of the analysis might be
clarified.
For example, the assumption that the maximum
rate of investment for construction is constant over time
can be relaxed so that different investment profiles can be
accommodated.
One of the difficulties of applying the model to actual
investment decisions is the estimation of the parameters.
The same problem of estimating the appropriate o in the
future which exists in valuing financial options is also a
major issue in applying the above models.
28
value of completed factory (millions $)
44
44
44
*4
44
4
44
44
44
44
b
b
b
b
0
b
O
b
O
b
O
b
b
o
0
0
a
a
C
a
0
0
b
a
b
a
tot
O1
44
_ .
b
11
3
b
a
O_
.
0-T
a c
CD
-44
00
3
o
11
t
:3
-o
0
h
11
b
CDf
29
)
Appendix
C
C
C
A
PROGRAM TO INITIALIZE PARAMETERS AND PASS THEM TO SUBROUTINES
SHUTD AND BUILD FOR APPROPRIATE CRUNCHING. ALL DESIRED OUTPUT IS
HANDLED BY THE SUBROUTINES.
REAL K, MC, INV, INVR, PRICE(1000), FVAL(1000)
DATA DEL, R, SIG, XMAX, TMAX, MC /.06, .02, .2, 5., 10., 2./
DATA K, INV, INVR, CAPAC /.01, 5000000., 1000000., 1000000./
CALL SHUTD(DEL, R, SIG, XMAX, TMAX, MC, K, H, IMAX, PRICE, FVAL)
ISHIFT = NINT(-1.*(R - DEL - .5*SIG*SIG)*INV/(INVR*H))
H = H*SQRT(2.)/SIG
CALL BUILD(DEL,R,SIG,INV,INVR,CAPAC,MC,ISHIFT,H,FVAL,IMAX)
STOP
END
C
C
C
C
C
C
C
C
C
C
SUBROUTINE TO CALCULATE THE VALUE OF THE OPTION TO SHUT DOWN AND
SUMS THEM TO OBTAIN VALUE OF A COMPLETED PLANT,
GIVEN A SET OF PARAMETERS
DEL
-- PAYOUT RATE ON AN ANNUAL BASIS
-- RISKLESS RATE OF INTEREST ON AN ANNUAL BASIS
R
SIG
-- STANDARD DEVIATION ON AN ANNUAL BASIS
TMAX -- USEFUL LIFE OF THE PROJECT IN YEARS
XMAX -- SUITABLY LARGE NUMBER USED IN PLACE OF INFINITY
MC
-- MARGINAL COST OF PRODUCTION
K
-- TIME INCREMENT
C
RETURNS
C
C
C
C
H
PRICE
FVAL
IMAX
-----
STEP SIZE IN X
VECTOR CONTAINING PRICES CORRESPONDING TO FVAL
VECTOR CONTAINING VALUE OF A COMPLETED FACTORY
MAX INDEX USED IN FVAL AND PRICE
C
C
C
PRINTS THE VALUE OF THE OPTION TO SHUT DOWN FOR EVERY YEAR 0
THRU TMAX AND FOR THREE PRICE/MC RATIOS: .9, 1.0, 1.1
SUBROUTINE SHUTD(DEL,R,SIG,XMAX,TMAX,MC,K,H,IMAX,PRICE,FVAL)
REAL MC,K,PRICE(1000),FVAL(1000),OLDVAL(1000),NEWVAL(1000)
REAL MESHR,TABLE(3,21)
INTEGER II(3)
SIGSQ = SIG*SIG
H = SIG*SQRT(3.*K)
MESHR = 1./(3.*SIGSQ)
C
CHECK THE STABILITY CONDITIONS
IF (H.GE.SIG/ABS(R - DEL - .5*SIGSQ).OR.MESHR.GE.(1. - R)/SIGSQ)
* THEN
IFLAG = 1
GOTO 900
END IF
30
CALCULATE MAX X INDEX NEEDED FOR VECTORS. REMEMBER FORTRAN
DOES NOT ALLOW FOR NON-POSITIVE ARRAY SUBSCRIPTS.
C
C
IMAX = NINT(2.*XMAX/H) + 1
II(2) = (IMAX + 1)/2
II(1) = NINT(LOG(.9)/H) + 11(2)
11(3) = NINT(LOG(1.1)/H) + II(2)
DO 10 I = IMAX,1,-1
REALI = I - (IMAX + 1)/2
X = REALI*H
PRICE(I) = MC*EXP(X)
OLDVAL(I) = MAX(O.,EXP(X) - 1.)
10 CONTINUE
DO 20 L = 1, 3
TABLE(L,1) = OLDVAL(II(L))*MC
20 CONTINUE
COMPUTE COEFFICIENTS AND CALCULATE MAX T INDEX
C
C1 = .5*MESHR*(SIGSQ + H*(R - DEL - .5*SIGSQ))
CO = 1. - MESHR*SIGSQ - K*R
CNEG1 = .5*MESHR*(SIGSQ - H*(R - DEL - .5*SIGSQ))
JMAX = NINT(TMAX/K)
KINV = NINT(1./K)
WRITE(6,401) K, H, C1, CO, CNEG1, JMAX, IMAX
401 FORMAT(5(lX,F10.6),1X,I5,1X,I5)
DO 60 J = JMAX
C
C
- 1, 0, -1
CALCULATE THE NEXT VALUE OF THE OPTION AT INFINITY AND ADD THE
TRAPEZOID TO THE ESTIMATE OF THE INTEGRAL
*
REALJ = J
NEWVAL(IMAX) = C1*2.*H*EXP(XMAX + DEL*(REALJ + 1.)*K
- TMAX) + C0*OLDVAL(IMAX) + (C + CNEG1)*OLDVAL(IMAX - 1)
FVAL(IMAX) = FVAL(IMAX) + MC*(NEWVAL(IMAX) + OLDVAL(IMAX))*K/2.
ICOUNT = ICOUNT + 1
IF (ICOUNT.GE.KINV) THEN
JFLAG = 1
IYEAR = IYEAR + 1
END IF
CALCULATE THE NEW OPTION VALUE FOR EVERY POINT DOWN THE COLUMN
AND ADD THE NEW TRAPEZOID TO THE ESTIMATE OF THE INTEGRAL
C
C
*
30
DO 30 I = IMAX - 1,2,-1
NEWVAL(I) = C1*OLDVAL(I + 1) + CO*OLDVAL(I) +
CNEG1*OLDVAL(I - 1)
FVAL(I) = FVAL(I) + MC*(NEWVAL(I) + OLDVAL(I))*K/2.
CONTINUE
31
IF (JFLAG.EQ.1) THEN
DO 40 L = 1, 3
TABLE(L,IYEAR + 1) = NEWVAL(II(L))*MC
CONTINUE
ICOUNT = 0
JFLAG = 0
40
END IF
C
SWAP THE VALUES OF NEWVAL INTO OLDVAL
DO 50 I = IMAX,1,-l
OLDVAL(I) = NEWVAL(I)
50
CONTINUE
60 CONTINUE
WRITE(6,402)
(PRICE(II(I)),
I = 1, 3)
DO 70 J = 1, NINT(TMAX) + 1
WRITE(6,402)
402
(TABLE(I,J),
I = 1, 3)
FORMAT(3(1X,F9.6))
70 CONTINUE
900 IF (IFLAG.EQ.1) WRITE(6,499)
499 FORMAT('AN ERROR HAS OCCURRED')
RETURN
END
C
C
C
C
C
C
C
C
C
C
C
C
C
SUBROUTINE TO CALCULATE THE VALUE OF THE INVESTMENT PROJECT,
GIVEN A SET OF PARAMETERS
DEL
-- PAYOUT RATE ON AN ANNUAL BASIS
R
-- RISKLESS RATE OF INTEREST ON AN ANNUAL BASIS
SIG
-- STANDARD DEVIATION ON AN ANNUAL BASIS
INV
-- TOTAL AMOUNT NEEDED TO BE INVESTED FOR CONSTRUCTION
INVR
-- MAX YEARLY RATE OF INVESTMENT
CAPAC -- YEARLY CAPACITY
MC
-- MARGINAL COST
ISHIFT -- CONSTANT TO LINE UP TWO PARTS OF PROBLEM
H
-- STEP SIZE IN X DIRECTION
FVAL
-- TERMINAL BOUNDARY CONDITION
IMAX
-- MAX INDEX OF FVAL VECTOR
C
C
PRINTS THE CRITICAL PRICE FOR EVERY POINT IN TIME
SUBROUTINE BUILD(DEL,R,SIG,INV,INVR,CAPAC,MC,ISHIFT,H,FVAL,IMAX)
REAL INV,INVR,MC,K,FVAL(1000),OLDVAL(1000),NEWVAL(1000)
TAU = INV/INVR
K = H*H/6.
MESHR = 1./6.
RIMAX = (IMAX + 1)/2
JMAX = NINT(TAU/K)
SIGSQ = SIG*SIG
ALPHA = (SQRT(2.*R*SIGSQ + (R - DEL - .5*SIGSQ)**2) - (R - DEL -
*
.5*SIGSQ))/SIGSQ
WRITE(6,401) K, H, TAU, JMAX, IMAX
401 FORMAT(3(1X,F10.6),1X,I5,1X,I5)
32
DO 10 I = IMAX, ISHIFT + 1, -1
REALI = I - (IMAX + 1)/2
*
PRICE = EXP(SIG*REALI*H/SQRT(2.)
+ (R - DEL - .5*SIGSQ)*
TAU)*MC
OLDVAL(I) = FVAL(I)*EXP(R*TAU)/MC
10 CONTINUE
DO 60 J = JMAX - 1, 0, -1
REALJ = J
NEWVAL(IMAX) = MESHR*(SQRT(2. )*SIG*H*EXP(DEL*(K*(REALJ + 1.) *
*
*
TAU) + R*(REALJ + 1.)*K + SIG*(RIMAX*H- (DEL + SIG*SIG/2. R)*(REALJ+ 1.)*K)/SQRT(2.)))
+ (1. - 2.*MESHR)*OLDVAL(IMAX)
+ 2.*MESHR*OLDVAL(IMAX - 1)
DO 30 I = IMAX - 1, 1, -1
REALI = I - (IMAX + 1)/2
NEWVAL(I) = MESHR*(OLDVAL(I + 1) + OLDVAL(I - 1)) +
(1. - 2*MESHR)*OLDVAL(I) - (INVR/CAPAC)*K*EXP(R*REALJ*K)/
*
*
*
*
402
MC
IF (NEWVAL(I).GT.SQRT(2.)*NEWVAL(I + 1)/(SIG*ALPHA*H +
SQRT(2.))) GOTO 30
RTIME = REALJ*K
PRICE = EXP(SIG*REALI*H/SQRT(2.) + (R - DEL - .5*SIGSQ)*
RTIME)*MC
A = EXP(-R*RTIME)*MC*NEWVAL(I)/PRICE**ALPHA
WRITE(6,402) I,A,RTIME,PRICE,EXP(-R*RTIME)*MC*NEWVAL(I ISHIFT)
FORMAT(I3,4(1X,F12.9))
DO 20 L = I - 1, 1, -1
REALL = L - (IMAX + 1)/2
PRICE = EXP(SIG*REALL*H/SQRT(2.) + (R - DEL - .5*SIGSQ)*
*
20
30
40
50
60
900
RTIME)*MC
NEWVAL(L) = (A*EXP(R*RTIME)*PRICE**ALPHA)/MC
CONTINUE
GOTO 40
CONTINUE
DO 50 I = IMAX, 1, -1
OLDVAL(I) = NEWVAL(I)
CONTINUE
CONTINUE
RETURN
END
33
Appendix
B
SUB read_in_standard_normal
OPTION BASE 0
DIM standard_normal(30,9)
FOR i = 0 to 30
FOR j = 0 to 9
READ standard_normal(i,j)
NEXT
NEXT
j
i
DATA .5000,.4960,.4920,.4880,.4840,.4801,.4761,.4721,.4681,.4641
DATA .4602,.4562,.4522,.4483,.4443,.4404,.4364,.4325,.4686,.4247
DATA .4207,.4168,.4129,.4090,.4052,.4013,.3974,.3936,.3897,.3859
DATA .3821,.3873,.3745,.3707,.3669,.3632,.3594,.3557,.3520,.3483
DATA .3446,.3409,.3372,.3336,.3300,.3264,.3228,.3192,.3156,.3121
DATA .3085,.3050,.3015,.2981,.2946,.2912,.2877,.2843,.2810,.2776
DATA .2743,.2709,.2676,.2643,.2611,.2578,.2546,.2514,.2483,.2451
DATA .2420,.2389,.2358,.2327,.2296,.2266,.2236,.2206,.2217,.2148
DATA .2119,.2090,.2061,.2033,.2005,.1977,.1949,.1922,.1894,.1867
DATA .1841,.1814,.1788,.1762,.1736,.1711,.1685,.1660,.1635,.1611
DATA .1587,.1562,.1539,.1515,.1492,.1469,.1446,.1423,.1401,.1379
DATA .1357,.1335,.1314,.1292,.1271,.1251,.1230,.1210,.1190,.1170
DATA .1151,.1131,.1112,.1093,.1075,.1056,.1038,.1020,.1003,.0985
DATA .0968,.0951,.0934,.0918,.0901,.0885,.0869,.0853,.0838,.0823
DATA .0808,.0793,.0778,.0764,.0749,.0735,.0721,.0708,.0694,.0681
DATA .0668,.0655,.0643,.0630,.0618,.0606,.0594,.0582,.0571,.0559
DATA .0548,.0537,.0526,.0516,.0505,.0495,.0485,.0475,.0465,.0455
DATA .0446,.0436,.0427,.0418,.0409,.0401,.0392,.0384,.0375,.0367
DATA .0359,.0351,.0344,.0366,.0329,.0322,.0314,.0307,.0301,.0294
DATA .0287,.0281,.0274,.0268,.0262,.0256,.0250,.0244,.0239,.0233
DATA .0228,.0222,.0217,.0212,.0207,.0202,.0197,.0192,.0188,.0183
DATA .0179,.0174,.0170,.0166,.0162,.0158,.0154,.0150,.0146,.0143
DATA .0139,.0136,.0132,.0129,.0125,.0122,.0119,.0116,.0113,.0110
DATA .0107,.0104,.0102,.0099,.0096,.0094,.0091,.0089,.0087,.0084
DATA .0082,.0080,.0078,.0075,.0073,.0071,.0069,.0068,.0066,.0064
DATA .0062,.0060,.0059,.0057,.0055,.0054,.0052,.0051,.0049,.0048
DATA .0047,.0045,.0044,.0043,.0041,.0040,.0039,.0038,.0037,.0036
DATA .0035,.0034,.0033,.0032,.0031,.0030,.0029,.0028,.0027,.0026
DATA .0026,.0025,.0024,.0023,.0023,.0022,.0021,.0020,.0020,.0019
DATA .0019,.0018,.0018,.0017,.0016,.0016,.0015,.0015,.0014,.0014
DATA .0013,.0013,.0013,.0012,.0012,.0011,.0011,.0010,.0011,.0010
END SUB
SUB STANDARD_NORMAL_LOOKUP(N,X(),STNTAB(,))
DIM Z(25)
FOR STN = 1 TO N
SELECT CASE X(STN)
CASE
IS < -3.09
LET Z(STN) = 0
CASE IS > 3.09
LET Z(STN) = 1
CASE ELSE
34
LET ROOT = ABS(ROUND(1000*X(STN)))
LET I = INT(ROOT/100)
LET J1 = INT((ROOT - 100*I1)/10)
LET K1 = ROOT - 100*I1 - 10*J1
IF J1 = 9 THEN
LET I2 = I
+ 1
LET J2 = 0
ELSE
LET I2 = I1
LET J2 = J1 + 1
END IF
IF I2 = 31 THEN LET NEXT_ENTRY = 0 ELSE LET NEXT_ENTRY =
STNTAB(I2,J2)
LET LOOK = STNTAB(I1,J1) + Kl*(STNTAB(I1,J1) NEXT_ENTRY)/10
IF X(STN) > 0 THEN LET Z(STN) = 1 - LOOK ELSE LET Z(STN) =
LOOK
END SELECT
NEXT STN
END SUB
REM
INVEST
9
REM
REM This program solves both the upper and lower regions of the
REM free boundary problem similar to the one posed in the "time to
REM build "working paper of Saman Majd and Robert S. Pindyck.
REM The difference is that price (P) replaces value (V) as a state
REM variable in the formulation.
REM The code was last revised on January 21, 1987 by James C. Meehan.
REM
REM ----------------------------------------------------------------OPTION BASE 0
REM
REM Specify the desired location of output file.
REM
PRINT "Where do you want the data? "
PRINT
PRINT "1.
Print all output
to an IBM or Epson printer"
PRINT "2. Write all output to diskette"
PRINT "(Enter 1 or 2)"
INPUT INFO
IF INFO = 1 THEN
OPEN #1: PRINTER
SET #1
: MARGIN
132
ELSE
INPUT PROMPT "Enter file name for output: ": FILE$
OPEN #1 : NAME FILE$, ACCESS OUTPUT, CREATE NEW
END IF
REM
REM
REM
REM
REM
R
S
D
Enter the parameters of the problem.
-- annual riskless rate of interest, r
-- annual standard deviation, sigma
-- annual convenience yield, delta
35
REM INV -- total investment, Ko
REM T
-- life of the project, T
REM COST -- operating cost per unit of output, C
REM Y
-- number of years investment project would take if
REM
investment proceeded at the maximum rate in each period
REM K(C) -- maximum annual rate of investment in period c, k
REM
REM Factor is used to normalize the horizontal axis.
REM
INPUT PROMPT "Enter annual riskless rate: ": R
INPUT PROMPT "Enter annual standard deviation: ": S
INPUT PROMPT "Enter annual convenience yield: ": D
INPUT PROMPT "Enter total investment, to the nearest integer: ": INV
INPUT PROMPT "Enter life of project: ": T
INPUT PROMPT "Enter operating cost: ": COST
INPUT PROMPT "Enter number of stages of investment project: ": Y
LET FACTOR = 10INT(LOG10(INV))
DIM K(50)
DIM DD(2)
FOR C = 1 TO Y
REM
REM CC is used to reverse the numbering of the horizontal axis.
REM
LET CC = Y + 1 - C
PRINT "Enter maximum annual rate of investment in stage"; C
INPUT K(CC)
LET DUM = DUM + K(CC)
LET K(CC) = K(CC)/FACTOR
NEXT C
IF DUM >< INV THEN PRINT "WARNING: Sum of investments at each stage does
not equal total investment."
REM
REM Set dt equal to an arbitrarily small number.
REM The smaller is dt, the longer the program takes to run.
REM l/dt must be evenly divisible by 4.
REM
LET DTINV = 12
LET DT = 1/12
REM
REM Select form of the output file.
REM
INPUT PROMPT "Would you like to see annual or quarterly output? (Enter a
or q) ": N$
SELECT CASE N$
CASE "A","a"
LET N = 1
CASE "Q","q
LET N =4
CASE ELSE
PRINT "PLEASE ENTER q OR a NEXT TIME."
PRINT "AS A PENALTY FOR NOT READING INSTRUCTIONS, YOU WILL BE
REQUIRED TO START AGAIN."
36
STOP
END SELECT
PRINT
PRINT
PRINT
PRINT "RUNNING"
REM
CALL READ_IN_STANDARD_NORMAL
REM
REM
REM
Do initial computations.
REM Compute alpha from the analytical solution in the 1Lower region.
REM
f(P,K) = a*P'alpha
REM Compute minimum value of dx given the values of dt and sigma.
REM Check to see if solution is stable given parameters of problem.
REM Arbitrarily set epsilon equal to half of dx.
REM Compute p+, po, and p- used in the explicit method.
REM
LET SS = S*S
LET STUFF = R - D - SS/2
LET ALPHA = (-STUFF + (STUFF*STUFF + 2*R*SS)^.5)/SS
LET DX = S*DT .5
IF DX > SS/ABS(STUFF) THEN
PRINT "Solution is not stable for input parameters gi ven."
STOP
END IF
LET EPSILON= DX/10
LET PU= DT*( SS/DX + STUFF )/ (2*DX)
LET PD= DT*( SS/DX - STUFF )/ (2*DX)
LET PF= 1-PU-PD
REM
REM Initialize arrays.
REM
DIM INDEX(200)
DIM G(200,49)
DIM DUMMY1(200)
DIM DUMMY2(200)
REM
REM Set upper and lower boundaries of vertical axis.
REM
LET B=O0
LET M = 200
REM
REM Fill in terminal boundary condition.
REM
V(P) = sum from tau = 1 to T of Vt(P)
REM
where Vt(P) = P*exp(-delta*tau)*N(dl) - C*exp(-r*tau)*N(d2)
REM
REM Compute upper = derivative of V w.r.t. P as P goes to infinity =
REM
sum from tau = 1 to T of 1/(1 + delta) tau
REM
FOR L=M TO B STEP -1
LET VALU = 0
37
LET UPPER = 0
FOR TAU = 1 TO T
LET UPPER = UPPER + 1/(1 + D)^TAU
LET DD(1) = (LOG(EXP(L*DX)/COST) + STUFF*TAU)/(S*TAU.5)
LET DD(2) = DD(1) - S*TAUt.5
CALL STANDARD_NORMAL_LOOKUP(2,DD,STANDARD_NORMAL)
LET VALU = VALU + EXP(L*DX - D*TAU)*Z(1) - COST*EXP(-R*TAU)*Z(2)
NEXT TAU
LET DUMMY1(L) = VALU
LET G(L,0) = VALU
NEXT L
REM
REM Loop over entire horizontal axis, filling in column to the left
REM in dummy2(i), and saving desired columns in matrix g(i,j) which
REM corresponds to the option value expressed in the transformed
REM variable x.
REM
LET PERIODS = Y*DTINV
FOR J=1 TO PERIODS
LET JJ = INT((J - 1)/DTINV) + 1
LET DUMMY2(M) = PU*UPPER*2*DX* EXP( M*DX+(R - D)*(J-1)*DT) +
PF*DUMMY1(M) + (PU+PD)*DUMMY1(M - 1) - K(JJ)*DT*EXP(R*(J - 1)*DT)
LET L = M
DO WHILE
L > 0
LET L = L - 1
LET DUMMY2(L) = PU*DUMMY1(L + 1) + PF*DUMMY1(L) + PD*DUMMY1(L 1) - K(JJ)*DT*EXP(R*(J - 1)*DT)
REM
REM Check derivative condition to see if free boundary has been
REM reached.
REM If so, use the analytic solution on the remainder of the
REM range.
REM
LOOP WHILE DUMMY2(L) - DUMMY2(L+1)/(ALPHA*DX +1) > EPSILON
LET INDEX(J) = L
LET A=EXP(-(R*J*DT))*DUMMY2(INDEX(J))/ EXP( INDEX(J)*DX*ALPHA )
FOR L=INDEX(J)-l TO 0 STEP -1
LET DUMMY2(L)= A* EXP( L*DX*ALPHA ) * EXP(R*J*DT)
NEXT L
REM
REM See if column needs to be saved in g matrix.
REM
IF MOD(J*N,DTINV) = 0 THEN
LET COUNT = COUNT + 1
FOR L = M TO B STEP -1
LET G(L,COUNT) = DUMMY2(L)
NEXT L
END IF
FOR I,= M TO B STEP -1
LET DUMMY1(L) = DUMMY2(L)
NEXT L
NEXT J
38
PRINT
PRINT
PRINT
REM
REM Set number of columns to be written to 5 if writing to disk,
REM and 10 if writing in condensed mode to the printer.
REM
PRINT #1: "
SUMMARY OF INPUTS"
PRINT #1
PRINT #1
IF INFO = 1 THEN
LET COL = 10
PRINT #1: CHR$(27);CHR$(69);
ELSE
LET COL = 5
END IF
PRINT #1, USING "<###################
is
####.##,
Rate", R,
": "Riskless
"Standard Deviation", S
PRINT #1, USING "<###################
is ####.##,
Yield", D, "Total Investment is", INV
PRINT #1, USING "<################### is ####.##,
T, "Cost per Unit", COST
FOR C = 1 TO Y
LET CC = Y + 1 - C
PRINT #1: "In stage";
: "Convenien
.ce
": "Life of P'roject",
C;
PRINT #1, USING "maximum rate of investment is ####.###,":
K(CC)*FACTOR
NEXT C
PRINT #1:
PRINT #1,
PRINT #1,
PRINT #1
PRINT #1
PRINT #1:
IF INFO =
PRINT
USING "Calculations will use step size in x of ##.###,
USING "Calculations will use step size in t of ##.###,
"
OUTPUT"
1 THEN PRINT #1: CHR$(27);CHR$(70);
#1
PRINT #1
IF INFO = 1 THEN PRINT #1: CHR$(15)
LET V = N*Y
IF V - COL + 1 > 0 THEN LET VV = V - COL + 1 ELSE LET VV = 0
FOR TABLE = 1 TO ( INT(V/COL)+1 )
PRINT #1: "
Value of"
PRINT #1: "
underlying
Stages remaining, and"
PRINT #1: " Price
asset
Value of contingent claim"
PRINT #1: "
FOR J= V TO W STEP -1
PRINT #1, USING "###
": J;
NEXT J
PRINT
PRINT
#1
#1
FOR L = M TO B STEP -1
IF EXP(L*DX) < 100 AND EXP(L*DX) > COST/2 THEN
39
": DX
": DT
PRINT #1, USING ">####.## >######.##
": EXP(L*DX),
G(L,O)*FACTOR;
IF TABLE < INT(V/COL) + 1 AND INFO = 1 THEN LET CONTROL = VV
ELSE LET CONTROL = VV + 1
FOR J=V TO CONTROL STEP -1
IF INDEX(J/(N*DT))=L THEN LET Q$="*" ELSE LET Q$=" "
LET DUMMY= G(L,J)* EXP(-(R*J/N))
PRINT #1, USING ">####.## # ": DUMMY*FACTOR, Q$;
NEXT J
IF CONTROL >< VV THEN
IF INDEX(VV/(N*DT))=L THEN LET Q$="*" ELSE LET Q$=""
LET DUMMY= G(L,O)*EXP(-(R*VV/N))
PRINT #1, USING ">####.## # ": DUMMY*FACTOR, Q$
END IF
END IF
NEXT L
PRINT
PRINT
PRINT
PRINT
#1
#1
#1
#1
LET V = V - COL
IF V - COL + 1 < 0 THEN LET VV = 0 ELSE LET VV = V - COL + 1
NEXT TABLE
CLOSE #1
END
40
References
1.
Ames, William F., Numerical Methods for Partial
Differential Equations, Second Edition, (Orlando:
Academic Press, 1977).
2.
Black, Fisher and Myron Scholes, "The Pricing of Options
and Corporate Liabilities," Journal of Political
Economy,
81 (May/June,
1973), 637-659.
3.
Brennan, Michael J. and Eduardo S. Schwartz, "Finite
Difference Methods and Jump Processes Arising in
the Pricing of Contingent Claims: A Synthesis,"
Journal of Financial and Quantitative Analysis,
20 (September, 1978), 461-473.
4.
Cox, John C. and Mark Rubinstein, Options Markets,
(Englewood Cliffs, NJ: Prentice Hall, 1985).
5.
Courtedon, Georges, "A More Accurate Finite Difference
Approximation for the Valuation of Options,"
Journal of Financial and Quantitative Analysis, 17
(December,
1982), 697-705.
6.
Geske, Robert and Kuldeep Shastri, "Valuation by
Approximation: A Comparison of Alternative Option
Valuation Techniques," Journal of Financial and
Quantitative Analysis, 20 (March, 1985), 45-71.
7.
Majd, Saman and Robert S. Pindyck, 1987, "Time to Build,
Option Value, and Investment Decisions," Journal
of Financial Economics, 18 (March, 1987), 7-27.
8.
McDonald, Robert L. and Daniel R. Siegel, "Investment
and the Valuation of Firms When There Is an Option
to Shut Down," International Economic Review, 26
(June, 1985), 331-349.
9.
McDonald, Robert L. and Daniel R. Siegel, "The Value of
Waiting to Invest," Quarterly Journal of
Economics, (November, 1986), 707-727.
10. Merton, Robert C., "The Theory of Rational Option
Pricing," Bell Journal of Economics and Management
Science, 4 (Spring, 1973), 141-183.
11. Myers, Stewart C. and Saman Majd, "Calculating
Abandonment Value Using Option Pricing Theory",
Working paper no. 1462-83 (MIT Sloan School of
Management, Cambridge, MA, 1983).
41
12. Press, William H. et al., Numerical Recipes, (Cambridge:
Cambridge University Press, 1987).
42
Download