![]() ![]() ![]() ![]() If you didn't specify a time for an insight to last and instead, could you just re-issue the insights at whatever interval you are working with and if you need to liquidate then just issue "flat" insights for those stocks? The problem seems to be that the timeframe you add for insights to run causes them to constantly be re-issued even if you don't want them to be, because you want to liquidate then instead as in the case of a drawdown. Any recommendation or suggestions would be welcomed. It seems at this point the only way to implement this will be with a custom PortfolioConstructionModel. However the targets created from the flat insights do not cause the sale of the holdings. Setting the portfolio target does nothing because it will be overwritten by the targets created from the Insights. I set the Insights to flat and the Portfolio Target to 0 on the holding. So I decided to do it in my alpha model and check for drawdown as a first step in the Update process. I can't emit insights in the risk model because the RiskModel is executed inside the ProcessInsights loop and EmitInsights would kick off another ProcessInsights loop. I could do the portfolio drawdown check in a RiskManagementModel, the problem is that I need a way to clear all the ActiveInsights so that the algorithm does not make additional transactions based on them. Also don't enter into any new transactions for the rest of the day.If portfolio drawdown from start of day is below a threshold set all holdings to 0. ![]()
0 Comments
Leave a Reply. |