Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
filter out short and null holdings
Browse files Browse the repository at this point in the history
This is @FrederickFa's suggested (quick but not ideal) change to address the problem discussed in #499. This is also discussed in ADO#661, where there seems to be still some debate on the proper long term solution.
  • Loading branch information
CJ Yetman authored Nov 30, 2021
1 parent 477da47 commit 2e6492a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 3_run_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2e6492a

Please sign in to comment.