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.
esgmcprices(r, X, maturity = NULL)
a numeric
or a time series object, the risk-free rate(s).
asset prices obtained with simdiff
the corresponding maturity (optional). If missing, all the maturities
available in X
are used.
# 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)
#> Qtr1 Qtr2 Qtr3 Qtr4
#> 0 100.00000 99.87926 100.28263 100.27294
#> 1 100.74803 100.35236 100.78660 100.60459
#> 2 100.59029 101.37518 102.10043 103.19092
#> 3 102.51163 103.12298 102.69882 102.83572
#> 4 102.67107 103.13669 102.80105 102.34260
#> 5 102.40749
# monte carlo price for a given maturity
esgmcprices(r, sim.GBM, 2)
#> Qtr1
#> 2 100.5903