Thursday, 13 July 2017 Daniel Chow
The concept of Relative Sentiment means that when we look at current sentiment data, we need to also consider the sentiment data of the recent past before we can determine how good or bad current sentiment data is. For example, if the past sentiment has been extremely bad for successive days and the sentiment today is not as bad, we will view this as a good sign and count the current sentiment as good even though the absolute value of the sentiment is not high.
Indicators of Relative Sentiment
As there are no indicators of Relative Sentiment available, we will look to build our own composite indicator of Relative Sentiment using raw sentiment data before using it to show sentiment Alpha on Crude Oil Futures.
Indicators are used most frequently in Technical Analysis which is the process of using charts and indicators based on price and volume to predict the future movements of financial assets.
On the other hand, Sentiment Analysis is the extraction of the positivity or negativity of news and bears many similarities with Technical Analysis as Technical Indicators are sometimes used to view the opinions of investors. For example, a large volume with increasing price could signify that investors are largely positive and bullish about an asset. In this sense, Technical Analysis is a proxy for Sentiment Analysis.
This motivates the borrowing of ideas from Technical Analysis for the construction of composite Sentiment indicators.
The simplest way for us to construct an indicator for Relative Sentiment is by comparing moving averages. We use 2 moving averages of different lengths to compare the current sentiment with the past sentiment.
When the shorter moving average is above the longer moving average, the current sentiment is improving from the past. By the concept of Relative Sentiment, this means that the sentiment for the asset is good. Conversely, when the longer moving average is above the shorter moving average, the current sentiment is poorer than the past and by the concept of Relative Sentiment, this means that the sentiment for the asset is bad.
Intuitively, we long the asset when the Relative Sentiment is good and short the asset when the Relative Sentiment is bad.
Composite Oil Sentiment data from the FinSentS API will be used for all backtests. The Composite Oil sentiment data tracks the sentiment of both Brent Crude Oil and West Texas Intermediate.
All strategies will be backtested from 1/1/2016 to 1/6/2017 on the Quantopian Platform using the Crude Oil Future(CLZ17) expiring in December 2017. The reason for this choice is to ensure that none of the opened positions expire midway through the backtest, needing to be reopened and adding unnecessary transaction costs. At the same time, choosing a contract that expires too far into the future could lead to liquidity issues and possibly add additional costs due to slippage.
All strategies will be benchmarked against a Long-Only Position on the same Future Contract(CLZ17).
The Strategy (Part 1)
For the first attempt, we will use the following Strategy:
If (5 Day Sentiment Moving Average – 10 Day Sentiment Moving Average) > 0.5:
If (5 Day Sentiment Moving Average – 10 Day Sentiment Moving Average) < -0.5:
Backtest Results (Part 1)
The Strategy (Part 2)
Now we look to shorten our time frame to view the impact on performance so we will use the following Strategy:
If (1 Day Sentiment Moving Average – 5 Day Sentiment Moving Average) > 1:
If (1 Day Sentiment Moving Average – 5 Day Sentiment Moving Average) < -1:
The entry levels are adjusted to 1 and -1 instead of 0.5 and -0.5 as this Strategy trades in a more impulsive manner. Even small spikes in Relative Sentiment could lead to trades occurring. As a result, the entry levels are widened to capture only larger changes in Relative Sentiment. The longer timeframe used in Part 1 also smoothens out small spikes in Relative Sentiment allowing for a narrower entry level.
Backtest Results (Part 2)
The performance is better as the strategy is more impulsive and able to enter good trades earlier and more often. At the same time, this leads to a higher chance of trading false signals, leading to larger drawdowns.
The Strategy (Part 3)
Now we look to tweak the strategy to improve its performance:
If (1 Day Sentiment – 5 Day Sentiment Exponential Moving Average) > 1:
If (1 Day Sentiment – 5 Day Sentiment Exponential Moving Average) < -1:
Here, we use another kind of moving average, the Exponential Moving Average(EMA). Calculation of the EMA places higher weightage to more recent observations. As a result, it could possibly be a better measure of past sentiment as greater weightage is placed on more recent results.
Backtest Results (Part 3)
We managed to reduce some of the drawdown seen in Part 2. This could be due to the improvement in using an Exponential Moving Average instead of a Simple Moving Average, improving the hit rate of the strategy.
It is quite clear that all variants of the Relative Sentiment strategy shown easily outperformed a Long-Only position on the underlying instrument. They also have low beta values compared to the benchmark, implying that performance of the strategies is not really tied to performance of the underlying instrument.
Found in the appendix are the prices from Bloomberg.com of the Generic Crude Oil Futures which reflect the performance of spot prices of WTI Crude Oil. The price was 37.04 on 1/1/2016 and 47.66 on 2/6/2017. This implies a performance of 28.67% over our backtest period, much higher than the benchmark observed above. This further implies that trading of Future contracts costed a Long-Only Position an estimated 20% of its returns over 1.5 years.
It is quite possible that trading other forms of derivatives on WTI such as CFD contracts or the underlying product itself will further improve results if the costs of trading these products are lower compared to the cost of trading futures.