CorrSurface: CorrSurface

Description Usage Arguments Value Examples

Description

The function

Usage

1
2
CorrSurface(price, lookback_seq, holddays_seq, Sign = FALSE,
  return_method = c("arithmetic", "log"))

Arguments

price

an object of time serise representing a price series.

lookback_seq

a sequence of lookback length.

holddays_seq

a sequence of holddays length.

Sign

whether the returns or signs of returns are used to calculate correlation, default is FALSE.

return_method

method of calculating returns.

Value

a 3_D plot of correlation coefficient on lookback period and holding period.

Examples

1
2
3
4
5
6
lookback_seq <- seq(from = 1, to = 200, by = 10)
holddays_seq <- seq(from = 1, to = 100, by = 10)
getSymbols("^GSPC", from = 2010, to = Sys.Date())
price <- GSPC[, 6]
cs <- CorrSurface(price, lookback_seq = lookback_seq, holddays_seq = holddays_seq,
Sign = TRUE, return_method = "log")

OUKUN0705/timeseriesmom documentation built on May 7, 2019, 8:55 p.m.