stock2covariates: Construct time series covariates.

Description Usage Arguments Details Value Note Author(s) References

View source: R/dmp__stock2covariates.R

Description

Construct sensible covariates for stock market data.

Usage

1
stock2covariates(file, g = c(0.95, 0.8), kappa = 1, ma = c(1, 5, 20))

Arguments

file

"character". The location of the CSV format file from Yahoo! Finance which can be the http address.

g

"vector". Parameters for geometrically averaging.

kappa

"scaler".

ma

"vector" with integer entries. Moving average indicator for the returns .

Details

The historical finance data can be obtained from "Yahoo! Finance".

Value

"data.frame". The returned data frame only contains the non-NA data due to the moving average procedure.

Note

Created: Thu Jan 05 13:23:35 CET 2012; Current: Mon Sep 28 22:01:20 CST 2015.

Author(s)

Feng Li, Department of Statistics, Stockholm University, Sweden.

References

Geweke, and Keane (2007) p.274


feng-li/flutils documentation built on Oct. 1, 2020, 9:09 p.m.