Description Usage Arguments Details Warning Note Author(s) See Also Examples
A collection of lattice-based pricing methods for options. Currently implementing the Cox-Ross-Rubinstein (1979) [CRRtree], Jarrow-Rudd (1983) [JRtree], and Leisen-Reimer (1996) [LRtree] binomial methods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
type |
The type of option to be priced. May be one of ‘ac’ (American call), ‘ap’ (American put), ‘ec’ (European call), or ‘ep’ (European put). |
S |
The stock price. |
X |
The striking price. |
r |
The risk-free rate. |
b |
The dividend rate. |
v |
The volatility of the underlying - e.g. 0.1 is 10 |
Time |
The time to expiration, expressed in fractional years. |
N |
The number of steps in the lattice. For Leisen-Reimer trees
this should be an odd number. Will be enforced if |
method |
Which Preizer-Pratt inversion method? 1 or 2. |
force.odd |
Should LR N-steps be forced to odd. |
lambda |
Adjust tilt per Generalized CRR of Chung and Shih (2007). When lambda=0 this is the regular CRR tree. |
drift |
Correct for deep out of the money. When drift=0, this is the standard CRR tree. |
... |
Unused. |
All trees implemented are translations from Espen Haug's excellent book.
Greeks are calculated from the tree results via finite-difference.
As these methods are approximations, the granularity of the computational
lattice determine the accuracy of the method. Literature on the methods
indicate N
must be set sufficiently high to assure convergence. The
tradeoff to higher accuracy comes at a cost of increasing cost of computation.
Most of these pure R implementations are as fast as equivelent code written in C and interfaced to R. The design is meant to be expended easily for various approaches that one might desire to implement.
Jeffrey A. Ryan. Based on code from Espen Haug.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Cox-Ross-Rubinstein
CRRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5)
# Cox-Ross-Rubinstein with drift
CRRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5, drift=1)
# Generalized Cox-Ross-Rubinstein
CRRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5, lambda=2)
CRRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5, lambda=0.5)
# Jarrow-Rudd
JRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5)
# Leisen-Reimer
LRtree(S=42, X=40, r=0.1, b=0.1, v=0.2, Time=0.5, N=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.