calc_ann_turnover.Rd
Annual turnover
calc_ann_turnover(results_df, mean_equity, start_date, end_date)
Results dataframe from rsims backtest
Mean daily portfolio equity
Backtest start date
Backtest end date
Annual turnover as yearly average of total sell trades as pct of mean equity
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")
}