Back to Community
Attempt at risk control

Here's my first attempt at risk control. Definitely not easy. This algo is based on a mean-reversion idea I had, and the risk model of course nailed it. Otherwise, would that be considered "controlled"?

Loading notebook preview...
Notebook previews are currently unavailable.
9 responses

I'm still not clear on why short_term_reversal is considered a risk. Your algo looks decent based on the tear sheet, but I suppose would be tossed in the dumpster due to its exposure to this factor. It seems like Q should at least allocate $1000 for your effort, so you might have a shot at buying a sandwich in a year.


Hahaha, that's probably under the minimum capacity for that 600 positions long/short algo though ;) I'll probably need more out of sample data for that sandwich too, since I added quite a few factors trying to mitigate risk. I think they are still figuring out what will be considered acceptable exposure ranges. They also hinted at new optimization API constraints. That'll be interesting. For sure it ain't getting any easier for us, but it definitely seems that we need to up our game based on recent events. I hope the new tools will help.

My point is that the way this crowd-sourced fund is being approached, I get the sense that micro-allocations are not feasible. As pointed out, if you have 600 positions long/short, then it is a non-starter as a stand-alone algo, unless ~$10M in capital is applied. However, presumably the 1337 Street Fund has some exposure to short_term_reversal risk and so your algo could be blended in, and then at the end of the year, a portion of the profit attributed to short_term_reversal could be given to you for the sandwich (or a salad, if you are watching your weight). Of course, if the 1337 Street Fund can't have any short_term_reversal by policy (or at least short_term_reversal from user algos), then this concept won't work.

@Charles Piché Good job! To answer the question, whether the risk is controlled, I suggest to consider some questions.

  1. Is my algo now taking the risk exposures to the factors and the alpha factor I expect it to take based my strategy idea? Is my risk exposures to them deliberate, or unexpected?
  2. What are the variances (or standard deviation) of returns from different risk factors and from my novel idea?
  3. What proportion of the variance of my algo comes from common risk factors and what proportion is from my novel idea?
  4. Is it possible that there are some risk factors I think I am taking that may hurt my algo returns in the long run, but Q risk model does not cover it?

I was wondering if you have any feedback about the tools we provide that you use to adjust your factor exposures. We hope to make the tools smarter for you to improve your strategies.

I am attaching a notebook analyzing an example algo ( with more plots to better visualize the factor exposures, factor returns, volatility, sharpe ratio, etc. You could try on your algo to see if it could help to gather more insights.

Loading notebook preview...
Notebook previews are currently unavailable.

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.

@Rene, great NB, thanks

Hi Rene,

I was wondering if you have any feedback about the tools we provide that you use to adjust your factor exposures. We hope to make the tools smarter for you to improve your strategies.

One challenge is latching onto some definite criteria to know when one is done fiddling, and the algo should be put aside for at least 6 months, to collect out-of-sample data (i.e. it might be good enough for an allocation, if it has not been over-fit). If I'm understanding the risk analysis in terms of explanatory factors, removing those factors from an algo should be pretty straightforward (assuming they enter in as a linear combination, without interaction with other factors, although interactions could be managed, as well, I think), and presumably that is where you are headed. As described on :

You will be able to access the risk model from within your algorithm. In an algorithm the risk model can be used in several ways, including as an optimization constraint or in the definition of an alpha factor.

So, if I'm understanding correctly, you are envisioning that users would be able to isolate the novel alpha (unexplained by the risk model), in a more elegant way. For example, short_term_reversal would be available as a Pipeline factor, and as such, as a first-cut, one could generate an alpha factor that would simply be subtracted from the combined alpha being used in the algo (this would occur within the Portfolio Construction step of ). Vaguely, I can see how the entire risk model could be used, as well, such that all of the risks are mitigated per an optimization routine, leaving only the unexplained alpha (which, I guess still needs to be explained, per the Strategic Intent requirement for getting an allocation, but since Q doesn't look at algos, the author could say anything consistent with the data sets he is using, which presumably Q can access, even though technically they are not "exhaust"...but this is tangential to the topic at-hand). Then, licensees would be paid for their novel alpha only, since it would be the only source of returns.

I'm wondering if, prior to your releasing the risk factors for use as Pipeline alpha factors, there would be some way for Charles to back out how you've constructed the offending risk factors, and then try subtracting them from his combined alpha (with static weights, as a first cut, but obviously, the weights could be adjusted dynamically, assuming that they persist long enough to mitigate them).

Back to my "Am I done?" question, it would be very helpful to have high-level guidance to know when to put aside a given algo. How much explained alpha needs to be expunged (which I'm assuming eventually will be a straightforward operation, at least to first-order)? It'd be great if Q could provide a high-level evaluation tool that says "You are done. Submit algo for evaluation. In six months, you will be notified regarding a potential allocation." Simple.

@Rene Thank you very much for the comments and the new notebook (the new graphs are very telling!). To be honest, the factor exposure adjustments was a bit of a trial and error process, since not much info was released about the risk model at the time, and I was pretty much new to this whole concept. I took a look at the definitions of the various risk factors and tried to mitigate the best I could. I'll take some time to digest all the new information (I think it would be a good idea to regroup all of them in an updated post) and will update as I progress. Thanks again!

@ Charles Piché Thanks a lot for taking the time to provide us your feedback and suggestion! They are very valuable and helpful! - Rene