31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 2.3 shows the results of the RSI Failure Swing Algorithm from both the

long and short side utilizing the same profit objective and stop used in the first

RSI test.

42

STOCHASTICS AND AVERAGES AND RSI! OH, MY!

George Lane’s Stochastics—Fast %K: Fast %D: Slow %K: Slow %D

Developed by George C. Lane in the late 1950s, the stochastic oscillator, like the

RSI, is a momentum indicator that shows the location of the close relative to the

high–low range over a set number of periods. Mr. Lane stated in an interview

the following concerning the oscillator: ‘‘It doesn’t follow price, it doesn’t follow

volume or anything like that. It follows the speed or the momentum of price. As a

rule, the momentum changes direction before price.’’ The word stochastic is defined

as a random pattern that may be analyzed statistically but may not be predicted

precisely. An appropriate name, if you ask me. In similar fashion to the RSI,

bullish and bearish divergences in the stochastic oscillator can be used to foreshadow

reversals. In other words, if the stochastic says one thing but the market says another,

then be on the lookout for a market reversal. This is very useful information from

a technician’s point of view but very little for the quant trader looking for a very

precise entry definition. However, because the stochastic oscillator is range bound,

it is also useful for identifying overbought and oversold levels.

Calculation for a 14-day stochastic [FAST]:

1. Going back in time 14 bars, calculate the highest high and lowest low prices

during this period.

2. Subtract the lowest low from the current closing price and divide the difference

by the range between the highest high and lowest low. Multiply this quotient by

100 and you will arrive at %K, or fast K.

%K =(C − Lowest low)∕(Highest high − Lowest low) ∗100

3. Fast %D is a simple three-period moving average of the fast %K.

If the current close is near the lowest low, then the numerator in the %K formula

will be small and will produce a low stochastic reading. If the close is near the highest

high, then the numerator will be large. A strong %K indicates a strong uptrend,

whereas a weak %K indicates the opposite, a strong downtrend. Both %D and %K

are plotted alongside each other with the %K line acting as a signal or trigger line.

The slow variation of this indicator is simply a further smoothing of the %K and

%D. In the slow framework the fast %D becomes the slow %K and the slow %D

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!