If you’ve spent any period of time participating in the stock market, you’ve no doubt noticed that stock prices can fluctuate wildly. This is part of what makes it exciting — dramatic upward price changes can make you a fortune in a few minutes. But it also makes it unnerving — a price collapse can wipe out years of returns in just as short a time.

The fluctuations of a given stock, index, or a financial instrument like an option, or another type of derivative, are known as volatility, and it’s an important concept to understand if you intend to do any investing.

In this piece, we’ll start by defining volatility. Then, we’ll discuss several different methods of how to calculate volatility. This should arm you with an important piece of the puzzle required to understand the financial markets.

**What Is ****Volatility****?**

There are a number of ways of thinking about volatility. In simple terms, you might call it uncertainty about the market price fluctuations or valuation of a given security. Higher volatility means being less sure about where a stock is going in the future, while lower volatility means being more sure about the stock’s direction for the future.

This isn’t a bad place to begin, but it’s possible to be more precise. In mathematical terms, volatility is a metric that captures the statistical measure of the dispersion of returns.

Note the use of the word “returns” in this definition. Though it’s not uncommon to calculate the price volatility for something like option price movements, volatility is often focused on returns. We’ll adopt this practice from here on because we usually care more about returns than price, but the math is the same either way.

Volatility can be calculated over a different number of trading days, depending on the time frames you’re interested in examining. Daily returns can be used to calculate daily volatility, annualized returns can be used to calculate annualized volatility, and so on.

What these calculations all have in common, however, is that you’re looking to quantify the frequency and magnitude of shifts in returns over a given set of data points.

**Why Is Understanding How to Calculate ****Volatility**** Important?**

There are several reasons why understanding volatility is important. Perhaps the biggest is that volatility is a huge factor in shaping investment decisions. When contemplating how you want to deploy funds as part of an investment strategy, you have to think carefully about your risk tolerance and your future plans.

Though risk and volatility aren’t the same thing, they’re closely related. Generally speaking, high-volatility investments are riskier than low-volatility investments. This reflects the general fact that risk and reward go together in finance, or to put it in poetic terms: The road to riches is usually paved with many successful rolls of the dice.

You’d probably want to put your life savings in extremely low-volatility, low-risk investments, like government bonds. In this scenario, the chances of both a huge upside and a catastrophic downside are minimal — you’re unlikely to become a prince or a pauper playing it safe in this way.

In an alternate scenario, if you have a fund set aside for taking big chances on startups productizing emerging technologies like quantum computing, for example, it’s fine to pursue a high-volatility, high-risk plan. This offers the chance of earning a bunch of money very quickly, but you could also lose every dime if the startup goes bankrupt.

Another reason why understanding market volatility is important is that it’s one of the main tools you have for forecasting. Like other market phenomena, volatility tends to exhibit certain important regularities. One of these is the fact that volatility tends to “cluster” on successive days.

It’s always possible, of course, to have random spikes in volatility in otherwise torpid price charts. But it’s more likely that you’ll see several days in a row of high volatility, owing perhaps to a major news story about the Federal Reserve, a war, or a similarly disruptive event.

Another important regularity is what’s known as “autoregression” or “regression to the mean.” Like returns, price, etc., volatility will tend to move back toward its long-term mean after a while.

While it’s never possible to calculate future returns with total certainty, if you understand how to calculate the volatility of an asset, and if you understand clustering and autoregression, you can make better-informed decisions.

**How to Calculate the ****Volatility of a Security**

Hopefully, you now see the importance of understanding volatility measures, but that still leaves the question of how to actually calculate them.

Before we get to that, we’ll make some broad comments about getting the data you need to calculate volatility over a given period of time.

You can get quality data sets from sources like your broker or the Tiingo API. From these, it’s possible to calculate volatility on returns or prices for individual stocks, a market index, or any other financial instrument.

There are also sources that offer time series data where volatility has already been calculated, such as these feeds from the St. Louis Fed.

Assuming you’re curious about learning about how these calculations work, read on!

**Calculating ****Volatility**** With the ****Standard Deviation**

Arguably the simplest volatility calculation is the one that’s done with the standard deviation. Here are the basic steps:

