quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

How is the sharpe ratio calculated?

Open LHanLi opened this issue 3 years ago • 1 comments

the sharpe ratio is defined as (r-r_f)/sigma, however i can' get this value from the annual return and annual volatility. In my case, the annual return is 4.21%, free risk rate is 3%, volatility is 9.94%, the sharpe ratio should be (0.0421-0.03)/0.094 = 0.1217, but quantitates give a sharpe is 0.18.

LHanLi avatar Mar 23 '23 11:03 LHanLi

image Quantstats calculates the Sharpe ratio by dividing the mean of the return series by the volatility of the return series and then annualizing it.

liuweihan826 avatar Aug 07 '23 06:08 liuweihan826