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)
Varad Kabade
Hi Kevin Meininger,
We ran the above code snippet, and we could not reduce the issue. We have recently made changes to streamline and consolidate alternative data types for distribution via the Data Market. Refer to the following thread.
Best,
Varad Kabade
Kevin Meininger
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!