Open gnzsnz opened 1 year ago
this fix will avoid make_index to error out, however the function is returning wrong values. it's hugely overstating results, basically it's rebalancing on the re-balance date and overstating returns on non rebalance dates. which has the net result of applying a leverage on the index.
Since this library no longer seems to be maintained, we have created a duplicate of it that we plan to maintain and improve over time. If you'd like to use our version check it out here: https://github.com/Lumiwealth/quantstats_lumi
Please feel free to fork and send your pull request to this new library, we will be actively monitoring the library and approving PRs
make_index doesnt work because 'break' column is str which makes the sum(axis=1) fail. issue 273
this fix will only use the columns in the original ticker_weights
an alternate fix (not included here) would be to include 'breaks' column in drop line
index.drop(columns=["first_day", "breaks"], inplace=True)