Back to Community
RETIRED LECTURE: Momentum Strategies

NOTE: THIS LECTURE HAS BEEN RETIRED DUE TO IT NOT DEMONSTRATING BEST PRACTICES
We are keeping the post up for posterity's sake. For updated information please read the comments on this thread. The reason this lecture was removed is that it did not discuss cross sectional measurement of momentum, and also discussed several experimental ways to measure momentum which were not firmly grounded in common usage. We want our lecture series to represent what quants actually do, and we felt that whereas these techniques may be interesting as an advanced research project, they are not good for someone wishing to learn how momentum strategies work.

Momentum strategies may be the most intuitive way to trade stocks. A model that assumes previous good trends lead to future good trends is a momentum model. These models can be used to generate entry and exit signals, or as factors in ranking schemes. We will discuss the overall idea of momentum strategies in this notebook. Information on measuring momentum can be found here.

Sign up for a webinar covering these topics here.

We will be releasing a video lecture as well, watch this thread for a link. Find all of our lectures hosted permanently with videos at www.quantopian.com/lectures.

Loading notebook preview...
Notebook previews are currently unavailable.
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.

13 responses

Did you ever release the algo for this one?

Hey Simon,

I've been super busy. Working on getting the videos out in a few days, the algo will follow as soon as I have time to clean it up. Sorry about the delay.

After much delay, the video has been posted:

https://www.quantopian.com/lectures

Hi Delaney,

I have been following along in the notebooks while watching the videos from the lecture series. This one doesn't seem to be cloneable.

Also would like to extend my gratitude to you (& the rest of the quantopian team) for sparking my interest in so many areas. Loved the CWT podcast series.

Hello,

This notebook seems to be cloneable for me. Maybe try in a different browser and let me know if you're still having issues. FYI we've retired this notebook from the official lecture series, as it's a bit out of date now. We do have an example momentum algorithm here:

https://www.quantopian.com/lectures#Example:-Momentum-Algorithm

Happy you enjoyed the podcasts, we're glad they were so helpful.

The notebook is cloneable, it just needed some more time to load.

Would you advise going through the lecture series chronologically ?

Thanks for the fast reply.

Glad it's working.

It depends on how you best learn. If you like having a set track to work on, then yes they're arranged to be done chronologically. Alternatively, how I best learn is trying interesting projects and then learning when I get stuck. So for instance you could try going through posts you find interesting in the forums, and then turning back to relevant lectures when you get stuck. However there are a few lectures that are important, and these are generally the ones on statistical bias. Stuff like Overfitting, Multiple Comparisons, Violations of Regression Models, etc.

Hi Delaney,

In your 2015 post above, you mentioned a video.

I don't see a video on momentum strategies (only two example algorithms) in the lecture series.

Is it available somewhere else?

Thanks for your great work.

Hello Guillaume,

We have since retired this lecture due to it being out of date. I'll make that more obvious in the title. For now you can check out the other lectures on alpha and risk factors, as momentum factors are really just a special case of those. You can also find a ton of classic momentum factors here:
https://github.com/quantopian/algorithm-component-library/blob/master/factors_project/factors_all.py

In which sense exactly does this lecture not demonstrate best practice? I couldn't find info in the comments above.

Added some explanation.

Hi @ Delaney Where would be the best place to add a fundamental filter in the algo

 fundamental_df = get_fundamentals(  
        query(  
            # put your query in here by typing "fundamentals."  
            fundamentals.operation_ratios.revenue_growth,  
            fundamentals.asset_classification.morningstar_sector_code  
        )  
        .filter(fundamentals.valuation.market_cap > 0)  
        .filter(fundamentals.operation_ratios.roic > 0.1)  
        .filter(fundamentals.valuation.shares_outstanding != None)  
        .order_by(fundamentals.operation_ratios.revenue_growth.desc())  
        .limit(500)  
    )  

Hi Erik,

The best way to integrate fundamentals data into your algorithms is by using the Pipeline API. It offers a flexible way to dynamically select a universe of tradable securities using factors, filters and classifiers. It also allows you to integrate alternative datasets into your calculations. I would recommend you checking out our Pipeline tutorial to learn more.

The attached notebook is an example of how to implement the fundamentals filter you shared using the Pipeline API. You will noticed I used the built-in Q1500US universe as a base which, among other things, filters securities based on their liquidity. To learn more about how this universe is constructed, check out this community post.

Loading notebook preview...
Notebook previews are currently unavailable.
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.