Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Risk Model Improvement: Removing Outliers For More Representative Beta Calculations

Soon we will release an improvement to the risk model for more accurate risk exposure by discounting the effect of return outliers on the calculation of beta. This will be out shortly, here's what's coming.

Quick recap: What is the risk model?
The risk model decomposes the risk of holding any stock (or portfolio of stocks) into a set of common risk factors and a residual risk. That residual risk is called asset/portfolio specific risk or specific risk for short. Colloquially, the return from specific risk is also referred to as alpha. It was released on the platform in November and you can read more about it in this thread.

Where can I use it?
You can use it in an algorithm, by loading pipeline factors around the risk factors and using the output data in constraints in the optimizer. This will allow you to select your universe based on a set of exposures and later limit the exposure in your target portfolio.

What's the latest improvement?
We detected outliers in the return streams and sector residuals, which in turn affected the beta calculation per-stock and per-sector. This means if your algo was constraining on beta, and picked up a stock with an extreme beta value, the optimizer would try to compensate to keep the portfolio beta neutral, and create a basket of stocks to counter this exposure. The outliers have now been clean up and removed, to closer reflect the true beta values.

For example, below you can see the return history of the security SAGE. The plot shows 3 outlier days, which when included in the original risk model release, tilted the linear regression and skewed the beta perception for the security. By removing these outliers, we have a more consistent view of the stock's return stream, and thus beta calculation.

To learn more about risk constraining your algorithm, check out this lecture. Enjoy!

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.

6 responses

Shouldn't this be applied to beta to SPY, too (as computed using SimpleBeta)? Or is it not affected by outliers?

How are the outliers removed? Perhaps:

https://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.stats.mstats.winsorize.html
https://en.wikipedia.org/wiki/Winsorizing

Or something fancier?

Also, how's the risk model white paper coming along? Will it be put out for public comment/peer review at some point?

Hi,

Thought I might be able to learn something...any answers to my questions above?

Hi Grant,

There are many ways to calculate outliers and exposure betas. A common one is to use zscore values as criteria. Another method is the one you mentioned, winsorizing.

In the risk model, we generate returns for style factors using the sector betas of sids in the universe. Assets are meant to be representative of the market, liquid, and stable. An outlier return value is not representative of the the underlying relationship between the asset and the factor. In turn, this affects all style betas and style factor returns downstream. In the risk model, we identified outliers as those return values with an absolute z-score larger than 3.

As for the risk model paper, it's coming along but I don't have a concrete date to share.

Cheers,

Ana

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 all, the risk model update is now live on the platform, and the beta outliers have been removed. You may see slight differences in your backtests if they use risk data. Enjoy using the risk model in your strategy construction.

Cheers,
Alisa

What about beta to SPY? Wouldn’t it be susceptible to outliers in the same fashion?

Also I’m still not clear on the rationale for dropping outliers? Could you please elaborate. Dropping data that are not erroneous is kinda sketchy in my mind.