Back to Community
101 Alphas, Alphas 5, 8, and 9, Alphalens

I tried combining Alphas 5, 8 and 9 and running Alphalens on them.

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

This is pretty interesting, it seems from the average cumulative returns by quantile plots that much of the price movement in the stocks chosen by the factors happens before the date on which you'd buy/sell them under this model. To me that indicates that the factors aren't as forward predictive as they are just measuring what has already happened. Do you agree with this analysis or do you think other plots say otherwise?

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.

I agree, this combination of alphas is not looking very good.

In general I find what works is to take something that's already set up and look for ways to improve it. Looking for alpha ideas in the following places, then figuring out how you can make them work better could lead to some interesting results. Remember that each individual alpha is unlikely to be great on its own, so if you find one that seems to work well, it can be helpful to combine it with some other alphas to smooth out the signal.

Along these lines, last week I went through and tested a bunch of the 101 alpha factors individually and cherry picked some that looked promising and combined them. Attached is the alphalens running against 22 combined factors.

I'd be interested to hear your input.

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

A next step you may consider is using the ML method outlined in https://www.quantopian.com/posts/machine-learning-on-quantopian (or a derivative) to increase the predictive ability of the 'mega alpha.' Also note the magnitude of the spread, you can have a highly predictive factor but if the edge you get is to small it won't survive transaction costs. This is cool

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.

From what I've read, the larger quantitative funds, especially the more successful ones, tend to value factors and models that have a high win percentage because theory would dictate that if the factor or model has a very high win percentage, leverage can be applied relatively safely to increase the returns.

As far as alpha factors go, I also remember that the factors in the 101 Alphas were likely generated by a genetic algorithm and would perform very poorly in out-of-sample testing.

Eric, that combination looks better, especially on the 10 day forward forecasting window. Is this an out of sample test or on the same historical data you used to evaluate the individual factors? One thing to try might be putting the factors in this template algorithm we're developing and letting it paper trade for a bit. Keep in mind that your rebalance frequency should be around 10 days or more to match the factor's predictive window.

https://github.com/quantopian/research_public/blob/template-algorithms/template_algorithms/long_short_equity_template.py

For the template, keep in mind that the optimize API isn't documented yet. When it is documented we will release the template more fully.

Ian, win percentage is just a measure of consistency. Similar to how you might look at the consistency of the IC in alphalens or other similar metrics. If you have a factor with lower win percentage, you need to accumulate more trades to get consistent behavior. No different from having a factor with a highly volatile IC that only looks consistent when zoomed out enough. But yes what a quant wants is a factor that has a high consistency. You want to go for small edges repeatedly rather than occasional big wins. Of course this is all up to your philosophy and risk tolerance, but the more consistent things are the easier they are to control/model.

Hi Delaney,

Thanks for your input! I used the same historical data that I used to evaluate the individual factors. I probably need to test it against an out of sample range here at some point.

I did try putting the combined factor into a backtest but it couldn't handle this many factors - memory errors. I pared it down a bit and got it to run but the the algo did not perform very well - it got wrecked.. Could have been my code, and I didn't try a 10 day window. I'll try the template algorithm you suggested and a 10 day window. Maybe that will help.

P.S. the chat with traders podcast you did was impressive, nice work!

Sorry you ran into memory errors. We're currently trying to figure out ways to increase the computational resources we can give users. It would be good to do a Pyfolio analysis of the backtest to try and get a sense of how much of the downside was from transaction costs and slippage vs poor factor performance. If factors are bad they'll just be 50/50 so it's unlikely you'd lose money on the factor itself. More likely you're rebalancing and paying a lot of transaction costs. Also if you run it outside of the factors' predictive window you'll lose the predictive power.

Thanks very much, I had a lot of fun doing the podcast and happy it was helpful. Constantly thinking of new ways to improve our other offerings and always open to suggestions/feedback.