Back to Community
Risk free rate in Sharpe Ratio computation

Hi,

I'm relatively new to quantitative trading and Quantopian, and was hoping someone could clarify:
(a) What is the risk-free rate used in Quantopian's computation of the Sharpe Ratio and can it be changed? (b) In case of global equities (for example, NSE India), is the general practice to use the bond yield of the local currency as the risk-free rate (RBI bonds in this case) or otherwise?

Thanks,
Ravi

4 responses

Hi Ravi,

Welcome to Quantopian! We use the 10 year treasury rate as the risk-free rate to calculate the Sharpe Ratio. This rate can't be changed in the Quantopian IDE. The engine powering the backtester is called Zipline and it's entirely open-sourced. If you'd like to see all of the risk calculations, they're available on Github.

We have price data and recently added fundamental data to the platform. If you're curious about our data sources, you can read more in the help doc.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Thanks, Alisa.

Hi Alisa. I would like to code the same Sharpe in my algo. Is there an API for this?

Hi Alisa -

I note your comment above:

We use the 10 year treasury rate as the risk-free rate to calculate the Sharpe Ratio

I'm confused. Recently, there was a lot of discussion around this topic on:

https://www.quantopian.com/posts/risk-free-rate-on-quantopian

It was communicated that the risk-free rate is not incorporated into any Q Sharpe ratio computations. It seems it was, at some point, and then it was dropped? What's the story?