Standard deviation

Standard deviation

Jayati WALIA

In this article, Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022) presents an overview of standard deviation and its use in financial markets.

Definition

The standard deviation is a measure that indicates how much data scatter around the mean. The idea is to measure how an observation deviates from the mean on average./p>

Mathematical formulae

The first step to compute the standard deviation is to compute the mean. Considering a variable X, the arithmetic mean of a data set with N observations, X1, X2 … XN, is computed as:

img_arithmetic_mean

In the data set analysis, we also consider the dispersion or variability of data values around the central tendency or the mean. The variance of a data set is a measure of dispersion of data set values from the (estimated) mean and can be expressed as:

variance

Note that in the above formula we divide by N-1 because the mean is not known but estimated (usual case in finance). If the mean is known with certainty (when dealing the whole population not a sample), then we divide by N.

A problem with variance, however, is the difficulty of interpreting it due to its squared unit of measurement. This issue is resolved by using the standard deviation, which has the same measurement unit as the observations of the data set (such as percentage, dollar, etc.). The standard deviation is computed as the square root of variance:

standard deviation

A low value standard deviation indicates that the data set values tend to be closer to the mean of the set and thus lower dispersion, while a high standard deviation indicates that the values are spread out over a wider range indication higher dispersion.

Measure of volatility

For financial investments, the X variable in the above formulas would correspond to the return on the investment computed on a given period of time. We usually consider the trade-off between risk and reward. In this context, the reward corresponds to the expected return measured by the mean, and the risk corresponds to the standard deviation of returns.

In financial markets, the standard deviation of asset returns is used as a statistical measure of the risk associated with price fluctuations of any particular security or asset (such as stocks, bonds, etc.) or the risk of a portfolio of assets (such as mutual funds, index mutual funds or ETFs, etc.).

Investors always consider a mathematical basis to make investment decisions known as mean-variance optimization which enables them to make a meaningful comparison between the expected return and risk associated with any security. In other words, investors expect higher future returns on an investment on average if that investment holds a relatively higher level of risk or uncertainty. Standard deviation thus provides a quantified estimate of the risk or volatility of future returns.

In the context of financial securities, the higher the standard deviation, the greater is the dispersion between each return and the mean, which indicates a wider price range and hence greater volatility. Similarly, the lower the standard deviation, the lesser is the dispersion between each return and the mean, which indicates a narrower price range and hence lower volatility for the security.

Example: Apple Stock

To illustrate the concept of volatility in financial markets, we use a data set of Apple stock prices. At each date, we compute the volatility as the standard deviation of daily stock returns over a rolling window corresponding to the past calendar month (about 22 trading days). This daily volatility is then annualized and expressed as a percentage.

Figure 1. Stock price and volatility of Apple stock.

price and volatility for Apple stock
Source: computation by the author (data source: Bloomberg).

You can download below the Excel file for the calculation of the volatility of stock returns. The data used are for Apple for the period 2020-2021.

ownload the Excel file to compute the volatility of stock returns

Related posts on the SimTrade blog

▶ Jayati WALIA Quantitative Risk Management

▶ Jayati WALIA Value at Risk

▶ Jayati WALIA Brownian Motion in Finance

Useful resources

Wikipedia Standard Deviation

About the author

The article was written in November 2021 by Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022).

Bollinger Bands

Bollinger Bands

Jayati WALIA

In this article, Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022) presents the popular Bollinger bands used in technical analysis.

This post is organized as follows: we introduce the concept of Bollinger bands and provide an illustration with Apple stock prices. We delve into the interpretation of Bollinger bands as port and resistance price levels used to define buy and sell trading signals. We then present the techniques to compute the Bollinger bands and finally discuss their limitations.

Introduction

In the 1980s, John Bollinger, a long-time market technical analyst, developed a technical analysis tool for trading in securities. At that time, it was presumed that volatility was a static quantity, a property of a security, and if it changed at all, it would happen in a long-term period. After some experimentation, Bollinger figured that volatility was indeed a very dynamic quantity and a moving average computed on a time period (typically 20 days) with bands drawn above and below at intervals could be determined by a multiple of standard deviation.

