esgmartingaletest: Martingale and market consistency tests

Description Usage Arguments Value Author(s) See Also Examples

View source: R/tests.R

Description

This function performs martingale and market consistency (t-)tests.

Usage

1
esgmartingaletest(r, X, p0, alpha = 0.05)

Arguments

r

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

X

a time series object, containing payoffs or projected asset values.

p0

a numeric or a vector or a univariate time series containing initial price(s) of an asset.

alpha

1 - confidence level for the test. Default value is 0.05.

Value

The function result can be just displayed. Otherwise, you can get a list by an assignation, containing (for each maturity) :

Author(s)

Thierry Moudiki

See Also

esgplotbands

Examples

 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)                

ESGtoolkit documentation built on July 1, 2020, 11:24 p.m.