plot.predict.DNFOptim {SVDNF}R Documentation

Plot Predictions from DNFOptim or SVDNF Objects

Description

Plot predictions from a DNFOptim or SVDNF object, including volatility and return mean predictions with confidence intervals.

Usage

  ## S3 method for class 'predict.DNFOptim'
plot(x, ...)
  
  ## S3 method for class 'predict.SVDNF'
plot(x, ...)

Arguments

x

an object of class predict.DNFOptim or predict.SVDNF.

...

further arguments passed to or from other methods.

Details

This function plots the volatility and return predictions with confidence intervals obtained from a DNFOptim object.

For the volatility plot, it displays the DNF's filtering distribution median volatility for all time points in the series and, after the last observation, plots the predicted mean volatility with its confidence interval.

For the returns plot, it displays the observed returns for all time points in the series and, after the last observation, plots the predicted mean return with its confidence interval.

Value

No return value; this function generates two plots.

The first has the median volatility from the filtering distribution as well as the mean predicted volatility from Monte Carlo simulated paths with its confidence interval.

The second has the observed asset returns as well as the mean predicted returns from Monte Carlo simulated paths with its confidence interval.

Examples

# Generating return data
Taylor_mod <- dynamicsSVM(model = "Taylor", phi = 0.9,
                           theta = -7.36, sigma = 0.363)
Taylor_sim <- modelSim(t = 100, dynamics = Taylor_mod, init_vol = -7.36)
 
# Run the DNF
DNF_Taylor <- DNF(dynamics = Taylor_mod, data = Taylor_sim$returns)
 
# Predict the next 10 time steps
predict_Taylor <- predict(DNF_Taylor, n_ahead = 10)

# Plot the predictions
plot(predict_Taylor)


[Package SVDNF version 0.1.8 Index]