How to Calculate the Historical Variance of Stock Returns | The Motley Fool (2024)

A stock's historical variance measures the difference between the stock's returns for different periods and its average return. A stock with a lower variance typically generates returns that are closer to its average. A stock with a higher variance can generate returns that are much higher or lower than expected, which increases uncertainty and increases the risk of losing money.

Let's go over how to calculate the historical variance of stock returns as we work through an example step by step.

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (1)

Image source: Getty Images.

Step 1

Step 1: Select the period and measurement period over which you wish to calculate the variance

There are two things you need to determine before you start the calculation:

  • What is your time unit: daily, monthly, or annual returns?
  • You're calculating historical variance. What is your "history" -- i.e., what is the time period for which you want to calculate the variance: 30 days, six months, 30 years, and so on?

The choice of time unit and your measurement period will depend on your goal in calculating the variance in the first place.

Discussing these choices is well beyond the scope of this article, so for the purpose of the following example, we'll start with our data set as a given. We'll calculate the historical monthly variance of the over a five-year period from August 2010 through July 2015 -- that's 60 observations (5 years x 12 months).

Here's the formula for variance:

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (2)

Wow, that looks really complicated. Let's start with a translation in English: The variance of historical returns is equal to the sum of squared deviations of returns from the average (R) divided by the number of observations (n) minus 1. (The large Greek letter sigma is the mathematical notation for a sum.)

That still sounds very complicated, which is why we're going to work through an example, and because no one in this day and age would calculate a variance by hand, we'll use Microsoft Excel.

The following screenshot of our Excel spreadsheet shows our starting data set. Column B, from Rows 3 through 62, contains our monthly return series for the S&P 500 Total Return Index for the period from August 2010 through July 2015:

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (3)

Step 2

Step 2: Calculate the average return

The first thing we need to do is calculate the average return over the period. Mathematically, the formula for the average return is as follows:

Average return = (1 / n) x (sum of all the returns in the observation period)

Here, n is the total number of observations.

We calculate the average using Excel's "Average" function. The result, 1.32%, is in cell C65. (The exact Excel formula we use is displayed in the cell immediately to the right.)

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (4)

Step 3

Step 3: Calculate the difference between each of the individual returns and the average return

This step occurs in column C:

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (5)

For example, for August 2010 (row 3), the difference between the monthly return is -4.51% - 1.32% = -5.83%, which is the figure found in Cell C3. (The Excel formula we used to obtain that figure is shown immediately to the right.)

Step 4

Step 4: Calculate the square of the differences and add them all up

In column D, we square the differences we just obtained:

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (6)

For example, for August 2010 (row 3), the difference squared is equal to: -5.83% ^ 2 = 0.34%, which is the figure displayed in Cell D3. (The Excel formula we used to obtain that figure is shown immediately to the right.)

We then add up all the squared differences using Excel's "Sum" function. The result, 6.77%, is in C66.

Step 5

Step 5: Divide the sum of squared differences by n - 1

We're almost home!

Cell C67 below contains the number of observations (i.e., the number of months). Just below that, in Cell C68, we finally obtain the variance. The formula we use for the variance is displayed immediately to the right and shows that we divide the sum of squared differences (Cell C66) by the number of months (Cell C67) less 1.

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (7)

The variance is 0.1148% (Cell C68).

You can confirm with a calculator that:

variance = 6.77% / 59 = 0.1147%. (The difference is due to rounding errors.)

Is there an easier way to do this?
Yes, there is! Excel has a variance function, "VAR," which calculates the variance of a set of numbers directly, eliminating the need for all those intermediary steps, which are pretty tiresome. The result is in Cell C70 below:

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (8)

Note that the result matches the one we derived independently, which is comforting.

That's it! You now know how to calculate the historical variance of a return series.https://www.fool.com/the-ascent/buying-stocks/

Related investing topics

What Are Returns in Investing?Learn about the definition of returns in investing, the importance of returns, and how to calculate returns.
What to Invest in: Use Your Money to Make MoneyInvesting can be the most surefire path to becoming and remaining financially free. Here's how to get started the right way.
How Should I Invest During a Recession?When money is tight, where should your investment dollars go?

Why calculate it?

Last thought: Why would you want to calculate the historical variance of returns?

If you made it this far, it's a fair bet that you already have a reason for wanting to calculate a historical variance.

Suffice it to say that variance of returns is one of the two building blocks of the mean-variance framework, also known as "modern portfolio theory," that economist Harry Markowitz introduced in 1952, for which he was later awarded the Nobel Prize. Mean-variance analysis enables investors to construct a portfolio of assets that maximizes expected return for a given level of risk. In this framework, risk is defined by the variance of returns.

Want to find the right broker for you? Pop over to The Motley Fool's Broker Center and get started today.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at [emailprotected]. Thanks -- and Fool on!

The Motley Fool has a disclosure policy.

How to Calculate the Historical Variance of Stock Returns | The Motley Fool (2024)
Top Articles
Six Figure Salary: What It Gets You in 2024 - Inspired Budget
Make Money With Amazon FBA From Home
Hotels Near 625 Smith Avenue Nashville Tn 37203
Uti Hvacr
Cottonwood Vet Ottawa Ks
Professor Qwertyson
Ventura Craigs List
Lichtsignale | Spur H0 | Sortiment | Viessmann Modelltechnik GmbH
Waive Upgrade Fee
Geometry Escape Challenge A Answer Key
Tripadvisor Near Me
Obituary | Shawn Alexander | Russell Funeral Home, Inc.
Oscar Nominated Brings Winning Profile to the Kentucky Turf Cup
Reddit Wisconsin Badgers Leaked
Identogo Brunswick Ga
I Wanna Dance with Somebody : séances à Paris et en Île-de-France - L'Officiel des spectacles
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
8664751911
Vistatech Quadcopter Drone With Camera Reviews
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Sussyclassroom
Somewhere In Queens Showtimes Near The Maple Theater
LCS Saturday: Both Phillies and Astros one game from World Series
Sec Baseball Tournament Score
Craiglist.nj
Temu Seat Covers
Tactical Masters Price Guide
Stickley Furniture
Angel del Villar Net Worth | Wife
Swimgs Yuzzle Wuzzle Yups Wits Sadie Plant Tune 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Autumns Cow Dog Pig Tim Cook’s Birthday Buff Work It Out Wombats Pineview Playtime Chronicles Day Of The Dead The Alpha Baa Baa Twinkle
Calculator Souo
Upstate Ny Craigslist Pets
A Man Called Otto Showtimes Near Amc Muncie 12
Craigslist Summersville West Virginia
Elizaveta Viktorovna Bout
Tirage Rapid Georgia
Culvers Lyons Flavor Of The Day
Pp503063
What Does Code 898 Mean On Irs Transcript
Dinar Detectives Cracking the Code of the Iraqi Dinar Market
Trivago Anaheim California
Owa Hilton Email
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
The Sports Academy - 101 Glenwest Drive, Glen Carbon, Illinois 62034 - Guide
Crigslist Tucson
Benjamin Franklin - Printer, Junto, Experiments on Electricity
Maurices Thanks Crossword Clue
Zom 100 Mbti
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
Dcuo Wiki
Cognitive Function Test Potomac Falls
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6578

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.