In part3, model error has an attribute of a normal distribution. This signifies that the model is usually not too far off predicting the market within a reasonable bound. If there is an instant that the model error is exceedingly high, one may expect that the model error would reduce back toward zero in the next iteration, and prices would converge back to a long term average (or mean) that the model suggests. This behavior is called mean reversion. It turns out that the regression model is suggesting the market price mean reverts approximately to

**Mean** = **ConstantA** / (1 – **ConstantB**)

And the standard deviation of the modeled price is

**ModeledPriceStd** = **ModelErrorStd** / (1 – **ConstantB**^2) ^ (1/2)

If the current market price exceedingly lower than the modeled mean, one could long the asset and gain the advantages of mean reversion. Ie buy low sell high. But what is the measurement of when is the best time to enter a long position? S-Score is a simple comparison of how much the current price is away from the Mean and its relation to ModeledPriceStd.

**S-Score** = (**CurrentMarketPrice** – **Mean**) /** ModeldedPriceStd**

S-Score of +1 implies that the current market price is one Modeled Price Std higher than the mean.

S-Score of -1 implies that the current market price is one Modeled Price Std lower than the mean.

One may plan a set of trading rules using S-Score and thresholds similar to as follows:

Trade Entry

Long when **S-Score** is < -1

Short when **S-Score** is > +1

Trade Exit

Close Long Position when **S-Score** is > +0.5

Close Short Position when **S-Score** is < -0.5

Stop Loss

Stop Loss Long Position when **S-Score** < -1.2

Stop Loss Short Position when **S-Score** > +1.2

One would need to defined the thresholds levels based on personal’s favorite asset being traded and accepted risk levels. In the next post, we will go over some results of a trading strategy that strictly follows a S-Score rule.