What It Is and the Formula

Written by admin. Posted in Technical Analysis

[ad_1]

What Is a Simple Moving Average (SMA)?

A simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.

Key Takeaways

  • Simple moving averages calculate the average of a range of prices by the number of periods within that range.
  • A simple moving average is a technical indicator that can aid in determining if an asset price will continue or if it will reverse a bull or bear trend.
  • A simple moving average can be enhanced as an exponential moving average (EMA) that is more heavily weighted on recent price action.

Understanding Simple Moving Average (SMA)

A simple moving average (SMA) is an arithmetic moving average calculated by adding recent prices and then dividing that figure by the number of time periods in the calculation average. For example, one could add the closing price of a security for a number of time periods and then divide this total by that same number of periods. Short-term averages respond quickly to changes in the price of the underlying security, while long-term averages are slower to react. There are other types of moving averages, including the exponential moving average (EMA) and the weighted moving average (WMA).

Investopedia / Sabrina Jiang


The formula for SMA is:


SMA = A 1 + A 2 + . . . + A n n where: A n = the price of an asset at period  n n = the number of total periods \begin{aligned} &\text{SMA}=\dfrac{A_1 + A_2 + … + A_n}{n} \\ &\textbf{where:}\\ &A_n=\text{the price of an asset at period } n\\ &n=\text{the number of total periods}\\ \end{aligned}
SMA=nA1+A2+...+Anwhere:An=the price of an asset at period nn=the number of total periods

For example, this is how you would calculate the simple moving average of a security with the following closing prices over a 15-day period.

Week One (5 days): 20, 22, 24, 25, 23

Week Two (5 days): 26, 28, 26, 29, 27

Week Three (5 days): 28, 30, 27, 29, 28

A 10-day moving average would average out the closing prices for the first 10 days as the first data point. The next data point would drop the earliest price, add the price on day 11, then take the average, and so on. Likewise, a 50-day moving average would accumulate enough data to average 50 consecutive days of data on a rolling basis.

A simple moving average is customizable because it can be calculated for different numbers of time periods. This is done by adding the closing price of the security for a number of time periods and then dividing this total by the number of time periods, which gives the average price of the security over the time period.

A simple moving average smooths out volatility and makes it easier to view the price trend of a security. If the simple moving average points up, this means that the security’s price is increasing. If it is pointing down, it means that the security’s price is decreasing. The longer the time frame for the moving average, the smoother the simple moving average. A shorter-term moving average is more volatile, but its reading is closer to the source data.

One of the most popular simple moving averages is the 200-day SMA. However, there is a danger to following the crowd. As The Wall Street Journal explains, since thousands of traders base their strategies around the 200-day SMA, there is a chance that these predictions could become self-fulfilling and limit price growth.

Special Considerations

Analytical Significance

Moving averages are an important analytical tool used to identify current price trends and the potential for a change in an established trend. The simplest use of an SMA in technical analysis is using it to quickly determine if an asset is in an uptrend or downtrend.

Another popular, albeit slightly more complex, analytical use is to compare a pair of simple moving averages with each covering different time frames. If a shorter-term simple moving average is above a longer-term average, an uptrend is expected. On the other hand, if the long-term average is above a shorter-term average then a downtrend might be the expected outcome.

Popular Trading Patterns

Two popular trading patterns that use simple moving averages include the death cross and a golden cross. A death cross occurs when the 50-day SMA crosses below the 200-day SMA. This is considered a bearish signal, indicating that further losses are in store. The golden cross occurs when a short-term SMA breaks above a long-term SMA. Reinforced by high trading volumes, this can signal further gains are in store.

Simple Moving Average vs. Exponential Moving Average

The major difference between an exponential moving average (EMA) and a simple moving average is the sensitivity each one shows to changes in the data used in its calculation. More specifically, the EMA gives a higher weighting to recent prices, while the SMA assigns an equal weighting to all values.

The two averages are similar because they are interpreted in the same manner and are both commonly used by technical traders to smooth out price fluctuations. Since EMAs place a higher weighting on recent data than on older data, they are more reactive to the latest price changes than SMAs are, which makes the results from EMAs more timely and explains why the EMA is the preferred average among many traders.

Simple Vs. Exponential Moving Averages

Limitations of Simple Moving Average

It is unclear whether or not more emphasis should be placed on the most recent days in the time period or on more distant data. Many traders believe that new data will better reflect the current trend the security is moving with. At the same time, other traders feel that privileging certain dates over others will bias the trend. Therefore, the SMA may rely too heavily on outdated data since it treats the 10th or 200th day’s impact the same as the first or second day’s.

