Skip to contents

Match different decay-factors on the covariance matrix.

Usage

double_decay(x, slow, fast)

# S3 method for default
double_decay(x, slow, fast)

# S3 method for numeric
double_decay(x, slow, fast)

# S3 method for matrix
double_decay(x, slow, fast)

# S3 method for ts
double_decay(x, slow, fast)

# S3 method for xts
double_decay(x, slow, fast)

# S3 method for tbl
double_decay(x, slow, fast)

# S3 method for data.frame
double_decay(x, slow, fast)

Arguments

x

An univariate or a multivariate distribution.

slow

A double with the long half-life (slow decay) for the correlation matrix.

fast

A double with the short-life (high decay) for the volatility.

Value

A numerical vector of class ffp with the new probabilities distribution.

References

De Santis, G., R. Litterman, A. Vesval, and K. Winkelmann, 2003, Covariance matrix estimation, Modern investment management: an equilibrium approach, Wiley.

Examples

# \donttest{
  library(ggplot2)

  slow <- 0.0055
  fast <- 0.0166
  ret <- diff(log(EuStockMarkets))

  dd <- double_decay(ret, slow, fast)
  dd
#> <ffp[1859]>
#> 0.000372852 0.000398851 0.0005750612 0.0004815779 0.000553617 ... 0.0007460361

  autoplot(dd) +
    scale_color_viridis_c()

# }