Reference guide
Index
ARCHModels.ARCHModelsARCHModels.BG96ARCHModels.ARCHARCHModels.ARCHLMTestARCHModels.ARCHLMTestARCHModels.ARCHLMTestARCHModels.ARCHModelARCHModels.ARMAARCHModels.DQTestARCHModels.DQTestARCHModels.EGARCHARCHModels.EGARCHARCHModels.GARCHARCHModels.InterceptARCHModels.InterceptARCHModels.MeanSpecARCHModels.NoInterceptARCHModels.NoInterceptARCHModels.StandardizedARCHModels.StandardizedDistributionARCHModels.StdGEDARCHModels.StdGEDARCHModels.StdNormalARCHModels.StdNormalARCHModels.StdTARCHModels.StdTARCHModels.TGARCHARCHModels.TGARCHARCHModels.UnivariateARCHModelARCHModels.UnivariateARCHModelARCHModels.VolatilitySpecARCHModels.VaRsARCHModels.meansARCHModels.selectmodelARCHModels.simulateARCHModels.simulate!ARCHModels.volatilitiesStatsBase.fitStatsBase.fitStatsBase.fitStatsBase.fit!StatsBase.predictStatsBase.residuals
Public API
ARCHModels.ARCHModels — Module.The ARCHModels package for Julia. For documentation, see https://s-broda.github.io/ARCHModels.jl/dev.
ARCHModels.BG96 — Constant.BG96Data from Bollerslev and Ghysels (JBES 1996).
ARCHModels.ARCH — Type.ARCH{q, T<:AbstractFloat} <: VolatilitySpec{T}ARCH{q}(coefs) -> VolatilitySpecConstruct an ARCH specification with the given parameters.
Example:
julia> ARCH{2}([1., .3, .4])
TGARCH{0,0,2} specification.
ω α₁ α₂
Parameters: 1.0 0.3 0.4ARCHModels.ARCHLMTest — Type.ARCHLMTest(am::UnivariateARCHModel, p=max(o, p, q, ...))Conduct Engle's (1982) LM test for autoregressive conditional heteroskedasticity with p lags in the test regression.
ARCHModels.ARCHLMTest — Type.ARCHLMTest <: HypothesisTestEngle's (1982) LM test for autoregressive conditional heteroskedasticity.
ARCHModels.ARCHLMTest — Method.ARCHLMTest(u::Vector, p::Integer)Conduct Engle's (1982) LM test for autoregressive conditional heteroskedasticity with p lags in the test regression.
ARCHModels.ARCHModel — Type.ARCHModel <: StatisticalModelARCHModels.ARMA — Method.ARMA{p, q}(coefs::Vector)Create an ARMA(p, q) model.
ARCHModels.DQTest — Type.DQTest <: HypothesisTestEngle and Manganelli's (2004) out-of-sample dynamic quantile test.
ARCHModels.DQTest — Method.DQTest(data, vars, level, p=1)Conduct Engle and Manganelli's (2004) out-of-sample dynamic quantile test with p lags in the test regression. vars shoud be a vector of out-of-sample Value at Risk predictions at level level.
ARCHModels.EGARCH — Type.EGARCH{o, p, q, T<:AbstractFloat} <: VolatilitySpec{T}ARCHModels.EGARCH — Method.EGARCH{o, p, q}(coefs) -> VolatilitySpecConstruct an EGARCH specification with the given parameters.
Example:
julia> EGARCH{1, 1, 1}([-0.1, .1, .9, .04])
EGARCH{1,1,1} specification.
ω γ₁ β₁ α₁
Parameters: -0.1 0.1 0.9 0.04ARCHModels.GARCH — Type.GARCH{p, q, T<:AbstractFloat} <: VolatilitySpec{T}GARCH{p, q}(coefs) -> VolatilitySpecConstruct a GARCH specification with the given parameters.
Example:
julia> GARCH{2, 1}([1., .3, .4, .05 ])
TGARCH{0,2,1} specification.
ω β₁ β₂ α₁
Parameters: 1.0 0.3 0.4 0.05ARCHModels.Intercept — Type.Intercept{T} <: MeanSpec{T}A mean specification with just an intercept.
ARCHModels.Intercept — Method.Intercept(mu)Create an instance of Intercept. mu can be passed as a scalar or vector.
ARCHModels.MeanSpec — Type.MeanSpec{T}Abstract supertype that mean specifications inherit from.
ARCHModels.NoIntercept — Type.NoIntercept{T} <: MeanSpec{T}A mean specification without an intercept (i.e., the mean is zero).
ARCHModels.NoIntercept — Method.NoIntercept(T::Type=Float64)
NoIntercept{T}()
NoIntercept(v::Vector)Create an instance of NoIntercept.
ARCHModels.Standardized — Type.Standardized{D<:ContinuousUnivariateDistribution, T} <: StandardizedDistribution{T}A wrapper type for standardizing a distribution from Distributions.jl.
StandardizedDistribution{T} <: Distributions.Distribution{Univariate, Continuous}Abstract supertype that standardized distributions inherit from.
ARCHModels.StdGED — Type.StdGED{T} <: StandardizedDistribution{T}The standardized (mean zero, variance one) generalized error distribution.
ARCHModels.StdGED — Method.StdGED(p)Create a standardized generalized error distribution parameter p. p can be passed as a scalar or vector.
ARCHModels.StdNormal — Type.StdNormal{T} <: StandardizedDistribution{T}The standard Normal distribution.
ARCHModels.StdNormal — Type.StdNormal(T::Type=Float64)
StdNormal(v::Vector)
StdNormal{T}()Construct an instance of StdNormal.
ARCHModels.StdT — Type.StdT{T} <: StandardizedDistribution{T}The standardized (mean zero, variance one) Student's t distribution.
ARCHModels.StdT — Method.StdT(v)Create a standardized t distribution with v degrees of freedom. ν` can be passed as a scalar or vector.
ARCHModels.TGARCH — Type.TGARCH{o, p, q, T<:AbstractFloat} <: VolatilitySpec{T}ARCHModels.TGARCH — Method.TGARCH{o, p, q}(coefs) -> VolatilitySpecConstruct a TGARCH specification with the given parameters.
Example:
julia> TGARCH{1, 1, 1}([1., .04, .9, .01])
TGARCH{1,1,1} specification.
ω γ₁ β₁ α₁
Parameters: 1.0 0.04 0.9 0.01ARCHModels.UnivariateARCHModel — Type.UnivariateARCHModel{T<:AbstractFloat,
VS<:VolatilitySpec,
SD<:StandardizedDistribution{T},
MS<:MeanSpec{T}
} <: StatisticalModelARCHModels.UnivariateARCHModel — Method.UnivariateARCHModel(spec::VolatilitySpec, data::Vector; dist=StdNormal(),
meanspec=NoIntercept(), fitted=false
)Create a UnivariateARCHModel.
Example:
julia> UnivariateARCHModel(GARCH{1, 1}([1., .9, .05]), randn(10))
TGARCH{0,1,1} model with Gaussian errors, T=10.
ω β₁ α₁
Volatility parameters: 1.0 0.9 0.05ARCHModels.VolatilitySpec — Type.VolatilitySpec{T}Abstract supertype that volatility specifications inherit from.
ARCHModels.VaRs — Function.VaRs(am::UnivariateARCHModel, level=0.01)Return the in-sample Value at Risk implied by am.
ARCHModels.means — Method.means(am::UnivariateARCHModel)Return the conditional means of the model.
ARCHModels.selectmodel — Method.selectmodel(::Type{VS}, data; kwargs...) -> UnivariateARCHModelFit the volatility specification VS with varying lag lengths and return that which minimizes the BIC.
Keyword arguments:
dist=StdNormal: the error distribution.meanspec=Intercept: the mean specification, either as a type or instance of that type.maxlags=3: maximum lag length to try in each parameter ofVS.criterion=bic: function that takes aUnivariateARCHModeland returns the criterion to minimize.show_trace=false: printcriterionto screen for each estimated model.algorithm=BFGS(), autodiff=:forward, kwargs...: passed on to the optimizer.
Example
julia> selectmodel(EGARCH, BG96)
EGARCH{1,1,2} model with Gaussian errors, T=1974.
Mean equation parameters:
Estimate Std.Error z value Pr(>|z|)
μ -0.00900018 0.00943948 -0.953461 0.3404
Volatility parameters:
Estimate Std.Error z value Pr(>|z|)
ω -0.0544398 0.0592073 -0.919478 0.3578
γ₁ -0.0243368 0.0270414 -0.899985 0.3681
β₁ 0.960301 0.0388183 24.7384 <1e-99
α₁ 0.405788 0.067466 6.0147 <1e-8
α₂ -0.207357 0.114161 -1.81636 0.0693ARCHModels.simulate — Function.simulate(am::UnivariateARCHModel; warmup=100)
simulate(am::UnivariateARCHModel, nobs; warmup=100)
simulate(spec::VolatilitySpec, nobs; warmup=100, dist=StdNormal(), meanspec=NoIntercept())Simulate a UnivariateARCHModel.
ARCHModels.simulate! — Method.simulate!(am::UnivariateARCHModel; warmup=100)Simulate a UnivariateARCHModel, modifying am in place.
ARCHModels.volatilities — Method.volatilities(am::UnivariateARCHModel)Return the conditional volatilities.
StatsBase.fit! — Method.fit!(am::UnivariateARCHModel; algorithm=BFGS(), autodiff=:forward, kwargs...)Fit the UnivariateARCHModel specified by am, modifying am in place. Keyword arguments are passed on to the optimizer.
StatsBase.fit — Method.fit(am::UnivariateARCHModel; algorithm=BFGS(), autodiff=:forward, kwargs...)Fit the UnivariateARCHModel specified by am and return the result in a new instance of UnivariateARCHModel. Keyword arguments are passed on to the optimizer.
StatsBase.fit — Method.fit(VS::Type{<:VolatilitySpec}, data; dist=StdNormal, meanspec=Intercept,
algorithm=BFGS(), autodiff=:forward, kwargs...)Fit the ARCH model specified by VS to data.
Keyword arguments:
dist=StdNormal: the error distribution.meanspec=Intercept: the mean specification, either as a type or instance of that type.algorithm=BFGS(), autodiff=:forward, kwargs...: passed on to the optimizer.
Example: EGARCH{1, 1, 1} model without intercept, Student's t errors.
julia> fit(EGARCH{1, 1, 1}, BG96; meanspec=NoIntercept, dist=StdT)
EGARCH{1,1,1} model with Student's t errors, T=1974.
Volatility parameters:
Estimate Std.Error z value Pr(>|z|)
ω -0.0162014 0.0186806 -0.867286 0.3858
γ₁ -0.0378454 0.018024 -2.09972 0.0358
β₁ 0.977687 0.012558 77.8538 <1e-99
α₁ 0.255804 0.0625497 4.08961 <1e-4
Distribution parameters:
Estimate Std.Error z value Pr(>|z|)
ν 4.12423 0.40059 10.2954 <1e-24StatsBase.fit — Method.fit(::Type{SD}, data; algorithm=BFGS(), kwargs...)Fit a standardized distribution to the data, using the MLE. Keyword arguments are passed on to the optimizer.
StatsBase.predict — Method.predict(am::UnivariateARCHModel, what=:volatility; level=0.01)Form a 1-step ahead prediction from am. what controls which object is predicted. The choices are :volatility (the default), :variance, :return, and :VaR. The VaR level can be controlled with the keyword argument level.
StatsBase.residuals — Method.residuals(am::UnivariateARCHModel; standardized=true)Return the residuals of the model. Pass standardized=false for the non-devolatized residuals.