ldhmm.ts_log_rtn: Get log-returns from historic prices of an index

Description Usage Arguments Value Author(s) Examples

View source: R/ldhmm-ts_log_rtn.R

Description

This utility returns the dates and log-returns of an index available in ecd package. Note that the data from ecd package is static. A limited set of live daily time series can be appended from FRED, e.g. SPX, VIX, DJIA.

Usage

1
2
ldhmm.ts_log_rtn(symbol = "spx", start.date = "1950-01-01",
  end.date = "2015-12-31", on = "weeks", fred.data = FALSE)

Arguments

symbol

character, specify the symbol of the index, default is spx.

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 weeks.

fred.data

logical, specify whether to append daily time series data from FRED, default is FALSE.

Value

list of three vectors: d is the dates and x is log-returns and p is prices

Author(s)

Stephen H. Lihn

Examples

1

ldhmm documentation built on March 18, 2018, 1:51 p.m.