santoshlite / EigenLedger

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

Sharpe ratio calculation #9

Closed ChengLuFred closed 3 years ago

ChengLuFred commented 3 years ago

When I read the source code of 'Sharpe ratio' function, I found that the calculation doesn't take interest rate into account. The formula for SR is E[r - r_f] / sigma, where r_f is risk free rate. I think this would affect the accuracy of results.

santoshlite commented 3 years ago

Thanks!

santoshlite commented 3 years ago

Just corrected it in the new version!