Relative Sentiment Indicator Introduction

Defining relative sentiment

The relative sentiment indicator always shows relative sentiment, which means it compares the current sentiment to a point in history. That's why you have the different timeframe controls in it:

Relative Sentiment Indicator - Inputs

For the timeframe, you have the options:

  • MTD - month-to-date
  • WTD - week-to-date
  • OTD - open-to-date

So the point to which it compares the current value is either the start of the month, start of the week or start of the trading day.

Let's say we have gone with the WTD setting and everything else like it was in my screenshot above, this is what that would look like in MT4:
Relative Sentiment Indicator - Standard Settings

You see those vertical lines in the indicator subwindow? They each mark the start of a new week. In other words, they mark the reference sentiment value, to which the following values in the same week will be compared. When saying relative sentiment, we're talking about values like +5pp or -10pp.

pp here stands for percentage points, if you need to read up on what that means, you can check it out here: https://en.wikipedia.org/wiki/Percentage_point


That would be the absolute change in sentiment. We also have the option to display relative change (see the parameter Show relative change? in the inputs window), but more on that later.

For now we say: if at the start of the week sentiment was at 40%/60% long/short and now it is at 50%/50%, then that would have been an increase of 10pp for the long side. We always only use the long side, because the short side would be the exact opposite (-10pp in this example), and therefore doesn't contain any additional information.

So starting from this value of 40%/60%, which was our reference point at the start of the week because of the WTD setting, we can give a value for the absolute change for every price bar we have in the chart.

The magnitude of the indicator value gives you the value for the absolute change while the color tells you the direction. In the inputs you see the value Long change color and Short change color. As we said we would focus only on the long values here, the color coding is simple to understand:
If we have a positive absolute change value (meaning long percentage is greater than at the start of the period), the value will be colored with the Long change color, as we saw a change towards retail being more long.
If on the other hand, we have a negative absolute change value (meaning that long percentage did decrease), the color will be that of the Short change color: the retail sentiment changed towards bein more short.

The reason that change towards more long is red while change towards more short is blue is simply that we at SentiFX prefer to trade against the trend: if longs increase, we are looking for short opportunities, therefore the signal should be colored red.
If you prefer to trade inline with sentiment, you can swap those values and you will get the right color again for your signals.

Understanding absolute change in sentiment

Now let's look at that with a practical example: I'll add the sentiment indicator to the same chart we had above, so we can follow along with the sentiment movements and understand how they are being reflected inside the relative indicator.

Relative Sentiment Indicator - Compare Regular Sentiment

Let's focus on the week starting on 2020-12-21, since we have examples for both positive and negative development in that single week.

We'll add the Data window and then step through some values so you can see the connection between the two indicators.

Relative Sentiment Indicator - Compare Regular Sentiment

We see that on 2020-12-21 00:00 the long/short percentage values for sentiment were 73%/27%. Those are going to be our reference values, to which we will compare every subsequent sentiment reading within the same week to get to the absolute change in sentiment that the relative sentiment indicator displays.

As you see in the data window, both Long increase and Short increase are zero at this point. Comparing 73%/27% to itself obviously leads to no absolute change whatsoever.

 Let's go to the point in time where the blue indicator values have the highest peak and check out what is going on there.
Relative Sentiment Indicator - Compare Regular Sentiment

You can see that the sentiment values have changed to 41%/59%. To get to the absolute change value, we take the long sentiment reading at the current point in time and compare it to the long sentiment reading at the reference timepoint:
41% - 73% = -32pp

And sure enough, we find that exact value under Short increase in the Data Window.
So in this case, the relative sentiment indicator tells us that since the start of the period, we saw an increase of 32pp in the short sentiment. As I explained earlier with the color coding, this development is shown in a blue color because of our contrarian bias.

For the rest of the blue area in this period, we'll observe different values of Short increase while the Long increase will stay at 0.

 Let's look a little more closely at the area where the color changes over now.
Relative Sentiment Indicator - Compare Regular Sentiment
Our long/short sentiment values have returned to 75%/25%, which is close to their original values. Now the absolute change has flipped over to the other side though: 75% - 73% = 2pp 

