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
)list of three vectors: d is the dates and x is log-returns and p is prices
character, specify the symbol of the index, default is spx.
If fred.data is true, the program can infer FRED symbol as upper case of symbol.
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.
character, specify the interval, days, weeks, months. Default is weeks.
logical, specify whether to append daily time series data from FRED, default is FALSE.
Stephen H. Lihn