Looking at this live trading score, https://www.quantopian.com/leaderboard/5552d8b7c4b238fb42000579?month=6&year=2015
why is the sharpe negative if the annual returns are positive?
exactly how is the sharpe calculated?
Looking at this live trading score, https://www.quantopian.com/leaderboard/5552d8b7c4b238fb42000579?month=6&year=2015
why is the sharpe negative if the annual returns are positive?
exactly how is the sharpe calculated?
All of our risk metrics are calculated in Zipline, our open-sourced backtester. The Sharpe calculation is available here: https://github.com/quantopian/zipline/blob/master/zipline/finance/risk/period.py#L219
Zipline calculates Sharpe by subtracting the risk-free rate from the average annual return (in the numerator). So the Sharpe will go negative if the annual return is less than the risk-free rate.
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.
@Alisa
What symbol Quantopian use as approximation to calculate risk-free rate?
It is near zero now.
Hi Vladimir, I believe David answered your question was answered here: https://www.quantopian.com/posts/what-quantopian-use-as-approximation-of-risk-free-return-to-calculate-sharpe-ratio
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.
@Alisa
I got the answer were from Q get the data.
The risk free rate used is gotten from the US treasuries data
But not specifically which one?
1 mo 3 mo 6 mo 1 yr 2 yr 3 yr 5 yr 7 yr 10 yr 20 yr 30 yr
@Alisa
If you do not know exactly which one from
1 mo 3 mo 6 mo 1 yr 2 yr 3 yr 5 yr 7 yr 10 yr 20 yr 30 yr
just give me the number and I will find out which Treasury from yield curve.
http://www.investing.com/rates-bonds/usa-government-bonds?maturity_from=10&maturity_to=290
In other words: what is risk-free rate in Quantopian today?
I will not wait the answer.
To calculate what Quantopian use as approximation to risk free interest rate
I will use data from Jeffery contest metric,who initiated this investigation.
https://www.quantopian.com/leaderboard/5552d8b7c4b238fb42000579?month=6&year=2015
but the results are the same on any context data.
As of now it is
Annual Returns 5.158%
Annual Volatility 2.111%
Sharpe 1.297
If
Sharpe Ratio = (Annual Returns-Risk Free Return)/Annual Volatility
then
Risk Free Return = Annual Returns - Sharpe Ratio*Annual Volatility
Risk Free Return = 5.158-1.297*0.8752 = 2.4200
Witch corresponding to 10 year US Treasury Yield
By Zipline's risk module code
def select_treasury_duration(start_date, end_date):
td = end_date - start_date
if td.days <= 31:
treasury_duration = '1month'
It should choose 1 month US T-Bill Yield= -0.010
http://www.investing.com/rates-bonds/usa-government-bonds?maturity_from=10&maturity_to=290
Conclusion:
1.Zipline's risk module choosing wrong US Treasury (not as written in the code) -Please Fix the bug.
2.US Treasury Yields higher than 3 month TBill may not be accepted as approximation to risk free interest rate.
Please remove them from Zipline's risk module code
@Jeffery
If they fix the bug yours sharpe will go up to 2.4481 -congratulation!