Hello everyone. I am just starting with LEAN and have already hit my second hurdle. With this algo, I am just trying to experiment with the framework, so the strategy is very basic. I get a manual selection universe with 3 equities ("MSFT", "MRNA", "MELI") and benchmark these against "SPY" over 3 weeks period using hourly resolution. For every change in securities, I compute MOM and KAMA parameters and if these meet certain criteria, I set the Insight Direction triggering "buy", "hold" or "sell" action. 

When backtesting this algo, I get all sorts of inconsistencies. Firstly, security.Price only gets returned for "SPY" and it stays the same (i.e. 362.06) regardless. This makes all my checks (i.e. mom_dir >0 and price>kama ) completely irrelevant. My expectation was that every change invokes OnSecuritiesChanged method where I can capture market data, perform some analysis, and then use Update method to implement some action. Secondly, If I use self.SetPortfolioConstruction(MeanVarianceOptimizationPortfolioConstructionModel(Resolution.Daily,PortfolioBias.LongShort,1,63,Resolution.Daily,0.02,MaximumSharpeRatioPortfolioOptimizer(0,1,0)))) the whole model breaks apart giving me error even if I supply dummy magnitude value when constructing Insights.  

I have gone through the documentation a number of times, searched this discussion board but still missing something.  

anyone can shed some light on what I could be doing wrong?

thanks