Description Usage Arguments Author(s) Examples
View source: R/ldhmm-oxford_man_plot_obs.R
This utility plots the Oxford-Man realized volatility (from SPX2.rv) and overlays with the HMM expected volatility with the observations set up SPX2.r. This graph is to show that the HMM is capable of reproducing the realized volatility. Optionally the insert shows the relation between the return and volatility indicated by each state. This plot is also called "volatility yield curve".
1 2 3 4 5 |
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 |
index.symbol |
character, the symbol of the index. Default is |
index.rv |
character, specifying index realized variance column, default is |
index.px |
character, specifying index closing price column, default is |
index.px.scale |
numeric, specifying the scaling factor when plotting price trend, default is 15.
Set this to |
index.px.origin |
numeric, specifying the starting value of the index price line,
the default is |
index.vol.ma.order |
a positive integer specifying the simple moving average of the realized volatility, default is 5. This is needed because the realized volatility is very noisy at the daily level. |
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 |
Stephen H. Lihn
1 2 3 4 | ## Not run:
ldhmm.oxford_man_plot_obs(NULL)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.