Description Usage Arguments Value Author(s) See Also Examples
View source: R/AmerPutLSMPriceSurf.R
The function calculates the prices at different volatilities and strikes using the AmerPutLSM
function.
1 2 3 4 5 6 7 |
Spot |
Spot price of the underlying asset (e.g. stock). |
vols |
Sequence of volatilities. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
strikes |
Sequence of strikes. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
object |
Object of the class PriceSurface that is a matrix of prices at different volatilities and strikes. |
x |
Object of the class PriceSurface that is a matrix of prices at different volatilities and strikes. |
color |
Color palette (the default pallet requires package fBasics, if you do not want to load this package, you can set |
... |
Not used. |
The function returns an object of the class PriceSurface that is a matrix of prices at different volatilities and strikes. Class-specific summary
function gives the sequences of volatilities and strikes used, as well as maximum, minimum, and average prices. Class-specific plot
function constructs a 3-D plot of the price surface.
Mikhail A. Beketov
Functions: AmerPutLSM
,
AsianAmerPutLSMPriceSurf
, and
QuantoAmerPutLSMPriceSurf
.
1 2 3 4 | surface<-AmerPutLSMPriceSurf(vols = (seq(0.1, 1.5, 0.2)), n=200, m=10,
strikes = (seq(0.5, 1.9, 0.2)))
summary(surface)
plot(surface, color = divPalette(150, "RdBu"))
|
Loading required package: mvtnorm
Loading required package: fBasics
Loading required package: timeDate
Loading required package: timeSeries
Volatility sequence:
0.1 0.3 0.5 0.7 0.9 1.1 1.3 1.5
Strike sequence:
0.5 0.7 0.9 1.1 1.3 1.5 1.7 1.9
Average price: 0.4749081
Minimum price: 0
Maximum price: 1.237644
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.