Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/QuantoAmerPutLSMPriceSurf.R
The function calculates the prices at different volatilities and strikes using the QuantoAmerPutLSM
function.
1 2 3 | QuantoAmerPutLSMPriceSurf(Spot = 1, vols = (seq(0.1, 2, 0.1)), n = 1000, m = 365,
strikes = (seq(0.5, 2.5, 0.1)), r = 0.06, dr = 0, mT = 1, Spot2 = 1, sigma2 = 0.2,
r2 = 0, dr2 = 0, rho = 0)
|
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. USD). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
Spot2 |
Spot price of the 3rd asset (e.g. EUR/USD). |
sigma2 |
Volatility of the 3rd asset. |
r2 |
Interest rate of the 3rd asset. |
dr2 |
Dividend rate of the 3rd asset. |
rho |
Correlation coefficient between the prices. |
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.
The function rmvnorm
included in the pricing algorithm is a part of the mnormt package. Please, load that package before the use of the QuantoAmerPutLSMPriceSurf
function. Using the function plot
with default pallet requires package fBasics, if you do not want to load this package, you can set color=NULL
or other palette).
Mikhail A. Beketov
Functions: QuantoAmerPutLSM
,
summary.PriceSurface
,
plot.PriceSurface
,
AmerPutLSMPriceSurf
, and
AsianAmerPutLSMPriceSurf
.
1 2 3 4 | surface<-QuantoAmerPutLSMPriceSurf(vols = (seq(0.1, 1.7, 0.2)), n=100, m=5,
strikes = (seq(0.7, 1.7, 0.2)))
summary(surface)
plot(surface, color = divPalette(150, "RdBu"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.