turnover_calc: Turnover

Description Usage Arguments Value Examples

View source: R/port-perf.R

Description

Calculates the average turnover rate of a portfolio strategy.

Usage

1

Arguments

weights

a numerical nxp data matrix with portfolio weights.

rets_oos

a numerical nxp data matrix with stock returns over the same observation period as the weights.

Value

a double, the average turnover rate over the specified observation period.

Examples

1
2
3
4
set.seed(1234)
naive_port <- matrix(runif(200, 0, 1), 20, 10)
returns_oos <- matrix(rnorm(200, 0, 0.1), 20, 10)
turnover <- turnover_calc(naive_port, returns_oos)

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