Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Blue Chip Algo

Hello Everyone

This is my first post so don't tear me apart.

I have been messing around with Quantopian trying to get something together that would work OK with Blue Chip stocks, I have something that was based more on a whim then any theories but it seems to be performing alright with most blue chip stocks.

I am up for any suggestions on how to make this better,.

Also please forgive me for the lack of documentation but it is fairly straightforward.

Thanks

2 responses

Looking at this further I didn't take into account my cash flow ...... but even limiting that the program still seems to perform decently

Nice algo!

To better see the effects of your algo, you can change from the default benchmark (SPY) to a custom benchmark (in your case MCD) using the set_benchmark function. This will show you the returns if you did a buy-and-hold strategy of the stock versus your moving average strategy.

Also, have you seen the different ordering styles? The order_target family is more robust than the regular order() call. These will scale as your portfolio grows instead of blindly buying/selling a single amount on a market signal. Great start!

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.