Sentiment Moving Average

(0 comments)

Technical Analysis is the process of using charts and indicators based on the price and volume to predict the future movements of financial assets

It bears similarities with Sentiment Analysis as Technical Indicators are used to guess the opinions of other investors. For example, a large volume with increasing price could signify that investors are largely positive and bullish about the asset/

As such, Technical Indicator is a proxy for Sentiment Analysis.

This post will hope to show that incorporating Sentiment Analysis into a simple Technical Strategy can improve its performance

Strategies to be compared

Strategy A
If (5-day SMA > 10-day SMA): Long Asset
Else: Short Asset

Strategy B
If (5-day SMA > 10-day SMA) and (2-day Average Sentiment > A1): Long Asset
Else If (5-day SMA > 10-day SMA) and (2-day Average Sentiment < A2): Close Position
Else If (5-day SMA <= 10-day SMA) and (2-day Average Sentiment < B1): Short Asset
Else If (5-day SMA <= 10-day SMA) and (2-day Average Sentiment > B2): Close Position

The basis of both strategies is when the short-term moving average is above the long-term moving average, the asset price is on an upward path. Hence, we want to follow the trend and long the asset. Conversely, we want to short the asset in the other case.

The difference between the strategies is that B has additional entry and exit conditions for when the sentiment data does not agree with the moving average condition. A 2-day average is used here to smooth out noise which could cause the strategy to change positions constantly.

It is obvious that Strategy A will always have open positions whereas Strategy B will occasionally have no positions, instead of holding cash undil another opportunity arises.

Testing Methodology

Sentiment data from the Derivative Lab API will be used for the comparison of the 2 strategies. A1, A2, B1, B2 are selected to be 5, 4, 6, 7 respectively for Strategy B.

For the asset Bitcoin ($XBT) is used.

When either Strategy enters a position, the position size will be equal to 90% of the portfolios value. This is to simulate the leaving of some cash holdings to prevent for margin calls.

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required