diff --git a/3_run_analysis.R b/3_run_analysis.R index 69a3621a..c72d7eb2 100644 --- a/3_run_analysis.R +++ b/3_run_analysis.R @@ -52,6 +52,8 @@ if (file.exists(equity_input_file)) { port_raw_eq <- port_raw_all_eq %>% filter(investor_name == investor_name_select) port_eq <- calculate_weights(port_raw_eq, "Equity", grouping_variables) + + port_eq <- port_eq %>% filter(port_weight > 0) # filter out short and null holdings port_eq <- merge_in_ald(port_eq, ald_scen_eq) @@ -152,6 +154,8 @@ if (file.exists(bonds_inputs_file)) { port_raw_cb <- port_raw_all_cb %>% filter(investor_name == investor_name_select) port_cb <- calculate_weights(port_raw_cb, "Bonds", grouping_variables) + + port_cb <- port_cb %>% filter(port_weight > 0) # filter our short and null holdings port_cb <- merge_in_ald(port_cb, ald_scen_cb)