LRtree: Lattice Based Option Pricing Methods

Description Usage Arguments Details Warning Note Author(s) See Also Examples

View source: R/binomial.R

Description

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.

Usage

 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
CRRtree(type = c("ac", "ap", "ec", "ep"), 
       S, 
       X, 
       r, 
       b, 
       v, 
       Time, 
       N = 52, lambda=1, drift=0, ...)

JRtree(type = c("ac", "ap", "ec", "ep"), 
       S, 
       X, 
       r, 
       b, 
       v, 
       Time, 
       N = 52, ...)

LRtree(type = c("ac", "ap", "ec", "ep"), 
       S, 
       X, 
       r, 
       b, 
       v, 
       Time, 
       N = 53,
       method = 2, force.odd = TRUE, ...)

Arguments

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 force.odd is set as TRUE for LRtree (only).

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.

Details

All trees implemented are translations from Espen Haug's excellent book.

Greeks are calculated from the tree results via finite-difference.

Warning

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.

Note

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.

Author(s)

Jeffrey A. Ryan. Based on code from Espen Haug.

See Also

BlackScholesMerton

Examples

 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)

joshuaulrich/greeks documentation built on May 19, 2019, 8:54 p.m.