# Parameters for each kalman filter context.params = { stock:{ "init_xhat": 0.0, "init_P": 1.0, "Q": 1e-5, "R": 0.1**2, "orderSize": 5000, "percentChange": 0.02} for stock in context.stocks } context.order_info[stock] = {"predict": "up", "price": data[stock].price, "orderSize": context.params[stock]["orderSize"]} from IPython.display import Image Image(filename='part3/Algo1.png', height="90%", width="90%") Image(filename='part3/Algo2-NoStopLoss.png', height="90%", width="90%") Image(filename='part3/Algo2-StopLoss.png', height="90%", width="90%")