Learn R Programming

SVDNF (version 0.1.10)

extractVolPerc.SVDNF: Extract Filtering and Prediction Distribution Percentiles

Description

Function to extract filtering and prediction distribution percentiles from SVDNF and DNFOptim objects.

Usage

# S3 method for SVDNF
extractVolPerc(x, p = 0.5, pred = F, ...)

Value

Return a vector of the pth percentile filtering or prediction distribution volatility factor values depending on whether pred = TRUE or not.

Arguments

x

An SVDNF or DNFOptim object.

p

Distribution percentile to return.

pred

Return the prediction distribution percentile if pred = TRUE, otherwise, return the filtering distribution percentile.

...

Other parameters to be passed through to function.

Examples

Run this code

set.seed(1)

# Define the built-in model using the dynamicsSVM function
Heston_mod <- dynamicsSVM(model = "Heston")

# Generate the data from the Duffie, Pan, and Singleton model
Heston_sim <- modelSim(t = 10, dynamics = Heston_mod)
Heston_dnf <- DNF(dynamics = Heston_mod, data = Heston_sim$returns)

extractVolPerc(Heston_dnf, p = 0.75)

Run the code above in your browser using DataLab