Similarly, the SMA relies wholly on historical data. Many people (including economists) believe that markets are efficient—that is, that current market prices already reflect all available information. If markets are indeed efficient, using historical data should tell us nothing about the future direction of asset prices.

How Are Simple Moving Averages Used in Technical Analysis?

Traders use simple moving averages (SMAs) to chart the long-term trajectory of a stock or other security, while ignoring the noise of day-to-day price movements. This allows traders to compare medium- and long-term trends over a larger time horizon. For example, if the 200-day SMA of a security falls below its 50-day SMA, this is usually interpreted as a bearish death cross pattern and a signal of further declines. The opposite pattern, the golden cross, indicates potential for a market rally.

How Do You Calculate a Simple Moving Average?

To calculate a simple moving average, the number of prices within a time period is divided by the number of total periods. For instance, consider shares of Tesla closed at $10, $11, $12, $11, $14 over a five day period. The simple moving average of Tesla’s shares would equal $10 + $11 + $12 + $11 + $14 divided by 5, equaling $11.6.

What Is the Difference Between a Simple Moving Average and an Exponential Moving Average?

While a simple moving average gives equal weight to each of the values within a time period, an exponential moving average places greater weight on recent prices. Exponential moving averages are typically seen as a more timely indicator of a price trend, and because of this, many traders prefer using this over a simple moving average. Common short-term exponential moving averages include the 12-day and 26-day. The 50-day and 200-day exponential moving averages are used to indicate long-term trends.

[ad_2]

Source link

Relative Strength Index (RSI) Indicator Explained With Formula

Written by admin. Posted in Technical Analysis

[ad_1]

What Is the Relative Strength Index (RSI)?

The relative strength index (RSI) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of a security’s recent price changes to evaluate overvalued or undervalued conditions in the price of that security.

The RSI is displayed as an oscillator (a line graph) on a scale of zero to 100. The indicator was developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, New Concepts in Technical Trading Systems.

The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.

Key Takeaways

  • The relative strength index (RSI) is a popular momentum oscillator introduced in 1978.
  • The RSI provides technical traders with signals about bullish and bearish price momentum, and it is often plotted beneath the graph of an asset’s price.
  • An asset is usually considered overbought when the RSI is above 70 and oversold when it is below 30.
  • The RSI line crossing below the overbought line or above oversold line is often seen by traders as a signal to buy or sell.
  • The RSI works best in trading ranges rather than trending markets.

How the Relative Strength Index (RSI) Works

As a momentum indicator, the relative strength index compares a security’s strength on days when prices go up to its strength on days when prices go down. Relating the result of this comparison to price action can give traders an idea of how a security may perform. The RSI, used in conjunction with other technical indicators, can help traders make better-informed trading decisions.

Calculating RSI

The RSI uses a two-part calculation that starts with the following formula:


R S I step one = 100 [ 100 1 + Average gain Average loss ] RSI_{\text{step one}} = 100- \left[ \frac{100}{ 1 + \frac{\text{Average gain}}{\text{Average loss} }} \right]
RSIstep one=100[1+Average lossAverage gain100]

The average gain or loss used in this calculation is the average percentage gain or loss during a look-back period. The formula uses a positive value for the average loss. Periods with price losses are counted as zero in the calculations of average gain. Periods with price increases are counted as zero in the calculations of average loss.

The standard number of periods used to calculate the initial RSI value is 14. For example, imagine the market closed higher seven out of the past 14 days with an average gain of 1%. The remaining seven days all closed lower with an average loss of −0.8%.

The first calculation for the RSI would look like the following expanded calculation:


55.55 = 100 [ 100 1 + ( 1 % 14 ) ( 0.8 % 14 ) ] 55.55 = 100 – \left [ \frac {100 }{ 1 + \frac{ \left ( \frac{ 1\% }{ 14 } \right) }{ \left( \frac{ 0.8\% }{ 14 } \right)} } \right ]
55.55=1001+(140.8%)(141%)100

Once there are 14 periods of data available, the second calculation can be done. Its purpose is to smooth the results so that the RSI only nears 100 or zero in a strongly trending market.


R S I step two = 100 [ 100 1 + ( Previous Average Gain × 13 )   +  Current Gain ( ( Previous Average Loss × 13 )   +  Current Loss ) ] RSI_{\text{step two}} = 100 – \left [ \frac{ 100 }{ 1 + \frac{ \left ( \text{Previous Average Gain} \times 13 \right ) \ + \ \text{Current Gain} }{ \left ( \left ( \text{Previous Average Loss} \times 13 \right ) \ + \ \text{Current Loss} \right ) } } \right ]
RSIstep two=100[1+((Previous Average Loss×13) + Current Loss)(Previous Average Gain×13) + Current Gain100]

Plotting RSI

