Learn R Programming

ldhmm (version 0.6.1)

ldhmm.fred_data: Utility to download time series from FRED

Description

This utility downloads time series from FRED. It serves as a data source for daily data, e.g. SP500 for S&P 500, and VIXCLS for CBOE VIX index. This can be concatenated to the static data to provide daily updates.

Usage

ldhmm.fred_data(symbol, col_out = "Close", do.logr = TRUE)

Value

The xts object for the time series

Arguments

symbol

character, the name of the time series

col_out

character, the name of the output closing price column. Default: "Close"

do.logr

logical, if TRUE (default), produce xts object of logr; otherwise, just the col_out column. Be aware that, because logr uses diff, the first day close will be deleted.

Examples

Run this code
if (FALSE) {
ldhmm.fred_data("VIXCLS")
}

Run the code above in your browser using DataLab