The absolute change is positive, retail has gone more long than it was at the start of the period.It's a small value so you don't really see it, but that value is colored in red now.

So whenever the values in the relative sentiment indicator are close to zero or switch colors, that means you're at around the same long/short sentiment values as you were at the start of the reference period.

To go full circle with this example, we'll look at the point where the red values have the highest peak, which is at the end of the period.

Relative Sentiment Indicator - Compare Regular Sentiment

Now our long/short sentiment is 89%/11%. We calculate absolute change as usual and get to the following values:
89% - 73% = 16pp

That value is reflected in the Long increase and shows that the long percentage has grown beyond the reference value, sentiment is now more long than it used to be before. Again, because of our contrarian default stance, the indicator colors those values red.

And there you have it, that's how the indicator operates with the default settings. If you change the Timeframe input, all you do is set the reference point to a different point in time, but all calculations and the displaying of that information stays exactly the same.

The OTD timeframe is there if you want to use the relative sentiment indicator to show changes since the start of a particular trading session, say the New York open for example. You'd set the Timeframe to OTD and then would have to adjust the OTD opening hour to the right value. What the right value is depends on your brokers timezone relative to EST. You have to figure out at what time the New York open is and then set this value. If the New York open coincides with 2 PM in your broker's time, you'd set the OTD opening hour to H14 to reflect that (2 PM is 14:00 in the 24h time system).

If you'd rather have it display a line chart than a bar chart, you can set the Use line plot instead of histogram? to true and you'd get the following picture. The information stays the same, the only difference is that you don't get a solid area anymore, but rather the lines that display the info.

Relative Sentiment Indicator - Compare Regular Sentiment

As I said earlier, the option Show relative change? has a bigger impact on what the indicator shows. The good thing is, if you understand the concept of absolute change so far, you won't have any problem understanding relative change either.

Understanding relative change in sentiment

Let's go back to our first example we did with the peak of the blue area and look at what that area would look like in terms of relative change. We'll add both the absolute change and relative change to the same chart, so we can easily compare the differences. This is what we get:

Relative Sentiment Indicator - Compare absolute and relative change

We can see that relative change also has peaks, troughs and zero-crossings at the same time as the absolute change. Both of them are closely related.

As I said, we'll look at the blue peak from the first example more closely. We recall that our reference values were 73%/27%. For relative change, those exact same values apply. The difference lies in how the change is calculated. Let's add the sentiment indicator back into the mix, so we get those values for our calculations.

Relative Sentiment Indicator - Compare Regular Sentiment
Long sentiment has gone from 73% to 41%, resulting in -32pp absolute change.

Now, if we want to get to relative change, we have to relate that value of absolute change back to the reference value. We take those -32pp and calculate how much of a percentage change that is based on our original value of 73%. 

-32pp / 73pp * 100% = -43.84 % would be the relative change on the long side in this instance.

So to put it in simple terms, when long sentiment went from 73% down to 41%, it has lost -43.84% of its value. That is what relative change shows us and it is reflected in the indicator window as Long change.

In the absolute change indicator it was redundant to show both sides, because long increase always equals short decrease and vice versa. With relative change now though, both sides can potentially have different values, so both values will be displayed in this chart.

We have a negative value for the long's relative change, so it is shown as a negative value. From the inputs we know that long change is colored red, so sure enough we can see a red peak at this point, which goes into the negative direction.

Hold on I can hear you say right now, if the relative long change value is -43.84%, why does the indicator in the screenshot only show -21.92%?

Good catch I would reply, here's why:
With this calculation method for relative change, the change values can get quite high. Imagine long sentiment going from 20% to 80%. That'd be an absolute change of 60pp, which would equate to a relative change of 60pp / 20pp * 100% = 300%.
On the other hand, we can also have quite small values. When long sentiment goes from 20% to 21%, that'd be 1pp and 5% respectively.

