Back

Custom Scheduling for Coarse Fundamental Universe Selection

Is there any way to schedule the coarse fundamental universe selection to run with specific time/date rules? For example, if I wanted the coarse fundamental universe selection to run at 9am every Monday, Wednesday, Friday, how would I approach this?

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.


How about Scheduled Universe Selection ?

ScheduledUniverseSelectionModel(dateRule, timeRule, selector, universeSettings=null, securityInitializer=null)

 

0

Thanks for the response!

I took a look at the scheduled universe selection but as far as I understand, it doesn't seem like the scheduled universe selector has access to the coarse fundamental data. I think I'm basically looking for a way to combine the Scheduled Universe Selection with the Coarse Fundamental Universe Selection. Is this possible?

0

The easiest way is to filter the universe selection for a specific time/interval/event. 

Here is an example for a monthly rebalance for specific months.

_lastMonth and an array rebalanceMonths need to be initialized first.

public IEnumerable<Symbol> CoarseFilter(IEnumerable<CoarseFundamental> coarse)
{
if (Time.Month == _lastMonth)
{
Debug("Coarse Filter Month Unchanged");
return Universe.Unchanged;
}
_lastMonth = Time.Month;

if(!rebalanceMonths.Contains(Time.Month))
{
Debug("Coarse Filter Month not Rebalance-Month");
return Universe.Unchanged;
}

// filter function here....
}

 

1

Thanks for the suggestion!

I can see how this would be useful for scheduling intervals larger than a day (eg. every other day, weekly, monthly) but I'm not sure if this would work for scheduling for a specific time? If I understand correctly, the coarse universe selection occurs once every day, midnight during backtesting and 6-7am during live trading (according to:

https://www.quantconnect.com/forum/discussion/4010/pre-market-scanning/p1/comment-24497

)

So would it be possible to set the coarse universe selection to start exactly at 9am?

0

Thats not possible according to this post:

Link

1

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