Back

Universe selection with direction?

Hi

I would like to select instruments according to a trend measure, but selection alone is not enough. I need to indicate to the Alpha model which direction the selected instruments are trending. The alpha must handle Forex where there is no difference between long and short.

The only way I can see of doing this is to create a class hold the trend information. I can then create a dictionary for such objects in the main algorithm and pass it to the alpha model.

Is there a better way of this?

Cheers

Update Backtest







0

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.


I think I have answered my own question.

Universe selection is not really intended to filter instruments like this. In other words, what I want to do should be part of the Alpha model.

Cheers

 

1

Hi Tony; "I would like to select instruments according to a trend measure" - this is similar to the 200-50 EMA Boot Camp strategy. 

If you choose to use the framework the key concept to keep in mind is the separation of concerns even if the work is duplicated. If you need to later re-do the trend analysis that is OK - because it keeps your code reusable between universes.

0

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.


I appreciate your input, Jared.

I have in mind a two-stage trade selection process: Check the market type first, then look at those selected for set-up & entry. I initially thought Universe selection would be appropriate for the market type. However, the market type and set-up are inter-related, so both would apply to any instrument universe. I think they both belong in the Alpha model, but I will certainly separate the two concerns with classes for each.

At the moment I'm only looking at Forex and CFDs, so a manual universe selection is fine for now.

I note your comment not to worry about duplicating functionality in the interests for re-usability.

Thanks.

0

Update Backtest





0

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.


Loading...

This discussion is closed