After the RSI is calculated, the RSI indicator can be plotted beneath an asset’s price chart, as shown below. The RSI will rise as the number and size of up days increase. It will fall as the number and size of down days increase.

Image by Sabrina Jiang © Investopedia 2021


As you can see in the above chart, the RSI indicator can stay in the overbought region for extended periods while the stock is in an uptrend. The indicator may also remain in oversold territory for a long time when the stock is in a downtrend. This can be confusing for new analysts, but learning to use the indicator within the context of the prevailing trend will clarify these issues.

Why Is RSI Important?

  • Traders can use RSI to predict the price behavior of a security.
  • It can help traders validate trends and trend reversals.
  • It can point to overbought and oversold securities.
  • It can provide short-term traders with buy and sell signals.
  • It’s a technical indicator that can be used with others to support trading strategies.

Using RSI With Trends

Modify RSI Levels to Fit Trends

The primary trend of the security is important to know to properly understand RSI readings. For example, well-known market technician Constance Brown, CMT, proposed that an oversold reading by the RSI in an uptrend is probably much higher than 30. Likewise, an overbought reading during a downtrend is much lower than 70.

As you can see in the following chart, during a downtrend, the RSI peaks near 50 rather than 70. This could be seen by traders as more reliably signaling bearish conditions.

Many investors create a horizontal trendline between the levels of 30 and 70 when a strong trend is in place to better identify the overall trend and extremes.

On the other hand, modifying overbought or oversold RSI levels when the price of a stock or asset is in a long-term horizontal channel or trading range (rather than a strong upward or downward trend) is usually unnecessary.

The relative strength indicator is not as reliable in trending markets as it is in trading ranges. In fact, most traders understand that the signals given by the RSI in strong upward or downward trends often can be false.

Use Buy and Sell Signals That Fit Trends

A related concept focuses on trade signals and techniques that conform to the trend. In other words, using bullish signals primarily when the price is in a bullish trend and bearish signals primarily when a stock is in a bearish trend may help traders to avoid the false alarms that the RSI can generate in trending markets.

Image by Sabrina Jiang © Investopedia 2021


Overbought or Oversold

Generally, when the RSI indicator crosses 30 on the RSI chart, it is a bullish sign and when it crosses 70, it is a bearish sign. Put another way, one can interpret that RSI values of 70 or above indicate that a security is becoming overbought or overvalued. It may be primed for a trend reversal or corrective price pullback. An RSI reading of 30 or below indicates an oversold or undervalued condition.

Overbought refers to a security that trades at a price level above its true (or intrinsic) value. That means that it’s priced above where it should be, according to practitioners of either technical analysis or fundamental analysis. Traders who see indications that a security is overbought may expect a price correction or trend reversal. Therefore, they may sell the security.

The same idea applies to a security that technical indicators such as the relative strength index highlight as oversold. It can be seen as trading at a lower price than it should. Traders watching for just such an indication might expect a price correction or trend reversal and buy the security.

Interpretation of RSI and RSI Ranges

During trends, the RSI readings may fall into a band or range. During an uptrend, the RSI tends to stay above 30 and should frequently hit 70. During a downtrend, it is rare to see the RSI exceed 70. In fact, the indicator frequently hits 30 or below.

These guidelines can help traders determine trend strength and spot potential reversals. For example, if the RSI can’t reach 70 on a number of consecutive price swings during an uptrend, but then drops below 30, the trend has weakened and could be reversing lower. 

The opposite is true for a downtrend. If the downtrend is unable to reach 30 or below and then rallies above 70, that downtrend has weakened and could be reversing to the upside. Trend lines and moving averages are helpful technical tools to include when using the RSI in this way.

Be sure not to confuse RSI and relative strength. The first refers to changes in the the price momentum of one security. The second compares the price performance of two or more securities.

Example of RSI Divergences

An RSI divergence occurs when price moves in the opposite direction of the RSI. In other words, a chart might display a change in momentum before a corresponding change in price.

A bullish divergence occurs when the RSI displays an oversold reading followed by a higher low that appears with lower lows in the price. This may indicate rising bullish momentum, and a break above oversold territory could be used to trigger a new long position.

A bearish divergence occurs when the RSI creates an overbought reading followed by a lower high that appears with higher highs on the price.

As you can see in the following chart, a bullish divergence was identified when the RSI formed higher lows as the price formed lower lows. This was a valid signal, but divergences can be rare when a stock is in a stable long-term trend. Using flexible oversold or overbought readings will help identify more potential signals.

Image by Sabrina Jiang © Investopedia 2021


Example of Positive-Negative RSI Reversals

An additional price-RSI relationship that traders look for is positive and negative RSI reversals. A positive RSI reversal may take place once the RSI reaches a low that is lower than its previous low at the same time that a security’s price reaches a low that is higher than its previous low price. Traders would consider this formation a bullish sign and a buy signal.

Conversely, a negative RSI reversal may take place once the RSI reaches a high that is higher that its previous high at the same time that a security’s price reaches a lower high. This formation would be a bearish sign and a sell signal.

Example of RSI Swing Rejections

Another trading technique examines RSI behavior when it is reemerging from overbought or oversold territory. This signal is called a bullish swing rejection and has four parts:

  1. The RSI falls into oversold territory.
  2. The RSI crosses back above 30.
  3. The RSI forms another dip without crossing back into oversold territory.
  4. The RSI then breaks its most recent high.

As you can see in the following chart, the RSI indicator was oversold, broke up through 30, and formed the rejection low that triggered the signal when it bounced higher. Using the RSI in this way is very similar to drawing trend lines on a price chart.

Image by Sabrina Jiang © Investopedia 2021


There is a bearish version of the swing rejection signal that is a mirror image of the bullish version. A bearish swing rejection also has four parts:

  1. The RSI rises into overbought territory.
  2. The RSI crosses back below 70.
  3. The RSI forms another high without crossing back into overbought territory.
  4. The RSI then breaks its most recent low.

The following chart illustrates the bearish swing rejection signal. As with most trading techniques, this signal will be most reliable when it conforms to the prevailing long-term trend. Bearish signals during downward trends are less likely to generate false alarms.

Image by Sabrina Jiang © Investopedia 2021


The Difference Between RSI and MACD

The moving average convergence divergence (MACD) is another trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA. The result of that calculation is the MACD line.

A nine-day EMA of the MACD, called the signal line, is then plotted on top of the MACD line. It can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell, or short, the security when the MACD crosses below the signal line.

The RSI was designed to indicate whether a security is overbought or oversold in relation to recent price levels. It’s calculated using average price gains and losses over a given period of time. The default time period is 14 periods, with values bounded from 0 to 100.

The MACD measures the relationship between two EMAs, while the RSI measures price change momentum in relation to recent price highs and lows. These two indicators are often used together to provide analysts with a more complete technical picture of a market.

These indicators both measure the momentum of an asset. However, they measure different factors, so they sometimes give contradictory indications. For example, the RSI may show a reading above 70 for a sustained period of time, indicating a security is overextended on the buy side.

At the same time, the MACD could indicate that buying momentum is still increasing for the security. Either indicator may signal an upcoming trend change by showing divergence from price (the price continues higher while the indicator turns lower, or vice versa).

Limitations of the RSI

The RSI compares bullish and bearish price momentum and displays the results in an oscillator placed beneath a price chart. Like most technical indicators, its signals are most reliable when they conform to the long-term trend.

True reversal signals are rare and can be difficult to separate from false alarms. A false positive, for example, would be a bullish crossover followed by a sudden decline in a stock. A false negative would be a situation where there is a bearish crossover, yet the stock suddenly accelerated upward.

Since the indicator displays momentum, it can stay overbought or oversold for a long time when an asset has significant momentum in either direction. Therefore, the RSI is most useful in an oscillating market (a trading range) where the asset price is alternating between bullish and bearish movements.

What Does RSI Mean?

The relative strength index (RSI) measures the price momentum of a stock or other security. The basic idea behind the RSI is to measure how quickly traders are bidding the price of the security up or down. The RSI plots this result on a scale of 0 to 100.

Readings below 30 generally indicate that the stock is oversold, while readings above 70 indicate that it is overbought. Traders will often place this RSI chart below the price chart for the security, so they can compare its recent momentum against its market price.

Should I Buy When RSI Is Low?

Some traders consider it a buy signal if a security’s RSI reading moves below 30. This is based on the idea that the security has been oversold and is therefore poised for a rebound. However, the reliability of this signal will depend in part on the overall context. If the security is caught in a significant downtrend, then it might continue trading at an oversold level for quite some time. Traders in that situation might delay buying until they see other technical indicators confirm their buy signal.

What Happens When RSI Is High?

As the relative strength index is mainly used to determine whether a security is overbought or oversold, a high RSI reading can mean that a security is overbought and the price may drop. Therefore, it can be a signal to sell the security.

What Is the Difference Between RSI and Moving Average Convergence Divergence (MACD)?

RSI and moving average convergence divergence (MACD) are both momentum measurements that can help traders understand a security’s recent trading activity. However, they accomplish this goal in different ways.

In essence, the MACD works by smoothing out the security’s recent price movements and comparing that medium-term trend line to a short-term trend line showing its more recent price changes. Traders can then base their buy and sell decisions on whether the short-term trend line rises above or below the medium-term trend line.

[ad_2]

Source link