In the today’s article, we’ll talk about the standard deviation. In the literature, there are still such names, as: root-mean-square deviation, quadratic deviation, and variance. Strictly speaking, the root-mean-square deviation and standard deviation are very similar, but different concepts. Since by the root-mean-square deviation we mean the theoretical value of the variance, and the standard deviation – is an assessment of the root-mean-square deviation by the specific selection. Despite this, in some sources they are often considered synonyms. Shortened abbreviations: RMSD, S, STD, STDev, σ (further, in the article, the standard deviation will be denoted as STD).
Difference between standard deviation and variance
The standard deviation is closely related to other known statistical measure – variance. The standard deviation is the square root of the variance. The standard deviation, as well as the variance is a measure of the spread random value relative to its mathematical expectation (the arithmetical mean is used instead of the expectation for a finite number of data). In other words, the standard deviation shows how the values of some random data selection are scattered in relation to their average value. Interpretation of the physical meaning of the variance is not so obvious.
The root-mean-square deviation is determined according to the following formula:
The standard deviation is an assessment of the root-mean-square deviation based on an unbiased assessment of the variance and is defined by the formula:
where Xi– i-th element of the sample, n – volume of the sample, M – mathematical expectation (the arithmetical mean of the selection).
The dimension of the STD corresponds to the dimension of the measured value.
The picture below clearly shows the essence of the standard deviation conformably to the price series. The standard deviation indicator shows the average value of the price deviation from its mathematical expectation (average value) for the selected period. The moving average is used as the average value.
In this case, the simple moving average is not necessarily accepted. The calculation can be performed for a simple, modified, exponential and linear weighted moving average.
Standard deviation and normal distribution
The standard deviation is widely used in mathematical statistics, econometrics, finance and other fields of human activity associated with random values. This indicator is great for interval data estimates that obey to the normal distribution law. With help of the standard deviation it is convenient to identify the frequency of the occurrence of any random event. For example, the probability that random value will deviate from its mathematical expectation more than on 3 standard deviations tends to zero. To be precise, this probability equals 0.27%. This property of random values is called the three-sigma rule.
Usage of the three-sigma rule is relevant only for values that obey to the normal law of probability distribution. Assumptions about the normality of logarithms distribution of financial assets' profitability are accepted in econometrics, but this is not always true. Real market distributions are heavy-tailed, that suggests a quite frequent occurrence of the strong price movements. Some price movements can reach values of tens of standard deviations, which is impossible in the case of the normal law of probability distribution. Often we can find assets with sharp tops of the distribution that called a positive coefficient of kurtosis. This fact should be taken into account when using the standard deviation for interval estimates in the trading. Since, rare or impossible, in the theory, significant changes in prices of the financial assets are more often met on practice.
Histogram of the day profitability of S&P500 index since 2007 and the curve for the normal probability distribution with the same values of the average value and variance are shown on the chart below.
- Peakedness of the probability distribution (a positive coefficient of kurtosis),
- Thick tails.
For deeper understanding of the STD, let’s consider three data selections, which is hypothetical profitability of the three trading hypothetical systems over the past 4 months in %:
- 0, 0, 20, 20.
- 10, 10, 10, 10.
- 0, 0, 0, 40.
In all three cases, the mathematical expectation (the arithmetical mean) of the profitability equals 10%. From this perspective, the trading systems do not differ. In terms of drawdown, the considered systems are also equal, since unprofitable periods (drawdowns) are not observed in any of them. But, the results of these three systems are not identical. How do they differ? If look closely, then it should be noted that variation of the profit value in every separately taken month, with respect to its average value is not the same. This spread of values (sometimes called the volatility of the portfolio) measures the standard deviation. Let’s compare the indicator of the standard deviation for the given selections:
How to use standard deviation in practice?
As we already know from the article about Sharpe ratio, the standard deviation of the profitability is a measure of risk. The smaller the standard deviation, the more stable is considered the expected profit. From this perspective, the considered trading systems significantly differ from each other. Trading system #2 brings a stable profit of 10% every month, there is no spread in profitability relative to the average, and the standard deviation is equal to zero. If to take into the calculation only proposed indicators of the trading systems, then trading system #2 is most preferable, since it shows a more stable result under the same profitability and drawdown. Known to us the Sharpe ratio for trading system #2 will tend to infinity, due to the zero standard deviation of the profitability. The use of the standard deviation in the trading is fairly wide. Let's consider few examples below.
Calculation of the volatility
Historical and implied volatility which we discussed in the article are calculated using the standard deviation. The volatility is none other than the standard deviation of the logarithmic profitability of the instrument on an annualized basis. Historical volatility is an important concept for the trader. It reflects the activity of trading and asset riskiness, as the degree of its variability. Implied volatility plays an important role in the assessment of the options cost.
Assessment of the risk
Various specialized methods of the risk assessment are also based on the standard deviation. For example, Value at Risk (VAR) – the most common cost measure of the risk. It shows value in the money, which the expected losses do not exceed over a certain period with set probability. This category may include the Sharpe ratio, Sortino, Trainer ratios and beta factor.
All technical indicators, in the calculation of which, in one way or another, takes part the volatility, are based on the standard deviation. In the Protrader terminal, the examples of such indicators are directly the standard deviation of asset price (STD) and Bollinger Bands.
Bollinger Bands is common technical indicator; it estimates the supposed boundaries of the asset movement depending on the volatility in the past. The values of the indicator boundaries are calculated as standard deviation from moving average for the specified period. Double standard deviation is usually used; the probability to exceed this boundary for the random value equals 13.6%. In this case it is convenient to set and adjust the levels of decision-loss and fixation of the profit on these levels. But we should not forget that the hypothesis of the normal distribution is not always satisfied for the prices of financial assets. Below you can see Bollinger Bands built from the simple moving average with period = 20 and double standard deviation on the day chart of the currency pair EUR/USD.
The standard deviation of asset prices (STD) can help to define current level of the asset volatility and to predict its change in the future. Long periods of low volatility will be invariably replaced by the periods of active trading. Conversely, a long volatile movement of the asset will ultimately lead to a weak movement in a narrow price range. This cyclicity of the volatility is clearly visible on the 15-minute chart of the currency pair EUR/USD.
The portfolio trading
It is important to keep track the interconnections of the traded instruments during the pair and portfolio trading. The correlation of the used assets is applied for this. The concept of correlation takes an important place in the theory of portfolio investment and in the principle of diversification. Correlation – a measure of the statistical interconnection of several random values. Linear Pearson correlation coefficient for the two yields of two financial assets (A and B) is calculated as follows:
where cov ( A,B) – covariance of asset profitability, and the standard deviations of asset profitability in the denominator.
The standard deviation can help the trader to increase the accuracy of risk assessment of their trading, keep track and predict the volatility of specific assets, and create and use synthetic trading instruments.
Have not tried PTMC yet? There is no better way to boost knowledge than to use it! Start trading with PTMC now!