Hi,
further questions regarding the framework.
Question1:
What is the best way to calculate the alpha period time-span-value if it should be just valid until the next universe construction. e.g. reconstruction/rebalancing on the 1st Jan., 1st Feb., 1st Match,... and so on.?
Right now I just set it to 1 day. This is possible because the rebalancing is done OnSecurityChange
Settings.RebalancePortfolioOnInsightChanges = false;
Settings.RebalancePortfolioOnSecurityChanges = true;
SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel(time => null));
But I cant imagine this is the way it should be, or a good algorithm style should look like.
I tried also to calculate the amount of trading days between rebalancing events:
var tradingDaysTillNextSelection = Time.EachTradeableDay(algorithm.Securities[algorithm.Symbol("SPY")].Exchange.Hours, rebDate, nextRebDate).Count();
This doesnt work out, because of some overlapping days resulting in unnecessary trades in the overlapping time.
Question2:Â
What is the best way the generate order tags in the framework environment?
e.g. How to add an indicator value which was generated in the alphamodel to an order tag? Whats the best way to do it?Â
Thx again