Replies: 1 comment
-
|
Hi! The calculation is entirely dependent on the period you select. For example lets say you select "monthly" as a period, in that case it uses a DataFrame with 3 index levels (ticker, month, days within the month) and calculates the average return and standard deviation within the month. This is where it makes sense to do However, the regular daily Sharpe Ratio (not within a period) is simply (Return - Risk Free Rate) / (Standard Deviation of Return minus Risk Free Rate) and that is exactly why you do not see a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for this great library.
I just want to confirm if the Sharpe ratio calculation here is intentional or if it might be an oversight.
https://github.com/JerBouma/FinanceToolkit/blob/aa6cb284cda91b6c695b3e5a6fd08153c4220c37/financetoolkit/performance/performance_model.py#L511C1-L515C53
Shouldn't it be
excess_returns.mean() / excess_returns.std()?Beta Was this translation helpful? Give feedback.
All reactions