Back

Adding insight does not set End date correctly

When I run a backtest using custom data and create an insight, I have found no way to get active insights.

When I do  

insights.Add(Insight.Price(symbolData._symbol, GetTimeSpanForInsight(period), InsightDirection.Up, null, 100, null, null));

It creates the insight with the proper period but the CloseTimeUTC and GeneratedTimeUTC is set to the default (minimum). I'm guessing that this is why when I run  

SymbolInsights.GetActiveInsights(_algo.UtcTime);

I get no insights returned but when I run RemoveExpiredInsights it removes all the Insights in the collection.

I wondered if brokerageModel had anything to do with it but I have this set

SetBrokerageModel(Brokerages.BrokerageName.GDAX, AccountType.Cash);

var s = AddData<CryptoData>("BTCUSDT", Resolution.Minute);

// Set requested data resolution
UniverseSettings.Resolution = Resolution.Minute;
SetUniverseSelection(new ManualUniverseSelectionModel(new Symbol[] { s.Symbol }));

 

Any thoughts on how to make this work?

 

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.


Hey Sam,

It's difficult to understand why none of your insights in the collection are active. Could you please post a back test which reproduces this issue? I wrote an example which stores generated insights and retrieves the active insights. Hopefully this will help you debug through comparison.

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