santoshlite / EigenLedger

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

Test example is broken #64

Closed dev590t closed 2 years ago

dev590t commented 2 years ago

Describe the bug Empyrial/test/rebalance_test.py and Empyrial/test/optimizer_test.py doesn't run.

To Reproduce

(base) pdm run python Empyrial/test/rebalance_test.py 
Traceback (most recent call last):
  File "Empyrial/test/rebalance_test.py", line 14, in <module>
    empyrial(portfolio, rebalance = True)
TypeError: empyrial() got an unexpected keyword argument 'rebalance'
(base) pdm run python Empyrial/test/optimizer_test.py 
Traceback (most recent call last):
  File "Empyrial/test/optimizer_test.py", line 9, in <module>
    optimizer(portfolio, "EF")
NameError: name 'optimizer' is not defined

I can't find the function optimizer in the code, and the parameter rebalance in the header of function empyrial

santoshlite commented 2 years ago

Hello,

Yes, the optimizer function has been removed.

Here is the doc where you will see how to optimize and rebalance your portfolio now: https://empyrial.gitbook.io/empyrial/

Hope it helps!

dev590t commented 2 years ago

@ssantoshp Thanks