View source: R/ldhmm-ts_log_rtn.R
ldhmm.ts_log_rtn | R Documentation |
This utility returns the dates and log-returns of an index available in the package. Note that the data is static. A limited set of live daily time series can be appended from FRED, e.g. SPX, VIX, DJIA.
ldhmm.ts_log_rtn(
symbol = "spx",
start.date = "1950-01-01",
end.date = "2015-12-31",
on = "weeks",
fred.data = FALSE
)
symbol |
character, specify the symbol of the index, default is |
start.date , end.date |
Date or character of ISO format (YYYY-MM-DD), to specify the date range, default is from 1950-01-01 to 2015-12-31. Set start.date and end.date to NULL or "" if you wish to get the entire time series. |
on |
character, specify the interval, days, weeks, months. Default is |
fred.data |
logical, specify whether to append daily time series data from FRED, default is |
list of three vectors: d
is the dates and x
is log-returns and p
is prices
Stephen H. Lihn
a <- ldhmm.ts_log_rtn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.