Skip to content

Commit 7c5c860

Browse files
Merge pull request #1485 from bug-or-feature/bug_1482_mixed_index_df
fixes backtest crash when attempting to estimate weights for expensive instruments (part 2)
2 parents 1e30053 + 42c5190 commit 7c5c860

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

systems/portfolio.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,6 @@ def _add_zero_weights_to_instrument_weights_df(
727727
instrument_list_to_add = (
728728
self.allocate_zero_instrument_weights_to_these_instruments()
729729
)
730-
# weight_index = instrument_weights.index
731-
# new_pd_as_dict = dict(
732-
# [
733-
# (instrument_code, pd.Series([0.0] * len(weight_index)))
734-
# for instrument_code in instrument_list_to_add
735-
# ]
736-
# )
737-
# new_pd = pd.DataFrame(new_pd_as_dict)
738-
#
739-
# padded_instrument_weights = pd.concat([instrument_weights, new_pd], axis=1)
740730

741731
padded_instrument_weights = copy(instrument_weights)
742732
for zero_instr in instrument_list_to_add:

0 commit comments

Comments
 (0)