Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update utils.py - fix issue 273 , make_index not working #282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gnzsnz
Copy link

@gnzsnz gnzsnz commented Jul 16, 2023

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)

make_index doesnt work because 'break' column is str which makes the sum(axis=1) fail.

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 first marker
index.drop(columns=["first_day", "breaks"], inplace=True)
@gnzsnz
Copy link
Author

gnzsnz commented Jul 20, 2023

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.

@grzesir
Copy link

grzesir commented Jan 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants