Open KZARCA opened 1 year ago
Hi! I might have spotted an error. Total equity is computed within calc_port_returns as the sum of exposures.
calc_port_returns
results_df %>% dplyr::group_by(date) %>% dplyr::summarise(totalequity = sum(exposure, na.rm = TRUE))
For the futures contracts, shouldn't it computed as the margin + cash exposure ?
results_df %>% dplyr::group_by(date) %>% dplyr::summarise(totalequity = sum(margin + first(exposure), na.rm = TRUE))
If that's the case, I can open a PR if you want. Best
Hi! I might have spotted an error. Total equity is computed within
calc_port_returns
as the sum of exposures.For the futures contracts, shouldn't it computed as the margin + cash exposure ?
If that's the case, I can open a PR if you want. Best