MomentsDMQ | R Documentation |
Compute DMQ implied conditional moments. At each point in time moments are computed using the discretized distribution implied by the estimated conditional quantiles.
MomentsDMQ(Fit)
Fit |
The output of the function EstimateDMQ or UpdateDMQ. |
Moments are computed using the following approximation:
\mathbb{E}[g(x)] \approx \sum_{j = 1}^J (\tau_j - \tau_{j-1}) g(\hat q_t^{\tau_j}),
with \tau_0 = 0
, where \hat q_t^{\tau_j}
are estimated quantiles.
A list
of four elements:
mMoments |
a Tx4 |
mCenterdMoments |
a Tx4 |
vSkew |
a |
vKurt |
a |
Leopoldo Catania
# Load Microsoft Corporation logarithmic percentage returns from December 8,
# 2010 to November 15, 2018 for a total of T = 2000 observation
data("MSFT")
##############################################################
######################## Estimate DMQ ########################
##############################################################
# Estimate DMQ on the in sample period
Fit = EstimateDMQ(vY = vY,
vTau = seq(0.01, 0.99, 0.01),
iTau_star = 50,
FixReference = TRUE,
fn.optimizer = fn.solnp)
# Compute estimated moments
Moments = MomentsDMQ(Fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.