Reference guide
Index
HypothesisTests.LjungBoxTest
ValueAtRisk.ARCHSpec
ValueAtRisk.ARCHVaR
ValueAtRisk.BacktestResult
ValueAtRisk.BacktestResult
ValueAtRisk.CAViaR_ad
ValueAtRisk.CAViaR_asym
ValueAtRisk.CAViaR_sym
ValueAtRisk.EWMAHistoricalSimulationVaR
ValueAtRisk.EWMARiskMetricsVaR
ValueAtRisk.ExtremeValueTheoryVaR
ValueAtRisk.FilteredExtremeValueTheoryVaR
ValueAtRisk.FilteredHistoricalSimulationVaR
ValueAtRisk.HistoricalSimulationVaR
ValueAtRisk.LRucTest
ValueAtRisk.LRucTest
ValueAtRisk.LRucTest
StatsAPI.predict
ValueAtRisk.backtest
ValueAtRisk.backtest
ValueAtRisk.confidence_levels
ValueAtRisk.dupefit
ValueAtRisk.flexfit
ValueAtRisk.shared_arch_models_dict
ValueAtRisk.shares_arch_dynamics
ValueAtRisk.shortname
ValueAtRisk.shortname
API
HypothesisTests.LjungBoxTest
— MethodLjungBoxTest(data::Vector{T}, vars::Vector{T}, lag::Integer=1)
Compute the Ljung-Box Q
statistic to test the null hypothesis of independence in the violations/hits sequence that is implied by the vectors of realizations (data
) and Value-at-Risk forecasts(vars
). lag
specifies the number of lags used in the construction of Q
ValueAtRisk.ARCHSpec
— TypeARCHSpec
A specification for the GARCH dynamics of an appropriate model
ValueAtRisk.BacktestResult
— Typestruct BacktestResult{T<:Real}
A type that contains information on the results of backtesting a VaRModel
on a dataset.
ValueAtRisk.BacktestResult
— MethodBacktestResult(dataset::String, vm::VaRModel, windowsize::Integer, level::T1
data::Vector{T1}, vars::Vector{T1}; lags::Integer=1) where T1<:Real
Create an object of type BacktestResult
. dataset
specifies the name of the dataset on which Value-at-Risk backtesting was performed. vm
specifies the VaRModel
used for obtaining Value-at-Risk estimates. windowsize
specifies the number of in-sample observations that were used to obtain each out-of-sample VaR forecast. level
is VaR quantile level. data
is the vector of realizations, while vars
is the vector of VaR estimates. The optional parameter lags
specifies the number of lags used in the DQTest
and LjungBoxTest
for testing the time independence of the violations/hits sequence of VaR estimates.
ValueAtRisk.LRucTest
— TypeDQTest <: HypothesisTest
Christoffersen's (1998) Unconditional Coverage Likelihood Ratio test (out of sample)
ValueAtRisk.LRucTest
— MethodLRucTest(violations::AbstractArray{Bool},level)
Conduct Christoffersen's (1998) Unconditional Coverage Likelihood Ratio test by passing a a AbstractArray{Bool}
representing the violations/hits sequence and the VaRModel
quantile level
ValueAtRisk.LRucTest
— MethodLRucTest(data::Vector{T}, vars::Vector{T},level)
Conduct Christoffersen's (1998) Unconditional Coverage Likelihood Ratio test by passing a a vector of realizations accompanied by a vector of the correponding VaR forecasts and the VaRModel
quantile level
StatsAPI.predict
— Methodpredict(vm::VaRModel, data::AbstractVector)
Return a one-step ahead VaR forecast with VaRModel
vm for the provided data vector
ValueAtRisk.backtest
— Methodbacktest(vms::Vector{<:VaRModel}, data::Vector{<:Real},
windowsize::Integer;dataset_name::String="Dataset name not specified",
lags::Integer=5)
Backtests a single VaRModel
on the supplied dataset. windowsize
specifies the number of in-sample observations used for forecasting Value-at-Risk. backtest(...)
returns an object of type BacktestResult
. The optional parameter lags
controls the number of lags used in the the tests of time independence. dataset_name
may be provided in order to be included in the BacktestResult
ValueAtRisk.backtest
— Methodbacktest(vms::Vector{<:VaRModel}, data::Vector{<:Real},
windowsize::Integer;dataset_name::String="Dataset name not specified",
lags::Integer=5)
Backtest multiple VaRModel
s on the supplied dataset. windowsize
specifies the number of in-sample observations used for forecasting Value-at-Risk. backtest(...)
returns a vector of BacktestResult
s. The optional parameter lags
controls the number of lags used in the the tests of time independence. dataset_name
may be provided in order to be included in the BacktestResult
ValueAtRisk.confidence_levels
— Methodconfidence_levels(vm::VaRModel)
Return the confidence level(s) for the given model
ValueAtRisk.dupefit
— Methoddupefit(asp::ARCHSpec, data::AbstractVector; prefitted::Union{ARCHMode[l,Nothing}=nothing])
A wrapper around flexfit(asp::ARCHSpec, data::AbstractVector)
that fits an ARCHModel
only once if multiple VaR models depend on the same underlying ARCHSpec
in order to avoid wasted repetitions
ValueAtRisk.flexfit
— Methodflexfit(asp::ARCHSpec, data::AbstractVector)
A wrapper around fit(VS::Type{<:UnivariateVolatilitySpec}, data; dist=StdNormal, meanspec=Intercept, algorithm=BFGS(), autodiff=:forward, kwargs...)
that catches AssertionError
s thrown when the requested ARCHSpec
could not be fitted and falls back to fitting GARCH{1,1} as the volatility specification
ValueAtRisk.shared_arch_models_dict
— Methodshared_arch_models_dict(vms::AbstractVector{<:VaRModel})
Return a dict with key an ARCHSpec
and value a Union{ARCHModel,Nothing}
ValueAtRisk.shares_arch_dynamics
— Methodshares_arch_dynamics(vm::VaRModel)
Whether the given model contains a specification for autoregressive conditionaly heteroskedastic dynamics. If models share such a specification the model is fitted only once during backtesting
ValueAtRisk.shortname
— Methodshortname(asp::ARCHSpec)
Print a short description for the ARCHSpec given. Orders of ARCH models and mean specifications are ignored
ValueAtRisk.shortname
— Methodshortname(vm::VaRModel)
Print a short description for the model given