esgmartingaletest | R Documentation |
Performs statistical tests to verify if a time series follows a martingale property and maintains market consistency. Three different testing methods are available.
esgmartingaletest(
r,
X,
p0,
alpha = 0.05,
method = c("onevsone", "trend", "ratio")
)
r |
Risk-free rate (scalar or time series) |
X |
Time series of asset prices or values |
p0 |
Initial price(s) for comparison |
alpha |
Significance level for hypothesis tests (default: 0.05) |
method |
Testing method:
|
The function implements three different approaches to test for martingale properties:
"onevsone": Compares each observation against its expected value
"trend": Analyzes trends in the martingale differences
"ratio": Tests the ratio between discounted values and initial prices
The test results help determine if the time series maintains the martingale property and market consistency under the risk-neutral measure.
A list containing test results, which may include:
t-statistic and p-value for ratio test
trend analysis results
mean and standard deviation of martingale differences
# Generate sample data
r <- 0.05
X <- ts(matrix(rnorm(1000), 100, 10), start = 0, deltat = 0.1)
p0 <- 100
# Perform martingale test using ratio method
result <- esgmartingaletest(r, X, p0, method = "ratio")
# Perform trend analysis
trend_result <- esgmartingaletest(r, X, p0, method = "trend")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.