> For the complete documentation index, see [llms.txt](https://chartschool.stockcharts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-indicators/standard-deviation-volatility.md).

# Standard Deviation (Volatility)

## What Is Standard Deviation? <a href="#introduction" id="introduction"></a>

Standard deviation is a statistical term that measures the amount of variability or dispersion around an average. Standard deviation is also a measure of volatility. Generally speaking, dispersion is the difference between the actual value and the average value. The larger this dispersion or variability is, the higher the standard deviation. The smaller this dispersion or variability is, the lower the standard deviation.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FtaiOQwinKt7Gr1E5ynYt%2Fstddevexample.png?alt=media&amp;token=d943f271-cd56-4ec8-9de7-1844e2de5aa7" alt=""><figcaption></figcaption></figure>

Chartists can use the Standard Deviation indicator directly to measure expected risk and determine the significance of certain price movements. It is also integral to the calculation of Bollinger Bands, where the upper and lower bands are set a certain number of standard deviations away from the average.

***

## Calculating Standard Deviation <a href="#calculation" id="calculation"></a>

StockCharts calculates the standard deviation for a population, which assumes that the data points involved represent the whole data set, not a sample from a bigger data set. The calculation steps are as follows:

1. Calculate the average (mean) price for the data points in the set. When using the indicator on a chart, it uses data from all the bars in the specified lookback period.
2. Determine each bar's deviation (close less average price).
3. Square each bar's deviation.
4. Sum the squared deviations.
5. Divide this sum by the number of bars in the lookback period.
6. The standard deviation is then equal to the square root of that number.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FG7x8z9nHOSk5GuJGTz3z%2Fstdv-1-qqqqexcel1.png?alt=media&amp;token=6d8fd411-4a7a-4799-b00f-9e48070d151f" alt=""><figcaption><p>Standard Deviation calculated in the traditional way</p></figcaption></figure>

The table above shows an example for a 10-period standard deviation using QQQ data. Notice that the 10-period average is calculated after the 10th period and this average is applied to all 10 periods. Building a running standard deviation with this formula would be quite intensive. Excel has an easier way with the STDEVP formula. The table below shows the 10-period standard deviation using this formula.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FhXvvHoHWOuhd2ZNn9L0U%2Fstdv-1-qqqqexcel2.png?alt=media&amp;token=6bb48f06-ecaa-458f-a979-82dbf6e14ccb" alt=""><figcaption><p>Standard Deviation calculated using Excel's STDEVP function</p></figcaption></figure>

Click below to download an Excel spreadsheet that shows standard deviation calculations.&#x20;

{% file src="/files/OiCkF1DFcLpoDr1Ytxt7" %}

***

## Interpreting Standard Deviation <a href="#standard_deviation_values" id="standard_deviation_values"></a>

### Assessing Volatility

#### High vs. Low Volatility

Determining volatility for a security from the standard deviation is fairly straightforward. When the standard deviation value is low, prices in the lookback period are clustered close to the average. When the standard deviation value is high, prices in the lookback are further away from the average.

The chart below shows the standard deviation (black) overlaid on the price (green) for Micron Technology (MU) and Intel (INTC). Both stocks show a similar price trajectory, trading in a range from October to the end of March before dramatically rising in price. A visual assessment of the standard deviation lines shows that both stocks have relatively low standard deviation values while in the trading range, and then show a sharp increase in volatility once the prices skyrocket in April and May.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2Ftfn9oqm730iRfTlAVCE3%2Fstdv-3-compare.png?alt=media&amp;token=0c3e8cfc-dab6-4a64-ada2-4e257f3dca81" alt=""><figcaption><p>Micron and Intel have similar price trajectories and volatility, but measured on drastically different scales</p></figcaption></figure>

It is important to remember that standard deviation values are dependent on the price of the underlying security. Securities with high prices, such as Micron (currently 1065.11), will have higher standard deviation values than securities with lower prices, such as Intel (currently 120.33). Micron's higher values are not a reflection of higher volatility, but rather a reflection of the actual price. Standard deviation values are shown in terms that relate directly to the price of the underlying security.&#x20;

{% hint style="warning" %}
**Note:** Historical standard deviation values will also be affected if a security experiences a large price change over a period of time. A security that moves from 10 to 50 will most likely have a higher standard deviation at 50 than it did at 10.
{% endhint %}

On the chart above, the left scale relates to the standard deviation. Micron's standard deviation scale extends from 10 to 120, while the Intel range runs from 1 to 13. Average price changes (deviations) in Micron range from $10 to $120, while average price changes (deviations) in Intel range from $1 to $13. One would have to divide the standard deviation by the closing price to directly compare volatility for the two securities, but a visual assessment of the charts can allow for some indirect comparisons.

#### Using Moving Averages to Determine Baseline Volatility

With standard deviation values dependent on the security's price, chartists may look to other methods to determine what constitutes a high standard deviation value for a specific security. Using a moving average of the standard deviation allows you to compare current values with historical averages.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F6a2vKxuewAPNSFjb2N9e%2Fstdv-4-smabaseline.png?alt=media&amp;token=f7077bc1-18ce-4f8b-aca6-e57264799293" alt=""><figcaption><p>A standard deviation above its longer-term SMA indicates noteworthy volatility</p></figcaption></figure>

The Apple (AAPL) chart above includes a 21-day (approximately one month) standard deviation, which is still quite variable, fluctuating between 5.00 and 17.50 from April until September. A 250-day (approximately one year) moving average can be applied to smooth the Standard Deviation indicator and determine an average standard deviation value of around 7.95.

Price moves larger than 7.95 are reflected in standard deviation values above the 250-day SMA. These above-average price movements indicate heightened interest that could foreshadow a trend change or mark a breakout. Apple remained above its average standard deviation for around four months, from late April until late August.

#### Rising vs. Falling Volatility

Changes in volatility can also be assessed using the Standard Deviation indicator. A rising value indicates an increase in volatility, while a falling value indicates decreased volatility.

In the Walmart (WMT) chart below, volatility spiked up four times over the course of a year. In the first two instances, in December and February, the spike in volatility was associated with a strong surge in price. But the second two spikes were associated with sharp drops; both included a large gap down.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FfUOEAQTEiYrdfpkzs1Ls%2Fstdv-5-risefall.png?alt=media&amp;token=83116d47-33fc-434c-9679-b0f808badbed" alt=""><figcaption><p>A large price move will increase volaility, regardless of whether the price moves up or down</p></figcaption></figure>

Standard deviation shows an increase in volatility, but it is important to understand that volatility can increase because of a large price move in either direction. Chartists must look at price or other indicators to determine the direction of that big move.

***

### Assessing the Importance of Price Moves <a href="#measuring_expectations" id="measuring_expectations"></a>

The current value of the standard deviation can be used to estimate the importance of a price move or set expectations. The number of standard deviations that the current price is above or below the average price can indicate how significant the price move is. The Bollinger Bands overlay is based on this premise.

This approach assumes that price changes are normally distributed with a classic bell curve. Even though price changes for securities are not always normally distributed, chartists can still use normal distribution guidelines to gauge the significance of a price movement. In a normal distribution, 68% of the data points fall within one standard deviation, while 95% fall within two and 99.7% fall within three.&#x20;

Using these guidelines, traders can estimate the significance of a price movement. A move greater than one standard deviation would show above-average strength or weakness, depending on the direction of the move. Moves greater than two or three standard deviations would show extraordinary strength or weakness.

The chart below shows Meta Platforms (META) with a 20-day Standard Deviation indicator. The main price plot has Bollinger Bands plotted at one standard deviation (green), two standard deviations (yellow), and three standard deviations (red).&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F7THJEVBNCZI8TMCCUrlF%2Fstdv-6-bollingerbands.png?alt=media&amp;token=03b761c4-9fd2-4e80-ab8b-31936af2cd10" alt=""><figcaption><p>Bollinger Bands use Standard Deviation to show significant price moves</p></figcaption></figure>

Bollinger Bands are calculated by adding a moving average to the chart, then plotting upper and lower bands that are the specified number of standard deviations above and below the average. Meta's current 20-day standard deviation is 53.42, so the green bands are plotted at 53.42 above and below the average. Price bars that fall outside of the green bands are at least one standard deviation above or below average. The yellow bands are plotted at 106.84 (2 x 53.42, or two standard deviations), and the red bands are plotted at 160.26 (3 x 53.42, or three standard deviations) above and below the average; prices much less frequently fall outside of these bands.

Blue dotted lines on the chart mark peaks in standard deviation values. At the highest standard deviation peak in late September, the volatility is so high that the red (three standard deviation) bands are not even visible on the chart. On the smallest peak in late February, the bands are much closer together. In late January, price briefly rises above the upper red band on a gap up, indicating that the price is more than three standard deviations larger than usual; this is a significant price move.

{% hint style="info" %}
**Learn More:** [Bollinger Bands](/table-of-contents/technical-indicators-and-overlays/technical-overlays/bollinger-bands.md)
{% endhint %}

***

## The Bottom Line <a href="#conclusion" id="conclusion"></a>

The standard deviation is a statistical measure of volatility. These values provide chartists with an estimate for expected price movements. Price moves greater than the standard deviation show above-average strength or weakness. The standard deviation is also used in calculating other indicators, such as Bollinger Bands. These bands are set 2 standard deviations above and below a moving average by default. Moves that exceed the bands are deemed significant enough to warrant attention. As with all indicators, the standard deviation should be used in conjunction with other analysis tools, such as [momentum oscillators](/table-of-contents/technical-indicators-and-overlays/introduction-to-technical-indicators-and-oscillators.md#momentum_oscillators) or [chart patterns](/table-of-contents/chart-analysis/chart-patterns.md).

***

## Charting Standard Deviation <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

### Using with SharpCharts <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

Standard Deviation can be set as an indicator above, below, or behind a security's price plot. Once the indicator is chosen from the dropdown menu, a Standard Deviaton indicator is added to the chart with the default setting of 10 periods. Users can adjust the lookback period by changing the number in the Parameters box. Chartists can also add a moving average or other overlays by using the Overlay setting for the Standard Deviation indicator. In the example below, a 250-day simple moving average was added to the 20-day Standard Deviation indicator.

[Click here for a live version of this chart.](https://stockcharts.com/sc3/ui/?s=XLV\&a=2369889382\&p=D\&b=5\&g=0\&id=p19406602695)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FaeuCTCBeGAwKuAFNkYTS%2Fstddevinshch.png?alt=media&amp;token=275a0085-5254-4e79-975f-455ebb8fff98" alt=""><figcaption></figcaption></figure>

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FQpj8rmdmvir0huNOL9oE%2Fstdv-7-shch.png?alt=media&amp;token=2bf508ab-494d-4adb-86b9-79ce7c748bc0" alt=""><figcaption><p>Standard Deviation settings in SharpCharts</p></figcaption></figure>

{% hint style="info" %}
**Learn More:** For more details on the parameters used to configure Standard Deviation indicators, please see our [SharpCharts Parameter Reference](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts/sharpcharts-parameter-reference#standard_deviation) in the Support Center.
{% endhint %}

### Using with StockChartsACP <a href="#suggested_scans" id="suggested_scans"></a>

This indicator can be added from the Chart Settings panel for your StockChartsACP chart. The indicator can be positioned above, below, or behind the security's price plot.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FHhR7geYxeYY69KC48yj6%2Fstddevinacp.png?alt=media&amp;token=3470f76a-84cc-4abb-afcb-a8fe5ef2b2b6" alt=""><figcaption></figcaption></figure>

[Click here for a live version of this chart.](https://schrts.co/NVUhkbsT)

By default, the indicator uses 10 periods for the calculation. This parameter can be adjusted to meet your technical analysis needs.

## Scanning for Standard Deviation <a href="#suggested_scans" id="suggested_scans"></a>

StockCharts members can search for stocks based on Standard Deviation values. Below are some example scans that can be used for Standard Deviation-based signals. Simply copy the scan text and paste it into the Scan Criteria box in the [Advanced Scan Workbench](https://stockcharts.com/def/servlet/ScanUI).

Members can also set up alerts to notify them when a Standard Deviation-based signal is triggered for a stock. Alerts use the same syntax as scans, so the sample scans below can be used as a starting point for setting up alerts as well. Simply copy the scan text and paste it into the Alert Criteria box in the [Technical Alert Workbench](https://stockcharts.com/h-al/al).

### Weeding Out High Volatility <a href="#weeding_out_high_volatility" id="weeding_out_high_volatility"></a>

The Standard Deviation indicator is often used in scans to weed out securities with extremely high volatility. This simple scan searches for S\&P 600 stocks that are in an uptrend. The final scan clause excludes high-volatility stocks from the results. Note that the standard deviation is converted to a percentage of sorts so that the standard deviation of different stocks can be compared on the same scale.

```
[group is SP600]
AND [Daily EMA(50,close) > Daily EMA(200,close)]

AND [Std Deviation(250) / SMA(20,Close) * 100 < 20]
```

{% hint style="info" %}
**Learn More.** For more details on the syntax to use for Standard Deviation scans, please see our [Scan Syntax Reference](https://help.stockcharts.com/scanning-and-alerts/scan-writing-resource-center/scan-syntax-reference/scan-syntax-technical-indicators#standard_deviation_std_deviation) in the Support Center.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-indicators/standard-deviation-volatility.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
