Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Why are sector/style risk constraints not absolute?

I have a bit of a theoretical question:
When I was reading the contest rules I noticed the constraint for Beta to SPY is an absolute value, meaning it cannot be too low or too high. However the Beta to (known) Risk Factors and sectors is only positive. Meaning there is no constraint on how low it can go. Why is that? Should these betas be absolute as well?

It would seem that if we knew a sector/style was doing poorly, we could derive returns from this, and still meet the contest requirements. However doing this would seem to violate the intent of looking at these exposures which is to find alpha.

8 responses

For beta-to-SPY, we have a decent definition:

Beta-to-SPY is measured over a rolling 6-month regression length...

It could be tightened up by specifying precisely how the regression is performed, but I gather that it is probably the slope of the line found with an unweighted least-squares fit to a linear model of the algo daily returns (close-to-close) versus the SPY daily returns (close-to-close). Thus the slope could be positive or negative.

For the risk model, "exposure" is not defined, but presumably includes both positive and negative correlations to a given risk factor. One way to test this would be to write a simple algo that runs with the built-in RSI as its only factor. In the Optimize API, disable the short-term reversal risk factor. Run the algo with both positive and negative RSI and see if if fails in both cases.

Would appreciate some clarification on risk factors. I'm part of Quantopian's target market, a software developer and not a stock market guru so when I hear "risk factor", I have to try to guess what each author is thinking of when they use the words. Feels awkward to ask but the unknowns reached a threshold. Here's a discussion about risk factors that itself also involves questions, with a backtest intended to demonstrate something involving that risk (2.35% over 3 years as significant or returns are irrelevant, more likely). In looking up "risk factor", Sharpe and Fama-French are cited, one is a metric and looking up the latter it is some sort of model involving capm. Besides metrics and models there are other types of factors like pipeline factors, blocks of code we use for returning values to be used as filters or assigning long & short allocations, and then factors built-in for import like AnnualizedVolatility, SimpleBeta, Returns, AverageDollarVolume. Alpha factors of course, and various overlap in a factors venn diagram (overlapping circles).

Looking up risk factors, at investopedia they describe 5 risk factors: Business, Call, Allocation, Political & Dividend risks. So those risk factors are different than the risk factors here. It is possible that different people are visualizing different things when they refer to "risk factors". I suppose I'm just registering discomfort from often not having a clear picture of what is meant by risk.

Note that Q intends to publish a "white paper" on their risk model. Hard to say what it will include, as they are tending to keep details "close to the chest" at this point. Why they haven't at least open-sourced the code is beyond me, but I guess they have their motivations.

