# A first look of a stationary RSI indicator

In this article I will give an introduction to a stationary RSI indicator, and provide the C++ code download. To be in brief, the stationary RSI has almost no difference to the standard RSI.

### Stationary time series

There are plenty of topics on time series and stationary on the internet. Here is a quick introduction.

The price series of a finance instrument is trending. So the data can deviate very much from the mean and may never back to the mean. A stationary time series is not trending, or to say, is detrended. Thus the data is always up and down around the mean and will not go away to far.

To transform finance price data to stationary, there are several methods. The first one is just using “Close[0] - Close[1]”, which is today's close price minus yesterday's close. But normally the log return is used instead of the simple price return. The formula:

**ln(Close[0] / Close[1])**

It equals to “ln(Close[0]) - ln(Close[1])”.

### The stationary RSI

The standard RSI calculates the RS by comparing today's close to yesterday's close. The idea of stationary RSI is using the log return to calculate the RS. So instead of check “if(Close[0] > Close[1])”, we use “if(LogReturn[0] > 0)”. Below are images of stationary RSI comparing to the standard one,

Standard RSI

Stationary RSI

The two curves are almost identical except the values are slightly different.

### Conclusion

I also used stationary RSI to back test a normal RSI over bought/sold strategy on Forex data, there are no obvious difference. This is not surprising. The math behind both RSIes are so similar. With the very basic test, the stationary RSI doesn't seems to have any advantage, but if we have other kinds interesting stationary time series, the stationary RSI may be useful.

### Download the source code

I modified the RSI code in ta-lib to create the stationary RSI. It's much easier than writing from scratch.

## Discussion

Let the kids hunt for insects or leaves and try to identify them and then gather everyone around for campfire stories. Despite this fact, allegedly Taco Bell's meat mixture contains less than 35% meat or 5% below the FDA's standard. There are far too many points that could be discussed for this topic: positions, players, history of baseball, rules, fans, stadiums, equipment, tips, officiating, professional leagues, amateur leagues, etc.