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

empyrial bugs with start_date and bug with strategy vs benchmark for … #72

Merged
merged 1 commit into from
May 22, 2022

Conversation

rgleavenworth
Copy link
Contributor

…returns

@rgleavenworth
Copy link
Contributor Author

I've fixed the bugs with strategy vs benchmark returns. The bug in the monthly and annual returns was due to the benchmark having a NaN value in the first value in the series which was treated as a 1 by quantstats. You have to dropna() to get the values to match betwen strategy and benchmark

Besides this, you were using the wrong datetime strptime for converting start date to datetime. I've fixe this too.

@santoshlite santoshlite merged commit 3ab3a46 into santoshlite:main May 22, 2022
@santoshlite
Copy link
Owner

Thanks, @rgleavenworth for your contribution! Install Empyrial 2.0.1 and it should work now!

@rgleavenworth
Copy link
Contributor Author

Outstanding! Thanks

@atobiese
Copy link

Hi, I looked quickly at the #72, but this does not solve the underlying problem in the calculations with rebalancing. A simple check is to run the same test as in #65, over a larger time interval, and specifying an end date. Run one with balancing and one w/o. Then compare cagr and cumulative returns for the two cases. The values should be identical within the num precision (there are huge differences). I will look at this when time.

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.

3 participants