- First, calculate the average price for the financial asset over the period of time you’re interested in.
- Next, figure out how much the asset’s price deviates from this amount by subtracting the mean from each of the data points in your dataset. If you’re calculating daily volatility for Apple, for example, you’d subtract the average daily price of AAPL from its daily closing price.
- After you’ve got this difference, square it so that the positive and negative deviations don’t cancel each other out.
- Then, you take the average of these squared deviations. This is a quantity known as the variance.
- Finally, you take the square root of the number (you might see the square root abbreviated as “sqrt” in other articles). In our example, taking the square root of the variance gives you the daily standard deviation, but it could also be the weekly, monthly, or annual standard deviation if you’re looking at data for those time frames.

This standard deviation gives you an estimate of the volatility an asset has experienced. When it’s done on historical data in the way just described, it’s known as historical volatility.

**Calculating ****Realized Volatility**

Standard deviation is an easy quick approximation, but most practitioners use what’s called “Realized Volatility.” It’s a modification of the standard deviation formula. In fact, Tiingo uses this formula internally and for several realized volatility products, including the recently launched realized volatility crypto feeds that are used to help power the new Chainlink Realized Volatility products.

Here is the formula:

This formula removes the subtraction of the mean from the standard deviation formula. It also annualizes the volatility, which is standard practice when quoting volatility.

You can take the annualized volatility and then convert back to any time period by simply dividing by the square root of the number of time periods in one year. For example, you could figure out the monthly volatility from the annualized volatility by dividing by the square root of 12.

This method is the standard formula used in variance swaps and institutional trading firms. While standard deviation tends to be a good approximation, this method is considered a standard when discussing realized (historical) volatility.

**Calculating ****Implied Volatility**

Another way of calculating volatility is using the Black-Scholes-Merton (BSM) option pricing model to estimate the implied volatility. If historical volatility is backward-looking, implied volatility is forward-looking — it’s a *forecast* of *expected* volatility in the *future*, from the time the option has been purchased until its expiration. That’s why it’s called “implied” volatility.

The fair price of a call option or a put option can be calculated with the BSM model. This requires us to know the spot and strike prices of the underlying asset, as well as its volatility, the risk-free rate, the time to maturity, and a few other parameters.

The way to calculate implied volatility with the BSM formula is to plug in all the other parameters (strike price, time to maturity, etc.) and solve for volatility.

**Calculating ****Volatility**** With ****Excel**

When it comes to how to calculate volatility, one of the tools of the financier’s trade is Excel. As you might imagine, there are many ways of using it to calculate volatility.

If you’re interested in historical volatility, you’ll need historical data points for the security or option you’re analyzing. You can use the Excel function STDEV.S to calculate it directly, or if you want to work through the steps to cultivate a deeper understanding of the math, you can also use Excel’s AVERAGE, SUM, squaring, and SQRT functions to do it manually and to calculate realized volatility.

Naturally, it’s also relatively easy to calculate implied volatility using Excel. You’ll need to find the relevant values for the asset to fill in the BSM model’s parameters, and then you’ll use Excel’s “Goal Seek” to perform the actual calculation.

**What Is the ****VIX****?**

Sometimes called the “fear index,” the volatility index (VIX) of the Chicago Board Options Exchange is a prominent way of capturing the expected volatility of the broader stock market by looking at how much traders expect the S&P 500 to move over the next 30 days.

This is assessed by looking at the going premium on options. If you think of options as being a kind of insurance against downside risk, this makes intuitive sense; the more people are paying for options, the more uncertain they perceive the market to be.

**Making Decisions Based on ****Volatility**

Volatility receives a lot of attention because it’s so crucial to making good decisions with respect to financial investments. Just as you’d need to understand how tempestuous the ocean is expected to be before you take a boat out, you need to know how to calculate volatility. Then you’ll have an estimate of past and future volatility, which will help you to understand the risks you’re taking with a particular asset.

If you’d like to access high-quality data to perform your own volatility calculations, sign up for access to the Tiingo API. We work hard to ensure that our financial data is cleaned and preprocessed to the highest standards — this way you can focus on doing analyses and building your models.

## Leave a Reply