stock2covariates: Construct time series covariates.

View source: R/stock2covariates.R

stock2covariatesR Documentation

Construct time series covariates.

Description

Construct sensible covariates for stock market data.

Usage

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


thiyangt/fformpp documentation built on Jan. 5, 2024, 5:44 a.m.