Hi All, I'm trying to figure out how to update an insight inside an AlphaModel using knowledge about the Portfolio's actions.

Normally, I'd do the following inside a `QCAlgorithm` object in the `OnData` method.

if self.Portfolio.Invested:
  self.SetHoldings(symbol, 1)
if not self.Portfolio.Invested:
  self.Liquidate(symbol)


My questions is how can I do that inside a `AlphaModel`?

Can I access the Portfolio object?

What I'm doing here is inside `Update` method:
```

if condition:
insights.append(Insight.Price(symbol, self.insightPeriod, InsightDirection.Up))

else:
insights.append(Insight.Price(symbol, self.insightPeriod, InsightDirection.Down))


```

But my conditions rely on me knowing the state of my Portfolio. how can I access it?

Thank you for your help!

Author