Description Usage Arguments Value Author(s) See Also Examples
This function performs martingale and market consistency (t-)tests.
1 | esgmartingaletest(r, X, p0, alpha = 0.05)
|
r |
a |
X |
a time series object, containing payoffs or projected asset values. |
p0 |
a |
alpha |
1 - confidence level for the test. Default value is 0.05. |
The function result can be just displayed. Otherwise, you can get a list by an assignation, containing (for each maturity) :
the Student t values
the p-values
the estimated mean of the martingale difference
Monte Carlo prices
Thierry Moudiki
1 2 3 4 5 6 7 8 9 10 11 12 13 | r0 <- 0.03
S0 <- 100
set.seed(10)
eps0 <- simshocks(n = 100, horizon = 3, frequency = "quart")
sim.GBM <- simdiff(n = 100, horizon = 3, frequency = "quart",
model = "GBM",
x0 = S0, theta1 = r0, theta2 = 0.1,
eps = eps0)
mc.test <- esgmartingaletest(r = r0, X = sim.GBM, p0 = S0,
alpha = 0.05)
esgplotbands(mc.test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.