ldhmm.plot_spx_vix_obs {ldhmm} | R Documentation |
Plotting HMM expected volatility for SPX overlaid with adjusted VIX
Description
This utility plots the HMM expected volatility of SPX overlaid with the VIX index adjusted by a ratio. The expected volatility is shown to have a long-term ratio of 0.79 relative to the VIX index. This plot will show how HMM deviates from VIX in a shorter time window. Optionally the insert shows the relation between the return and volatility indicated by each state. This plot is also called "volatility yield curve".
Usage
ldhmm.plot_spx_vix_obs(
object,
days.pa = 252,
start.date = NULL,
end.date = NULL,
px.origin = NULL,
px.scale = NULL,
vix.adj.ratio = NULL,
insert.plot = TRUE,
insert.viewport = NULL
)
Arguments
object |
an ldhmm object with a stationary solution. If this is set to |
days.pa |
a positive integer specifying trading days per year, default is 252. |
start.date |
Date or character of ISO format (YYYY-MM-DD),
specifying the start date of the plot, default is |
end.date |
Date or character of ISO format (YYYY-MM-DD),
specifying the end date of the plot, default is |
px.origin |
numeric, specifying the starting value of the index price line,
the default is |
px.scale |
numeric, specifying the scaling factor when plotting price trend, default is 15. The closing price is converted to cumulative return by the price of the first date. Then plot from the mid-point of volatility axis with this scale. |
vix.adj.ratio |
numeric, if specified, VIX index is adjusted and plotted, default is |
insert.plot |
logical, if true, also plot the volatility-return as insert in upper-right corner, default is |
insert.viewport |
optional viewport for the insert, default is |
Author(s)
Stephen H. Lihn
Examples
## Not run:
ldhmm.plot_spx_vix_obs(h)
## End(Not run)