Hi All,

I am a new learner for Python quant. I am following a very simple strategy to learn. But during backtest, it either mentions "Portfolio not defined" or "Portfolio.Invested not defined". May I know how to solve it?

Thanks a lot. :)

66512_1550066317.jpg

66512_1550066289.jpg