Title: | American options pricing with Least Squares Monte Carlo method |
---|---|
Description: | The package compiles functions for calculating prices of American put options with Least Squares Monte Carlo method. The option types are plain vanilla American put, Asian American put, and Quanto American put. The pricing algorithms include variance reduction techniques such as Antithetic Variates and Control Variates. Additional functions are given to derive "price surfaces" at different volatilities and strikes, create 3-D plots, quickly generate Geometric Brownian motion, and calculate prices of European options with Black & Scholes analytical solution. |
Authors: | Mikhail A. Beketov |
Maintainer: | Mikhail A. Beketov <[email protected]> |
License: | GPL-3 |
Version: | 1.0 |
Built: | 2024-11-16 06:25:47 UTC |
Source: | CRAN |
The package compiles functions that calculate prices of American put options with Least Squares Monte Carlo method. The option types are plain vanilla American put, Asian American put, and Quanto American put. The pricing algorithms include variance reduction techniques such as Antithetic Variates and Control Variates. Additional functions are given to derive "price surfaces" at different volatilities and strikes, create 3-D plots, quickly generate Geometric Brownian motion, and calculate prices of European options with Black & Scholes analytical solution.
Package: | LSMonteCarlo |
Type: | Package |
Version: | 1.0 |
Date: | 2013-09-20 |
License: | GPL 3 |
The Least Squares Monte Carlo is an approach developed to approximate the value of American options. It combines regression modeling and Monte Carlo simulation. The key feature of this method is estimation of the conditional expectation of the future pay-offs by a regression model (for details see Longstaff & Schwartz, 2000). The main pricing functions employing this method in the package are: AmerPutLSM
, AsianAmerPutLSM
, and QuantoAmerPutLSM
. Pricing functions that include variance reduction methods are: AmerPutLSM_AV
, QuantoAmerPutLSM_AV
(Antithetic Variates) and AmerPutLSM_CV
(Control Variates, with Black & Scholes solution for European put used as the control). All these functions are based on Geometric Brownian motion as a price process. They can be used with tailored summary
, print
, and price
functions. The "price surfaces" at different volatilities and strikes can be derived using the functions AmerPutLSMPriceSurf
, AsianAmerPutLSMPriceSurf
, and QuantoAmerPutLSMPriceSurf
, and plotted with tailored plot
function. For general reading on option pricing with Monte Carlo methods see Glasserman (2004).
Mikhail A. Beketov
Maintainer: Mikhail A. Beketov <[email protected]>
Glasserman, P. 2004. Monte Carlo Methods in Financial Engineering. Springer.
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Functions: AmerPutLSM
,
AmerPutLSM_AV
,
AmerPutLSM_CV
,
AsianAmerPutLSM
,
QuantoAmerPutLSM
, and
QuantoAmerPutLSM_AV
.
Put<-AmerPutLSM(Spot=14.2, Strike=16.5, n=200, m=50) summary(Put) price(Put) plot(AmerPutLSMPriceSurf(vols = (seq(0.1, 1.5, 0.2)), n=200, m=10, strikes = (seq(0.5, 1.9, 0.2))), color = divPalette(150, "RdBu"))
Put<-AmerPutLSM(Spot=14.2, Strike=16.5, n=200, m=50) summary(Put) price(Put) plot(AmerPutLSMPriceSurf(vols = (seq(0.1, 1.5, 0.2)), n=200, m=10, strikes = (seq(0.5, 1.9, 0.2))), color = divPalette(150, "RdBu"))
The function calculates the price of plain vanilla American put with Least Squares Monte Carlo method. The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
AmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPut' print(x, ...) ## S3 method for class 'AmerPut' summary(object, ...)
AmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPut' print(x, ...) ## S3 method for class 'AmerPut' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class AmerPut that is a list comprising the price calculated, option type, and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
Mikhail A. Beketov
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Functions: price
,
AmerPutLSM_AV
,
AmerPutLSM_CV
,
AsianAmerPutLSM
, and
QuantoAmerPutLSM
.
AmerPutLSM() put<-AmerPutLSM(Spot=14.2, Strike=16.5, n=500, m=100) put summary(put) price(put) put$price
AmerPutLSM() put<-AmerPutLSM(Spot=14.2, Strike=16.5, n=500, m=100) put summary(put) price(put) put$price
The function calculates the price of a plain vanilla American put with Least Squares Monte Carlo method with Antithetic Variates (Glasserman, 2004). The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
AmerPutLSM_AV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPutAV' print(x, ...) ## S3 method for class 'AmerPutAV' summary(object, ...)
AmerPutLSM_AV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPutAV' print(x, ...) ## S3 method for class 'AmerPutAV' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class AmerPutAV that is a list comprising the price calculated and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
Mikhail A. Beketov
Glasserman, P. 2004. Monte Carlo Methods in Financial Engineering. Springer.
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Functions: price
,
AmerPutLSM
,
AmerPutLSM_CV
,
AsianAmerPutLSM
, and
QuantoAmerPutLSM
.
AmerPutLSM_AV(n=500, m=50) put<-AmerPutLSM_AV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put) put$price
AmerPutLSM_AV(n=500, m=50) put<-AmerPutLSM_AV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put) put$price
The function calculates the price of a plain vanilla American put with Least Squares Monte Carlo method with Control Variates (Glasserman, 2004). Black & Scholes solution for European put is used as the control. The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
AmerPutLSM_CV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPutCV' print(x, ...) ## S3 method for class 'AmerPutCV' summary(object, ...)
AmerPutLSM_CV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AmerPutCV' print(x, ...) ## S3 method for class 'AmerPutCV' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class AmerPutCV that is a list comprising the price calculated and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
Mikhail A. Beketov
Glasserman, P. 2004. Monte Carlo Methods in Financial Engineering. Springer.
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Functions: price
,
AmerPutLSM
,
AmerPutLSM_AV
,
AsianAmerPutLSM
, and
QuantoAmerPutLSM
.
AmerPutLSM_CV() put<-AmerPutLSM_CV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put) put$price
AmerPutLSM_CV() put<-AmerPutLSM_CV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put) put$price
The function calculates the prices at different volatilities and strikes using the AmerPutLSM
function.
AmerPutLSMPriceSurf(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) ## S3 method for class 'PriceSurface' summary(object, ...) ## S3 method for class 'PriceSurface' plot(x, color = divPalette(800, "RdBu"), ...)
AmerPutLSMPriceSurf(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) ## S3 method for class 'PriceSurface' summary(object, ...) ## S3 method for class 'PriceSurface' plot(x, color = divPalette(800, "RdBu"), ...)
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
.
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"))
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"))
The function calculates the price of Asian American put with Least Squares Monte Carlo method (pay-off based on arithmetic mean). The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
AsianAmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AsianAmerPut' print(x, ...) ## S3 method for class 'AsianAmerPut' summary(object, ...)
AsianAmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1) ## S3 method for class 'AsianAmerPut' print(x, ...) ## S3 method for class 'AsianAmerPut' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class AsianAmerPut that is a list comprising the price calculated, option type, and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
Mikhail A. Beketov
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Functions: price
,
AmerPutLSM
,
AmerPutLSM_CV
,
AmerPutLSM_AV
, and
QuantoAmerPutLSM
.
AsianAmerPutLSM(n=500, m=100) put<-AsianAmerPutLSM(Spot=14.2, Strike=16.5, n=500, m=50) put summary(put) price(put) put$price
AsianAmerPutLSM(n=500, m=100) put<-AsianAmerPutLSM(Spot=14.2, Strike=16.5, n=500, m=50) put summary(put) price(put) put$price
The function calculates the prices at different volatilities and strikes using the AsianAmerPutLSM
function.
AsianAmerPutLSMPriceSurf(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)
AsianAmerPutLSMPriceSurf(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)
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). |
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: AsianAmerPutLSM
,
summary.PriceSurface
,
plot.PriceSurface
,
AmerPutLSMPriceSurf
, and
QuantoAmerPutLSMPriceSurf
.
surface<-AsianAmerPutLSMPriceSurf(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"))
surface<-AsianAmerPutLSMPriceSurf(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"))
Pricing plain vanilla American put and call options using Black & Scholes solution.
EuPutBS(Spot, sigma, Strike, r, dr, mT) EuCallBS(Spot, sigma, Strike, r, dr, mT)
EuPutBS(Spot, sigma, Strike, r, dr, mT) EuCallBS(Spot, sigma, Strike, r, dr, mT)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
Strike |
Strike price of the option. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
The function returns the price as a single number (class "numeric").
EuPutBS(1, 0.2, 1, 0.06, 0, 1) EuCallBS(1, 0.2, 1, 0.06, 0, 1)
EuPutBS(1, 0.2, 1, 0.06, 0, 1) EuCallBS(1, 0.2, 1, 0.06, 0, 1)
Quick Generating Geometric Brownian motion avoiding unnecessary loops using the cumsum
function. Technical function implemented in the pricing functions of the package.
fastGBM(Spot = 1, sigma = 0.2, n = 1000, m = 365, r = 0.06, dr = 0, mT = 1)
fastGBM(Spot = 1, sigma = 0.2, n = 1000, m = 365, r = 0.06, dr = 0, mT = 1)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
r |
Interest rate of the numeraire currency (e.g. EUR). |
dr |
Dividend rate of the underlying asset. |
mT |
Maturity time (years). |
Table with paths generated (each row is a path, class "matrix")
Mikhail A. Beketov
Functions: AmerPutLSM
,
AmerPutLSM_AV
,
AmerPutLSM_CV
,
AsianAmerPutLSM
,
QuantoAmerPutLSM
, and
QuantoAmerPutLSM_AV
.
fastGBM(n=10, m=5) matplot(t(fastGBM(n=100, m=100)), type="l") # matrix transpose by "t()"
fastGBM(n=10, m=5) matplot(t(fastGBM(n=100, m=100)), type="l") # matrix transpose by "t()"
Technical function implemented in the pricing functions of the package. It returns the first >0 value in each row of a matrix and assign zero to all subsequent values.
firstValueRow(x)
firstValueRow(x)
x |
A matrix. |
A matrix.
Mikhail A. Beketov
Functions: AmerPutLSM
,
AmerPutLSM_AV
,
AmerPutLSM_CV
,
AsianAmerPutLSM
,
QuantoAmerPutLSM
, and
QuantoAmerPutLSM_AV
.
mat<-matrix(c(0,0,2,0,4,0,3,0,1,9,8,7), ncol=4) mat firstValueRow(mat)
mat<-matrix(c(0,0,2,0,4,0,3,0,1,9,8,7), ncol=4) mat firstValueRow(mat)
The function is nothing else, but the object$price
action, with the object
returned by the pricing functions in the package.
price(x)
price(x)
x |
Object returned by the pricing functions in the package |
The function returns the price as a single number (class "numeric").
Functions: AmerPutLSM
,
AmerPutLSM_AV
,
AmerPutLSM_CV
,
AsianAmerPutLSM
,
QuantoAmerPutLSM
, and
QuantoAmerPutLSM_AV
.
put<-AmerPutLSM() price(put) put$price
put<-AmerPutLSM() price(put) put$price
The function calculates the price of Quanto American put with Least Squares Monte Carlo method. The Quanto option is cash-settled option, whose pay-off is converted into a third currency/asset at exercise at a pre-specified rate/price (Wystup, 2011), and can also be considered as a usual option but settled in a "wrong" asset (Vecer, 2011). The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
QuantoAmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1, Spot2 = 1, sigma2 = 0.2, r2 = 0, dr2 = 0, rho = 0) ## S3 method for class 'QuantoAmerPut' print(x, ...) ## S3 method for class 'QuantoAmerPut' summary(object, ...)
QuantoAmerPutLSM(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1, Spot2 = 1, sigma2 = 0.2, r2 = 0, dr2 = 0, rho = 0) ## S3 method for class 'QuantoAmerPut' print(x, ...) ## S3 method for class 'QuantoAmerPut' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
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. |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class QuantoAmerPut that is a list comprising the price calculated, option type, and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
The function rmvnorm
included in the pricing algorithm is a part of the mnormt package. Please, load that package before the use of the QuantoAmerPutLSM
function.
Mikhail A. Beketov
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Vecer, J. 2011. Stochastic Finance: A Numeraire Approach. CRC Press.
Wystup, U. 2011. Quanto Options. MathFinance AG.
Functions: price
,
QuantoAmerPutLSM_AV
,
AmerPutLSM
,
AsianAmerPutLSM
, and
AmerPutLSM_AV
.
QuantoAmerPutLSM(n=200, m=50) put<-QuantoAmerPutLSM(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put)
QuantoAmerPutLSM(n=200, m=50) put<-QuantoAmerPutLSM(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put)
The function calculates the price of Quanto American put with Least Squares Monte Carlo method with Antithetic Variates (Glasserman, 2004). The Quanto option is cash-settled option, whose pay-off is converted into a third currency/asset at exercise at a pre-specified rate/price (Wystup, 2011), and can also be considered as a usual option but settled in a "wrong" asset (Vecer, 2011). The regression model included in the algorithm is quadratic polynomial (Longstaff & Schwartz, 2000).
QuantoAmerPutLSM_AV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1, Spot2 = 1, sigma2 = 0.2, r2 = 0, dr2 = 0, rho = 0) ## S3 method for class 'QuantoAmerPut_AV' print(x, ...) ## S3 method for class 'QuantoAmerPut_AV' summary(object, ...)
QuantoAmerPutLSM_AV(Spot = 1, sigma = 0.2, n = 1000, m = 365, Strike = 1.1, r = 0.06, dr = 0, mT = 1, Spot2 = 1, sigma2 = 0.2, r2 = 0, dr2 = 0, rho = 0) ## S3 method for class 'QuantoAmerPut_AV' print(x, ...) ## S3 method for class 'QuantoAmerPut_AV' summary(object, ...)
Spot |
Spot price of the underlying asset (e.g. stock). |
sigma |
Volatility of the underlying asset. |
n |
Number of paths simulated. |
m |
Number of time steps in the simulation. |
Strike |
Strike price of the option. |
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. |
x |
An object returned by the functions |
object |
An object returned by the function |
... |
Not used. |
The function returns an object of the class QuantoAmerPut_AV that is a list comprising the price calculated, option type, and the entry parameters. Class-specific print
function gives the option type information and the price. The price as a single number can be derived using the price
function. An overview of the entire object can be seen using the summary
function.
The function rmvnorm
included in the pricing algorithm is a part of the mnormt package. Please, load that package before the use of the QuantoAmerPutLSM_AV
function.
Mikhail A. Beketov
Glasserman, P. 2004. Monte Carlo Methods in Financial Engineering. Springer.
Longstaff, F.A., and E.S. Schwartz. 2000. Valuing american option by simulation: A simple least-squared approach. The Review of Financial Studies. 14:113-147.
Vecer, J. 2011. Stochastic Finance: A Numeraire Approach. CRC Press.
Wystup, U. 2011. Quanto Options. MathFinance AG.
Functions: price
,
QuantoAmerPutLSM
,
AmerPutLSM
,
AsianAmerPutLSM
, and
AmerPutLSM_AV
.
QuantoAmerPutLSM_AV(n=200, m=50) put<-QuantoAmerPutLSM_AV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put)
QuantoAmerPutLSM_AV(n=200, m=50) put<-QuantoAmerPutLSM_AV(Spot=14.2, Strike=16.5, n=200, m=50) put summary(put) price(put)
The function calculates the prices at different volatilities and strikes using the QuantoAmerPutLSM
function.
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)
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
.
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"))
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"))