cov_wgt_avg: Weighted average covariance matrix

Description Usage Arguments Note

View source: R/QuantAnalysis.R

Description

Weighted average covariance matrix

Usage

1
2
3
4
5
6
7
8
9
cov_wgt_avg(
  ret,
  long_win = 252,
  med_win = 63,
  short_win = 21,
  long_wgt = 0.25,
  med_wgt = 0.25,
  short_wgt = 0.5
)

Arguments

ret

data.frame containing returns

long_win

= long window length

med_win

= medium window length

short_win

= short window length

long_wgt

= weight of long window covariance

med_wgt

= weight of medium window covariance

short_wgt

= weight of short window covariance

Note

The short window and weight place a higher emphasis on recent returns, while the longer window and weight place a more neutral weight on recent returns and returns further in the past. This covariance calculation is similar to an exponentially weighted moving average but is less computationally intensive.


alejandro-sotolongo/InvestmentSuite documentation built on Jan. 19, 2020, 5:20 p.m.