Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Possible Beta Calculation Discrepancy?

I am just trying to understand these numbers that I am seeing here:

Algo Stats

I have an algo with a clear short bias that I started on 7/14. The live trading dashboard shows the beta at -0.05, while the contest leaderboard shows the beta at 1.036. What is accounting for this huge difference in numbers? A beta of 1.036 indicates to me near 100% correlation to SPY, which this algo clearly is not.

2 responses

I think you're running into this zipline bug.

If it's that bug, what's happening is that your portfolio value is correctly reflecting dividend payments, but the dividends are not being included in the risk metric calculations. The leaderboard is doing it correctly, and paper trading is not. One way to check is to run a backtest on the same period; the backtest doesn't have the bug, only paper trading.

To confirm that is the bug, we'd need to dig into the exact algo. Please email the information to [email protected]

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.

Hi Dan,

Thanks for the response. I ran a backtest for the same 4-day period, and it gave me a beta of -1.17... something totally out of left field. So to summarize, I started the algo on 7/14 at 11:27 am. Paper trading dashboard shows -0.05 beta (as of 7/18). Contest shows 1.036 beta (as of 7/18). Minute backtest from 7/14-7/17 shows -1.17. I will actually let it continue running for a bit to see if any if the betas sync up. If the numbers don't sync up by the end of the week, I'll follow up.