Learn R Programming

ESGtoolkit (version 0.2.0)

esgmcprices: Estimation of discounted asset prices

Description

This function computes estimators (sample mean) of

$$E[X_T exp(-\int_0^T r_s ds)]$$

where \(X_T\) is an asset value at given maturities \(T\), and \((r_s)_s\) is the risk-free rate.

Usage

esgmcprices(r, X, maturity = NULL)

Arguments

r

a numeric or a time series object, the risk-free rate(s).

X

asset prices obtained with simdiff

maturity

the corresponding maturity (optional). If missing, all the maturities available in X are used.

See Also

esgdiscountfactor, esgmccv

Examples

Run this code
# NOT RUN {
# GBM

r <- 0.03

eps0 <- simshocks(n = 100, horizon = 5, frequency = "quart")
sim.GBM <- simdiff(n = 100, horizon = 5, frequency = "quart",   
               model = "GBM", 
               x0 = 100, theta1 = 0.03, theta2 = 0.1, 
               eps = eps0)

# monte carlo prices
esgmcprices(r, sim.GBM)

# monte carlo price for a given maturity
esgmcprices(r, sim.GBM, 2)

# }

Run the code above in your browser using DataLab