Skip to content

Commit

Permalink
Merge pull request #1485 from bug-or-feature/bug_1482_mixed_index_df
Browse files Browse the repository at this point in the history
fixes backtest crash when attempting to estimate weights for expensive instruments (part 2)
  • Loading branch information
bug-or-feature authored Jan 15, 2025
2 parents 1e30053 + 42c5190 commit 7c5c860
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions systems/portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,16 +727,6 @@ def _add_zero_weights_to_instrument_weights_df(
instrument_list_to_add = (
self.allocate_zero_instrument_weights_to_these_instruments()
)
# weight_index = instrument_weights.index
# new_pd_as_dict = dict(
# [
# (instrument_code, pd.Series([0.0] * len(weight_index)))
# for instrument_code in instrument_list_to_add
# ]
# )
# new_pd = pd.DataFrame(new_pd_as_dict)
#
# padded_instrument_weights = pd.concat([instrument_weights, new_pd], axis=1)

padded_instrument_weights = copy(instrument_weights)
for zero_instr in instrument_list_to_add:
Expand Down

0 comments on commit 7c5c860

Please sign in to comment.