# Technical Reading

## MACD and Swing Trading

### Description of MACD

The Moving Average Convergence/Divergence (MACD) indicator is a momentum oscillator primarily used to trade trends.

Although it is an oscillator, it is not typically used to identify over bought or oversold conditions. It appears on the chart as two lines which oscillate without boundaries. The crossover of the two lines give trading signals similar to a two moving average system.

### How this indicator works:

- MACD crossing above zero is considered bullish, while crossing below zero is bearish. Secondly, when MACD turns up from below zero it is considered bullish. When it turns down from above zero it is considered bearish.

- When the MACD line crosses from below to above the signal line, the indicator is considered bullish. The further below the zero line the stronger the signal.
- When the MACD line crosses from above to below the signal line, the indicator is considered bearish. The further above the zero line the stronger the signal.

- During trading ranges the MACD will whipsaw, with the fast line crossing back and forth across the signal line. Users of the MACD generally avoid trading in this situation or close positions to reduce volatility within the portfolio.
- Divergence between the MACD and the price action is a stronger signal when it confirms the crossover signals.

### Calculation

An a*pproximated* MACD can be calculated by subtracting the value of a 26 period Exponential Moving Average (EMA) from a 12 period EMA. The shorter EMA is constantly converging toward, and diverging away from, the longer EMA. This causes MACD to oscillate around the zero level. A signal line is created with a 9 period EMA of the MACD line.

Note: The sample calculation above is the default. You can adjust the parameters based upon your own criteria.

### Bollinger Bands: A Trading Signal

The Bollinger Band® indicator shown below suggests caution for stocks over the short term (4th Quarter 2018)

### Key takeaways:

- Bollinger Bands® are a widely used indicator for short-term traders.
- They can help you assess the relative strength of a security.
- Active buy and sell signals can be generated.

It can be hard sometimes to know if the price is "right." Is a stock that is trading at $50 a share high, or is it low? You may have done your research and decided to buy or sell. But when is the best time to pull the trigger? Bollinger Bands® are one tool that can help you decide when to make your move by illustrating the relative strength—or momentum—of a stock, exchange-traded fund, or other investment opportunity. You can even apply this indicator to the broad market.

Currently, Bollinger Bands suggest that stocks, broadly speaking, may be expensive on a short-term basis (more on this shortly). Of course, you should never rely on a single piece of information to make an investment decision. It's always important to consider fundamental stock research and your particular goals, time horizon, and risk tolerance before making an investment decision.

### Using Bollinger Bands

Bollinger Bands look like an envelope that forms an upper and lower band* around the price of a stock or other security (see the chart below). Between the 2 bands is a moving average, typically a 20-day simple moving average (SMA).

**Bollinger Bands are plotted at a standard deviation above and below a simple moving average of the price. The upper band is the moving average plus a standard deviation, and the lower band is the moving average less the standard deviation**.

How can Bollinger Bands help you determine the relative strength of a stock? John Bollinger, who created this indicator, considers the price of the stock relatively low (attractive) if it is near the lower band and relatively high (overvalued) if it's near the upper band.

#### Buy and Sell Signals

In addition to these "high" and "low" relative assessments, there are a number of trading signals that are generated by how the price of the stock or security interacts with the bands. For example, when the stock breaks through the upper band (a resistance level), it generates a *buy* signal. When it breaks below the lower band (a support level), it’s a *sell* signal.

Currently, the S&P 500® Index is in the upper part of the band (see the chart below), which according to Bollinger suggests that US stocks are overvalued on a short-term basis. However, if the S&P were to break above the line that forms the top of the upper band, it would be a buy signal, according to Bollinger Band analysis.

#### Bollinger Bands applied to the S&P 500® Index

Data Source: as of September 18, 2018.

##### Volatility Measure

Bollinger Bands can also provide a unique assessment of volatility.

Narrowing Bollinger Bands (i.e., when the bands move closer together) could suggest that volatility is decreasing—as investor sentiment potentially becomes more optimistic or complacent.

__A Bollinger Band "squeeze"__ occurs when volatility reaches a relative low. This squeeze can frequently be followed by a period of increased volatility, and may result in a significant move by the stock to the upside or the downside. In the S&P chart above, the Bollinger Bands narrowed, or squeezed in late 2017, and there was a large price increase in early January 2018, followed by the steep decline in late January/early February.

Currently, the bands are not in a squeeze pattern, suggesting there may not be a significant move to the upside or downside over the short term.

## Advanced use of Bollinger Bands

An advanced application of Bollinger Bands involves another indicator: the Relative Strength Index (RSI). Bollinger Bands can be applied around the RSI line to generate additional buy and sell signals.

**Relative Strength Index**** (RSI)**

The **Relative Strength Index** (**RSI**), developed by J. Welles Wilder, is a momentum oscillator that measures the speed and change of price movements. The **RSI** oscillates between zero and 100.

Traditionally, the **RSI** is considered overbought when above 70 and oversold when below 30.

When RSI is near an extreme high (~100) or low (~0), and is touching either the high part of the upper band or the low part of the lower band, the RSI line could pull back sharply from the band.

