Quick question on PsychSignalSentiment

Back

Hi,

I am trying to use PsychSignalSentiment. But looks like the data.Get(PsychSignalSentiment) keeps retuning empty map. Does it need any approval? Can you help?

Here is the snippet. Its pretty much what is given in the document.

from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Common")

from datetime import datetime, timedelta

from System import *
from QuantConnect import *
from QuantConnect.Algorithm import *
from QuantConnect.Algorithm.Framework.Selection import *
from QuantConnect.Data import *
from QuantConnect.Data.Custom.PsychSignal import *
from QuantConnect.Data.UniverseSelection import *

### <summary>
### Momentum based strategy that follows bullish rated stocks
### </summary>
class PsychSignalSentimentAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2019, 3, 1)
self.SetStartDate(2019, 4, 1)
self.SetCash(100000)

# Request linked news data for Apple
s = self.AddEquity("AAPL").Symbol
self.AddData(PsychSignalSentiment, s)

def OnData(self, data):
# Accessing most recent sentiment via a linked source from securities collection:
# (returns a list, you can drop the "Values" from the for loop below)
#sentiments = self.Securities["AAPL"].Data.GetAll(PsychSignalSentiment)
#self.Debug(str(self.Time))
# Accessing unique sentiment objects via slice event:
sentiments = data.Get(PsychSignalSentiment)
# (returns a dictionary symbol-sentiment, use "Values" to enumerate below)
for s in sentiments.Values:
self.Debug(f"Bull: {s.BullIntensity} Count: {s.BullScoredMessages}")

 

Update Backtest







 
0

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.


PsychSignal has unfortunately recently stopped operations and the data source has been removed from QuantConnect. I've removed it from the documentation today.

1

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.


OKay, Thanks. Any other alternative that you recommend to get similar kind of data?

0

Hi Guru Selvaraj,

Our Tiingo News API provides a news stories feed for US Equities which we can use NLP techniques to calculate a sentiment score for. Check out our new blog post about fear and hope on Tiingo News data. There are several other data vendors which supply social media sentiment scoring. A quick web search will yield a few options. Any of these can be integrated into a QC algorithm by importing custom data.

Best,
Derek Melchin

1

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.


Update Backtest





0

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.


Loading...

This discussion is closed