The big picture is that I gather that risk management is part of any system (see https://blog.quantopian.com/a-professional-quant-equity-workflow/), and is applied when the portfolio is constructed, and is basically a way for the manager to make sure that diversification and exposures to certain investment styles comply with a policy, e.g. for an index fund/ETF tracking the S&P 500, presumably, the primary risk would be tracking error. I gather that just like an index fund and its market, the market for hedge funds wants to see "risks" spelled out and managed. In my mind, it is really a kind of investment policy that is being imposed, more so than managing risk. For example, if I write a single-factor RSI algo it would seem to be less risky than other strategies, since I can run backtests back to the dawn of time, get a pretty good idea of how it will behave, and it is very transparent as a simple computation (no fancy black-box ML, for example). It should be a low-risk WYSIWYG strategy (it might not make money, but I would not think of it as risky, in the sense that it will do something completely unexpected).

Someone can correct me if I'm wrong, but the single-factor model CAPM is an extremely well respected starting point for measuring overall risk. Multi-factor models, like the Fama-French 3-factor model, are also well respected, but no where near as approved by academics as CAPM.

With that said, I believe at some point Quantopian will account for factors like value, size, momentum but you have to keep in mind, a factor adjust returns for risk and factors go in and out of favor over time which results in a lot of subjectivity to whether they actually create risk.

I gather that the Quantopian lingo of "risk factor" is basically synonymous with "style factor" in the retail space. You have whatever one would define as the total market, and any bias/tilt relative to the market is considered a "risk" (although for retail investors, this term is not generally used, and instead the term "style" is used--fashionable, hip, trendy, etc.). For Quantopian, I guess their total market investment would be SPY? Or perhaps a market-cap weighted QTradableStocksUS? But then one would have to decide what to long and what to short and when...but I guess that doesn't matter in determining exposures?

I gather that the "risk" for Q is that they need to avoid strategies that could be accomplished by cobbling together a portfolio of sector and style ETFs. For example, iShares has a whole set of factor ETFs (https://www.ishares.com/us/products/etf-product-list#!type=ishares&tab=overview&view=list&fst=49915%7C49916). So, if Q offers an investment product that is efffectively just a linear combination of sector and factor ETFs, then they'll bring nothing to the table.

Part of the confusion in using the term "risk factor" is that it doesn't jibe directly with the typical plot of portfolio return versus risk, where risk would be a measure of the variability in returns (e.g. the standard deviation of the returns). However, I guess the idea is that if one picks the factors and picks a risk level (standard deviation of the returns), then one can find a portfolio that maximizes the return (assuming that history repeats itself on the time scale of the investment). It is not so clear to me how the factors relate to the horizontal risk axis, though.

I'm gathering that risk factors are just ways of categorizing things, in both strategy and reports, and maybe it's up to each company's preference to decide what they focus on in their risk model. Fair enough. With every return, there was some risk but the word risk here doesn't necessarily mean in the sense of risk of loss, I suppose that's what threw me off. Looks like the risk factors people are referring to, are in two groups, sectors and something called styles, for lack of a better word. Each stock's sector code places it in one of 11 sectors assigned by the industry, that part is straightforward. Styles are 5 things: Size & value (marketcap and price) and then momentum & volatility, and also short-term-reversal. So risk factors cover quite a bit of territory. For those who have years of investment experience I'm sure those begin to come into clear focus.

Thank you to everyone who has replied.

I have consulted with a few books, a fund manager (one of the speakers at Quantcon), and searched the internet. I have come to the conclusion that I was correct: style betas should also be measured in absolute value of beta.

  1. Here is a good overview of style factors from guys at AQR. They also talk about looking at the t-stats of the Betas, which
    seems like an extremely logical thing to do. AQR also has an article about betting against style factors which is an interesting twist.

  2. The book "Inside the Black Box" by Rishi Narang has a good qualitative intro to risk models and risk factors in Chapter 4. Here is the best quote from the intro to Chapter 4 that I think would help explain risk factors the most: "So the key to understanding risk exposures as they relate to quant trading strategies is that risk exposures are those that are not intentionally sought out by the nature of whatever forecast the quant is making in the alpha model." Side effects if you will. Say Grant's manager asks him to design a drug that solves male pattern baldness, he does and presents it to his manager. His manager would then need to check for the drug's side effects, does it kill subjects? Dead subjects aren't good for sales.... You get the point, risk exposures are side effects, we ideally don't want, and practically should minimize.

  3. There are two books with almost identical titles starting with: "Quantitative Equity Portfolio Management...", I was not able to review either of them at the time of writing. They both appear to cover this topic quantitatively, and appear to be extremely relevant to many things related to Quantopian's trading.

I consider this question closed at this point and will be moving on, thanks again to everyone who replied. To anyone at Quantopian reading this: You should change the wording for the contest requirements.

Thanks Peter -

I'd note that Q is using an operational definition of exposure to their proprietary risk model:

Low exposure to Quantopian risk model: Contest entries must be less than 20% exposed to each of the 11 sectors defined in the Quantopian risk model. Contest entries must also be less than 40% exposed to each of the 5 style factors in the risk model. Exposure to risk factors in the Quantopian risk model is measured as the mean net exposure over a 63-trading-day rolling window at the end of each trading day. Contest entries can exceed these limits on up to 2% of trading days 2 from years before the entry was submitted to today. Entries are allow to have each of sector exposure as high as 25% on 2% of trading days. Additionally, each style exposure can go as high as 50% on 2% of trading days.

Note that the definition does not use the term "beta" as we have for the beta-to-SPY.

A link to the assessment tool can be found here:

https://www.quantopian.com/tutorials/contest#lesson11

So, basically, "exposure to the Quantopian risk model" is whatever the tool tells you it is--no need to worry about absolute beta, etc. Of course, if the tool is spitting out +/- (exposure)% values, then either the contest rule needs to be changed, or the assessment notebook should just report absolute values. But what the tool is doing with respect to published approaches to managing portfolio risk is completely opaque at this point, from a detailed quantitative standpoint.

Potentially, the Quantopian risk model formulation is similar to what is described here:

https://www.quantopian.com/lectures/factor-risk-exposure

I think we have to wait and see what is described in the forthcoming Quantopian risk model white paper, to see if it provides a kind of quantitative specification that would allow tying it to approaches to risk management described elsewhere.

I would also note that there is a talk scheduled for QuantCon:

'Quantopian Risk Model' by Rene Zhang, Data Scientist at Quantopian

Ideally, the risk model code would be published, with generous comments; this would remove any questions regarding what computations are used. I recall being told that the code would not be published, so we'll have to work with what is provided describing what the code does.

Regarding t-stats (presumably as a measure of the statistical strength of a given factor), I had pointed this out to Q when they introduced the model. If a risk factor is just gobbled-gook, not explaining anything, then it would seem pointless to include it in a risk model and risk assessment in the first place. For example, if short-term reversal is assessed by the 15-day RSI, but RSI is effectively a random walk as a factor, then it would be pretty knuckle-headed to include it in the risk model.