Annual turnover

calc_ann_turnover(results_df, mean_equity, start_date, end_date)

Arguments

results_df

Results dataframe from rsims backtest

mean_equity

Mean daily portfolio equity

start_date

Backtest start date

end_date

Backtest end date

Value

Annual turnover as yearly average of total sell trades as pct of mean equity

Examples

if (FALSE) {
results_df <- cash_backtest(prices, weights)
port_returns <- results_df %>%
  calc_port_returns()
mean_equity <- mean(port_returns$totalequity)
results_df %>%
  calc_ann_turnover(mean_equity, "2000-01-01", "2021-12-31")
}