Unlike a percentage calculation from a simple moving average, Bollinger bands simply add and subtract a standard deviation (or a multiple of the standard deviation, usually two). The tool thus represents the volatility in the prices of the security which is measured by the standard deviation of the prices of the security. The bands are used to understand the overbought or oversold levels for a security and to follow the price trends. The indicator/tool comprises of three main bands, an upper band, a lower band, and a middle band.

The middle band is a simple moving average (SMA), which is usually computed over a rolling period of 20 trading days (about a calendar month). The upper and the lower bands are positioned two standard deviations away from the SMA. The change in the distance of the upper and lower bands from the SMA determine the price strength (which is the strength of price trend of stock relative to overall market trend) and the lower and the upper levels for the stock prices. Bollinger bands can be applied to all financial securities traded in the market including equities, forex, commodities, futures, etc. They are used in multiple time frames (daily, weekly and monthly) and can be even applied to very short-term periods such as hours.

Figure 1 represents the evolution of the price of Apple stocks with the Bollinger bands for the period January 2020 – September 2021.

Figure 1. Bollinger bands on Apple stock.
Bollinger bands Apple stock
Source: computation by the author (data source: Bloomberg).

Figure 2 illustrates for the price of Apple stocks the link between the Bollinger bands and volatility measured by the standard deviation of prices. The lower the volatility, the narrower the bands.

Figure 2. Bollinger’s bands and volatility
Bollinger bands and volatility Apple stock
Source: computation by the author (data source: Bloomberg).

How to interpret Bollinger bands

Traders use the Bollinger bands to determine the strength of the price trend of a stock. The upper and lower bands measure the degree of volatility in prices over time. The width between the bands widens as the volatility in the stock prices increases and indicates a strong trend in the price movement. Conversely, the width between the bands narrows as the volatility decreases, indicating that the price of the security is range-bound. When this width is extremely narrow and contracting, it indicates that there can be a potential breakout in the price movement soon and is referred to as “Bollinger squeeze”. If the price crosses the upper band, it may indicate that the movement will be in an uptrend, and If the price crosses the lower band, it may indicate that the movement will be in a downtrend.

If the price hits the upper band, it indicates an overbought level in the security, and when the price hits the lower band, it indicates an oversold level. When the price crosses the upper band, traders consider it to a positive signal to buy the stock as the price trend is in an upward direction and shows great strength. Similarly, when the price crosses the lower band, traders consider it to a positive signal to sell the stock as the price trend is in a downward direction and shows great strength.

In other words, Bollinger bands act as dynamic resistance and support levels for the price of the security. Thus, once prices touch either of the upper or lower band levels, they tend to return back to the middle of the band. This phenomenon is referred to as the “Bollinger bounce” and many traders rely extensively on this strategy when the market is ranging and there is no clear trend that they can identify.

Calculation

The three bands of the Bollinger bands are calculated using the following formula:

Middle Band

The middle band is the simple moving average (SMA) over a 20-day rolling period. To calculate the SMA, we compute the average of the closing prices of the stock over the past 20 days.

SMA 20 days

To compute the upper and lower bands, we need first to compute the standard deviation of prices.

img_std_dev_bollinger_bands

Upper band

The upper band is calculated by adding the SMA and the standard deviation times two:

Bollinger upper band

Lower band

The lower band is calculated by subtracting the standard deviation times two from the SMA:

Bollinger lower band

Limitations of Bollinger bands

Bollinger bands are considered to be lagging indicators since they represent the simple moving average which is based on the historical stock prices. This means that the indicator is not very useful in predicting the future price patterns as the indicator signals a price trend when it has already started to happen.

To benefit from the Bollinger bands, traders often combine this indicator with other technical tools like the Relative Strength Index (RSI), Stochastic indicators and Moving Averages Convergence-Divergence (MACD).

Related Posts

   ▶ Jayati WALIA Trend Analysis and Trading Signals

   ▶ Jayati WALIA Moving averages

   ▶ Jayati WALIA Standard deviation

Useful resources

Bollinger bands

Fidelity: Technical Indicators: Bollinger Bands

About the author

The article was written in November 2021 by Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022).