Learn R Programming

PCRA (version 1.3.1)

ewmaMeanVol: EWMA Mean and Volatility

Description

Computes EWMA joint mean and vol, with options for robust versus classic EWMA estimates.

Usage

ewmaMeanVol(
  x,
  nstart = 10,
  robMean = T,
  robVol = T,
  cc = 2.5,
  lambdaMean = 0.9,
  lambdaVol = 0.9
)

Value

A bivarate xts object containing the ewmaMean and ewmaVol

Arguments

x

An xts returns object

nstart

Integer number of returns for initial ewma estimates

robMean

Logical variable, if TRUE compute robust ewmaMean, if FALSE compute classic classic ewmaMean. Default is TRUE

robVol

Logical variable, if TRUE compute robust ewmaVol, if FALSE compute classic ewmaVol. Default is TRUE.

cc

Numeric value, robustness tuning constant. Default is 2.5

lambdaMean

Numeric value, decay rate constant for ewmaMean

lambdaVol

Numeric value, decay rate constant for ewmaVol

Examples

Run this code
args(ewmaMeanVol)

Run the code above in your browser using DataLab