Back

Intended usage of Alpha class as output of alpha module?

Hello guys

I'm having trouble interpreting how to use Alpha as an output of alpha module. I'm currently emitting it as Up or Down for as long as I would like to hold the security; then I stop emitting it without issuing a Flat. Then however algo never exits position. What is the intended behavior here?

Also, is it fine to keep re-issuing Up/Down in the IEnumerable<Alpha> Update(QCAlgorithmFramework algorithm, Slice data) calls?

Also, I have a concern about when these calls are made. My algo generates the alpha as soon as the first minute bar s arrive. This means that if Update isn't called immediately on that, there will be a delay.

Of course I can find out these things experimentally on my own, but that will be a couple of lost hours, so if somebody knows I would appreciate an answer.

Update Backtest








Answered by Jared on Slack, I've now solved my issue.

Basically, try to emit each AlphaDirection change only once and emit exits explicitly with AlphaDirection.Flat.

0

Copy-Paste:

Hey Petter! Its slightly different with Alphas -- the alpha module isn't responsible for deciding holding times etc. Its ideally purely a signal which is interpreted by the portfolio model/and put into market by execution module.  

E.g. In theory if 2000 assets were signalling long; the portfolio module would decide what ones to pick based on historical performance etc

Or E.g. 2: In technical cases: if RSI signals long with a timespan on the prediction of X; then after X-time the signal is expired and not to be trusted. So the portfolio module might use it as long signal for X-hours and then automatically go flat.

Or E.g. 3: RSI already long; and get another long signal for a different stock; the portfolio module might rebalance it to share the buying power between the assets and give them both an allocation

For Alpha Streams -- you don't need to worry about any of this. The fund-client will make this execution decision -- you just need to provide the alpha-predictions and aim for 52+% accuracy.

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.


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