hac_infer: HAC Test for Variance and Sharpe ratio

Description Usage Arguments Value Examples

View source: R/port-perf.R

Description

Performs a HAC test for differences in the variances or Sharpe ratios of return time series

Usage

1
hac_infer(rets, digits = 3, type = "Var")

Arguments

rets

an nx2 data matrix with returns. Only two return time series can be compared simultaneously.

digits

an integer, indicating how many digits the respective p-values are to be rounded to. Default value is 3.

type

a character. type="Var" performs the HAC test for variances (default). type="SR" performs the HAC test for Sharpe ratios.

Value

a list

Examples

1
2
3
data(sp500_rets)
hac_results_var <- hac_infer(sp500_rets[,c(2,3)])
hac_results_srs <- hac_infer(sp500_rets[,c(2,3)], type="SR")

antshi/auxPort documentation built on Oct. 27, 2020, 1:16 p.m.