Those values can and will happen in the same period and we have to display them on the same chart, so we had to come up with a way to normalize values. How we did that is pretty simple. Our relative change indicator's y axis goes from -100% to +100% and all values are scaled to fit within that range. So if we have a value that goes beyond either boundary, we scale it down by a factor. The size of the factor is determined by how much he have to scale a value (e.g. it would be 3 to get 300% displayed on the 100% axis) and it is displayed in the top-left corner of the time period for which the factor applies. (edited)

In our example, that factor given is 2x, so the value that is displayed -21.92% has to be multiplied with that scaling factor to get to the correct value of -43.84%, which is exactly what we calculated at the beginning.

But that value isn't even close to 100%, why was it scaled down?
Glad you asked, we have only looked at one side until now: the red negative peak, which showed the long's change. That must mean that the short's change has to be the blue peak and the value that is responsible for the scaling.

So we again look at the absolute change first, which, according to our previous calculations, was +32pp (if long absolute change was -32pp, short absolute change muste be the opposite of that).
Now to get to the relative change, we set that in relation to the sentiment value at the start of the period. Since we're talking about the change in shorts now, we naturally have to use the starting value for short sentiment here. So the calculation goes like this:
32pp / 27pp * 100% = 118.52%

That value reflects the short relative change for this example.
Again in simple terms: short sentiment went up from 27% to 59%, so it has increased by 118.53% of its original value.

Now we also understand why the scaling took place, 118.52% is slightly over 100%. We consult the value that the indicator showed us: 59.26%
Multiply those 59.26% by the factor 2x and you have the original value of 118.52%.
This displays the short relative change, so it is colored in blue. The value was positive, so it is shown above the zero line and gives us the blue peak for which we were on the hunt.

Now, in addition to the light red Long change and light blue Short change values, we can also see that the indicator displays Long change surplus in darker red and Short change surplus in darker blue. To get to those surplus values, we compare relative long change and relative short change to one another to see which is bigger and by how much.

So in our example we had -43.84% relative long change and +118.52% relative short change. If we compare the values, regardless of sign (as the signs will always be opposing), we can see that relative short change is larger than relative long change by 74.68pp:
118.52pp - 43.84pp = 74.68pp

This is what we refer to as the surplus. It is attributed to the side that has the larger value, so in this case it would be Short change surplus and the value given in the indicator 37.34pp is what we expected it to be: 74.68pp / 2 = 37.34pp, because of the scaling.

The surplus takes the color of the side that is larger, if it's longs than the value is red and if it's shorts, the value is blue. The sign in the chart is also taken from the larger value: in our example the short relative change was larger and it had a positive sign, so the surplus is also displayed as a positive value.

The surplus is a measure of which side has undergone a bigger relative change in the period and therefore allows you at a quick glance to see this.

For brevity's sake, I won't go through the relative change calculations for the other examples we looked at with absolute change, as they are calculated exactly the same way.

Again, you can switch to showing relative change as a line plot if you prefer that option, the displayed values are still exactly the same.

Relative Sentiment Indicator - Compare line chart

Motivation for using relative sentiment

And there you have it, the complete guide to reading the relative sentiment indicator in all its configurations

The reason we developed this in addition to the regular sentiment indicator is that it allows you to easily keep an eye on the change that is going on in retail sentiment. You can see more clearly which sides retail is shifting to and from.

So while regular sentiment allows you to scan for and identify pairs that are interesting because retail is heavily biased to one side, relative sentiment then allows you to watch where retail is going from those extreme biases. Especially the relative change view allows you to catch on to even the smallest change very easily in those extreme bias scenarios: when retail is 90%/10%, an increase in 1% on the short side would already give you a 1pp / 10pp * 100% = 10% reading that is easily recognizable on the chart, much more so than the change from 10% to 11% you'd get on the regular sentiment indicator. 

To put it in a nutshell: use regular sentiment to identify the pairs that show potential and use relative sentiment to know when it's time to pull the trigger.

Phew, that was a long one! Thank you for sticking with me all the way through this explanation. If there are some questions left unanswered, hit me (@sentibob) up on Slack, I'll be right there to help you out.

 :pray:

Title