santoshlite / EigenLedger

An Open Source Portfolio Backtesting Engine for Everyone | 面向所有人的开源投资组合回测引擎
https://eigenledger.gitbook.io/documentation
Apache License 2.0
942 stars 128 forks source link

Stop Auto Rebalancing #77

Closed AhmedEissa123 closed 1 year ago

AhmedEissa123 commented 1 year ago

How do I stop auto rebalancing? My problem is that I found that the total cumulative return is not the weighted average of the cumulative return of each asset.

AhmedEissa123 commented 1 year ago

I found that my calculations were wrong so I’m closing this issue.

AhmedEissa123 commented 1 year ago

So after some other calculations, I found that some of your code is wrong (I think). So the problem with your code is it doesn’t account properly for changing weights over time. Since, you multiply all the returns data in the get returns function by the same weights. While actually as the price changes for assets in the portfolio weights also change.

santoshlite commented 1 year ago

Fixed in v2.1.2 of Empyrial!