Skip to content

Annualized Sharpe Ratio Calculation #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jakewillms17 opened this issue Jun 20, 2024 · 2 comments
Open

Annualized Sharpe Ratio Calculation #44

jakewillms17 opened this issue Jun 20, 2024 · 2 comments

Comments

@jakewillms17
Copy link

jakewillms17 commented Jun 20, 2024

Wondering why the annualized sharpe ratio calculation doesn't line up with the traditional methodology of annualized return / annualized volatility?

qs.stats.cagr(returns)/qs.stats.volatility(returns)
0.6317448862990539
qs.stats.sharpe(returns)
0.8451565697277529

returns is a daily returns object. All other resources I've worked with give a number like the 0.6317 value (R, online resources).

@jakewillms17
Copy link
Author

following up on this, most of the difference was as a result of the 365 days for a period. This should be 252. the rest, however, would have to do with using arithmetic vs. geometric return when calculating Sharpe I believe?

@cantupaz
Copy link

I was looking at some results from these two functions. I think the problem is that cagr() and sharpe() use the periods parameter to mean different things. In cagr() the periods parameter is used to calculate the number of years between the first and last return (so it's really meant to be 365). But in sharpe() the periods parameter is meant to be the number of periods in a year, so if returns has a monthly frequency we should use 12, 52 for weekly returns and 252 (or 365) for daily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants