Hello Community,
I have been working with indicators for a while with some good outcomes, however I am trying to break into the Universe Select world with a Coarse and Fine filter.
My goal is to start small by simply repopulating my universe monthly and performing EMA crossover trade execution on each of the Universe's stocks.
However I have found this much more complecated than origionally anticipated as I am not accustomed to updating and storing indicators in a temporary universe. This is why I wanted to start simple and try to learn from the ground up, but unfortunately, I find myself lost...
I have scowered the forum for answers and found a few good threads. I would like to credit the class symbolData and OnData code(which is meant to update indicators) to the proper user/descussion thread but I cannot find the origional link (feel free to let me know and I will update the post with the origional thread.) The already posted questions have been very insightful but not quite what I'm looking for. Though feel free to link any discussions that may be helpful!
I have attached a backtest with a Coarse and Fine filter and an attempt at applying an EMA price cross indicator to each of those stocks in the Universe, however I find myself confused and would like some help setting out on the right path.
GOALS:
- Perform Coarse Filter
- Perform Fine Filter
- Initialize EMA indicator for populated Universe
- Execute a buy on stocks in universe where Price > 200EMA (not profitable but good for learning)
- Execute a sell on stocks where price crosses below individual 200EMA
- On next month repoplate and repeat
The Stock Plot chart is meant to visualize each stock and EMA (though there are too many data points to chart) and the Diamonds plot is meant to visualize Universe repopulation and EMA Cross green lights.
Any suggestions/critisism would be greatly appriciated!
Derek Melchin
Hi Locke Gooditis,
Great start! The algorithm works, but there are a few things we can improve:
To assist, #1 is complete in the attached backtest. Refer to this tutorial for #2-3. Manual warm-up is outlined in the docs here.
Best,
Derek Melchin
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
QntCnct User
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!