Hi everyone!
In this strategy, we deploy a simple sentiment analysis strategy. The efficient market hypothesis (EMH) assumes stock prices correctly reflect all available information. However, we can hypothesize that after bad news drags down the stock price, the impact of the news will eventually fade and the price will revert.
To test our hypothesis, we created a very naive scoring system that maps individual words to a score. Then, we obtained all Tiingo News articles related to the 10 largest NASDAQ constituents for sentiment analysis. We analyzed the news releases for each security in our universe and used our scoring system to calculate the overall score of each stock. Applying a contrarian approach, we then formed an equal-weighting portfolio with all the stocks that had negative scores and waited for their price to reverse.
The results show the strategy generated a CAGR of -28%, a maximum drawdown of 70%, and -0.546 Sharpe Ratio. There were also more losing trades than winning ones. Since this strategy is just a simple start to sentiment-style trading, there is a lot of room for improvement. For example, we can improve the dictionary of word scores or use some pre-trained wording datasets like BERT and VADER. We can also apply tokenization, lemmatization, or stemming to refine our scoring system. On the other hand, we may want to loosen the EMH and adjust the time of when we open and close our trades.
If you have any comments or improvements, please share in the comments below. Let's grow together as a community!
Best,
Derek Melchin
Derek Melchin
I updated the attached project. The original one published had a bug in it.
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.
Jared Broad
Small update to add parameters to optimize the strategy for a demo I was presenting. Interesting to see word scores overfit the dataset. We'll have to create a system to define the word scores to minimize overfitting.
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.
Derek Melchin
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!