Bollinger Band analysis holds that a failure of RSI to touch the upper band on a second try generates a sell signal. At extreme lows, a failure of RSI to reach the lower band triggers a buy signal. This is similar to double top and double bottom patterns, respectively, that can occur for the price.

**Check out the daily chart of Caterpillar (CAT).**

If you look at the chart above, you’ll notice a blue horizontal line. That’s what is known as the resistance area. Now, resistance is an area that a stock has had a tough time breaking above. If you look at the RSI, Caterpillar was actually considered overbought. However, if you look closely, the RSI actually dipped below 70, only to break above again. However, if you look at the price chart, CAT made a higher high. On the other hand, when you look at RSI, it made a lower high.

**Consequently, there was a divergence.**

In other words, when a stock is making higher highs and trending up, but the RSI is making lower highs and forming a downtrend… that signals a bearish divergence, which indicates the stock could reverse from its uptrend.

On the other hand, there is the bullish divergence.

##### Here’s a look at a bullish divergence.

If you notice on the chart above, Canopy Growth Corp. (CGC) was getting hit hard, making lower lows. However, if you look at the RSI, it was making higher lows. That lets you know the bottom could be in, and the stock could run higher, which it did. Now, you’re probably wondering, *“How can I use this indicator to make money trading stocks?”*Well, it’s not hard if you know what you’re looking for.

**Final Thoughts on Technical Analysis and RSI**

**Key takeaways about RSI:**

- A stock is generally considered oversold if RSI falls below 30. If RSI is above 70, it’s an indication a stock may be overbought.

- If the stock is making higher highs, but RSI is making lower highs, it’s considered a bearish divergence. Conversely, if the stock is making lower lows, while RSI is making higher lows, it’s considered a bullish divergence.
__Applying Bollinger Bands to RSI__demonstrates an important lesson when using technical indicators. You should not make an investment decision based only on the signals given by a single indicator or data point.

Fortunately, Bollinger Bands can be used in combination with different indicators, like RSI, as well as support and resistance, moving averages, MACD , ** stochastics**, and any other research tools that may support your analysis.

##### What about Stochastics?

In technical analysis of securities trading, the **stochastic oscillator is a momentum indicator** that uses support and resistance levels. Dr. George Lane developed this indicator in the late 1950s.

[1] The term stochastic refers to the point of a current price in relation to its price range over a period of time.

[2] This method attempts to predict price turning points by comparing the closing price of a security to its price range.

**Stochastics** is a word that is “thrown-around” by non–advanced mathematical statisticians. For the typical pedestrian “technical analyst” of markets, the Stochastic Index or Indicator is calculated as follows**:**

##### CALCULATION

Stochastics can be broken down into two lines; %Kand%D.

'''%K is the percentage of the price at closing (K) within the price range of the number of bars used in the look-back period.'''

%K=SMA(100*(Current Close-Lowest Low)/(Highest High-Lowest Low), smoothK)

'''%D is a smoothed average of %K, to minimize whipsaws while remaining in the larger trend.'''

%D=SMA(%K,periodD)

LowestLow= The lowest price within the number of recent bars in the look-back period (periodK input)

HighestHigh= The highest price within the number of recent bars in the look-back period (periodK input)

##### Fast Stochastic Oscillator:

- Fast %K = %K basic calculation
- Fast %D = 3-period SMA of Fast %K

##### Slow Stochastic Oscillator:

- Slow %K = Fast %K smoothed with 3-period SMA
- Slow %D = 3-period SMA of Slow %K

Usually this is a simple moving average, but can be an exponential moving average for a less standardized weighting for more recent values. There is only one valid signal in working with %D alone — a divergence between %D and the analyzed security.

The word **stochastic** is an adjective in English that describes something that was randomly determined. The word first appeared in English to describe a mathematical object called a **stochastic process**, but now in mathematics the terms *stochastic process* and *random process* are considered interchangeable. The word, with its current definition meaning random, came from German, but it originally came from Greek στόχος* (stókhos)*, meaning 'aim, guess'.

The term *stochastic* is used in many different fields, particularly where stochastic or random processes are used to **represent systems or phenomena that seem to change in a random way. **

The term is used in the physical sciences such as

- biology
- chemistry
- ecology
- neuroscience
- and physics
- as well as technology and engineering fields
- such as image processing
- signal processing,
- information theory
- computer science (including the field of artificial intelligence)
- cryptography and telecommunications

It is also used in finance, due to __seemingly random changes__ in *financial markets* as well as in medicine, linguistics, music, media, colour theory, botany, media, manufacturing, and geomorphology.

**For the mathematics see:**

**https://en.wikipedia.org/wiki/Stochastic_process#Stochastic_process**

**Stochastic optimization** is the process of maximizing or minimizing the value of a mathematical or statistical function when one or more of the input parameters is subject to **randomness**. The word stochastic means *involving chance or probability*.

Stochastic optimization refers to the minimization (or maximization) of a function in the presence of randomness in the optimization process. The randomness may be present as either noise in measurements or Monte Carlo randomness in the search procedure, or both.

Common methods of stochastic optimization include direct search methods (such as the Nelder-Mead method), stochastic approximation, stochastic programming, and miscellaneous methods such as simulated annealing and genetic algorithms.

**So, Traders >>> Good Luck**