Hello, I hate for this to be my first post here haha.
But I'm a newb and I ran into an issue with the Tiingo bootcamp that I'm trying to solve. I finally just pressed “Solution” and it still won't process without this error, so I think something must have changed on the backend. Here is the solution code and the error I'm getting.
Thank you in advance!
#1. Import Tiingo Data
from QuantConnect.Data.Custom.Tiingo import *
from datetime import datetime, timedelta
import numpy as np
class TiingoNewsSentimentAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2016, 11, 1)
self.SetEndDate(2017, 3, 1)
#2. Add AAPL and NKE symbols to a Manual Universe
symbols = [Symbol.Create("AAPL", SecurityType.Equity, Market.USA),
Symbol.Create("NKE", SecurityType.Equity, Market.USA)]
self.SetUniverseSelection(ManualUniverseSelectionModel(symbols))
# 3. Add an instance of the NewsSentimentAlphaModel
self.SetAlpha(NewsSentimentAlphaModel())
self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel())
self.SetExecution(ImmediateExecutionModel())
self.SetRiskManagement(NullRiskManagementModel())
# 4. Create a NewsSentimentAlphaModel class with Update() and OnSecuritiesChanged() methods
class NewsSentimentAlphaModel(AlphaModel):
def __init__(self):
pass
def Update(self, algorithm, data):
insights = []
return insights
def OnSecuritiesChanged(self, algorithm, changes):
pass
and here is the error I get:
Runtime Error: Object reference not set to an instance of an object. in AlphaModelPythonWrapper.cs:line 84 (Open Stacktrace)