Back

RSI and MACD Alpha questions

Hi Everyone,

I'm playing around with the MACD and RSI alpha models available, and I'm having trouble understanding why no direction score is generated until about 22 days into the backtest. Are the alpha models not being warmed up properly, or is it something else?

Any advice is useful! Thanks!

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.


Without running it or delving too deep, it could be that MACD has a 26 day long input and thus requires at least that many points of data until it can be calculated. Did you try adjusting the warm up?

 

Edit: I do see

self.SetWarmUp(300, Resolution.Daily)

so I reckon my prior suggestion would be an issue if the warm-up data is discarded (as it should be, I'd assume).

0

Thanks Aaron,

I considered this, but isn't the point of a warm up to prepare indicators requiring history data, such that they are ready at day one?

Also, while the source for the MACD alpha doesn't include a call to Update, the RSI alpha model does call Update with history data. I can understand that MACD might not be ready, but shouldn't the RSI model at least yield some insight score?

0

Hi Robert

Your alpha models are not being warmed up properly, because Universe Selection does not support warm-up.

Alpha models’ indicators can be manually warmed up. The RSI alpha’s indicator is already being manually warmed up (source code ), but the MACD alpha’s indicator is not (source code).

We’ve created a GitHub Issue to have this indicator warmed up. Track our progress here.

Best,
Gahl Goziker

2

Thanks! I thought that this might be the case. I've actually tried to fix this myself, but I don't think I did it properly...

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