cf_lattice | R Documentation |
The option pricing can be made with a multinomial lattice, this functions can generate such a lattice with aid of some give parameters.
cf_lattice(N, U, S0)
N |
number of periods for the multinomial model |
U |
vector of changes |
S0 |
initial price |
A list with a tree structure of the asset evolution
Pedro Guarderas pedro.felipe.guarderas@gmail.com
s <- 0.3
T <- 0.25
N <- 15
u <- exp( s * sqrt( T / N ) )
d <- 1/u
r <- 0.02
S0 <- 100
R <- exp( r * T / N )
q <- ( R - d ) / ( u - d )
U <- c( d, u )
S <- cf_lattice( N, U, S0 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.