• Skip to main content
  • Skip to footer

Fervent | Finance Courses, Investing Courses

Rigorous Courses, Backed by Research, Taught with Simplicity.

  • Home
  • Courses
  • Resource Hub
  • Articles
  • All Access Pass
How to Measure Risk of a Stock (Full Walkthrough & Intuition)

How to Measure Risk of a Stock (Full Walkthrough & Intuition)

May 13, 2020 By Vash Leave a Comment

In this article we’re going to explore how to measure risk of a stock, from scratch.

TL;DR

If you just want to know how to measure risk of a stock, or how to calculate total risk of a stock, it’s just this formula here:

    \[\sigma_j = \sqrt{\frac{1}{n-1}\sum_{t=1}^n(r_j - E[r_j])^2} \equiv \sqrt{\sigma^2_j}\]

The risk of a stock is measured by its standard deviation (\sigma_j).

Now, if you’d like to know why this is the way risk is measured, and if you want to better understand this formula for the risk of as stock, then keep reading.

If the formula above is freaking you out, relax. Once you’re done reading this article, you’ll know each part of this equation inside out.

Table of Contents hide
1 What is Risk?
2 The 2 Types of Risk
2.1 Firm specific risk (aka Unsystematic Risk)
2.2 Market risk (aka Systematic Risk)
3 How to Measure Risk of a Stock
3.1 Intuition behind risk measurement
3.1.1 Volatility as Risk
3.2 Deviations and Zero
3.3 Squared Deviations
3.3.1 Always Positive
3.3.2 Penalising deviations
3.4 Variance of a Stock
3.4.1 Unbiased Estimator
3.5 Variance & its unit
3.6 Standard Deviation

What is Risk?

Recall when we looked at the relationships between Price, Risk & Return we said that risk itself can have many meanings and measures.

We talked about an academic paper by Ricciardi back in 2008 in which there were over 188 different types of risk in the traditional as well as the behavioural finance literature.

Now of course, not all of those measures are generally accepted. But it’s important for you to know that, as with returns and expect returns, there’s not necessarily a one size fits all, perfect measure of risk.

Having said that, what we can say, is that the general consensus is that risk is about the likelihood or value of you losing your money.

It’s either about how much money you’re going to lose, or the likelihood of you losing money (or the level of risk associated in the context of losing your money).

The 2 Types of Risk

If we now explore risk in more detail, generally speaking, all stocks are impacted by two different types of risk:

  • Firm specific risk, and
  • Market risk

As a side note, this holds across other asset classes, too – especially market risk.

It’s just that certain asset classes don’t have “firms” or companies behind them.

Houses, for example, are affected by market risk, but not firm risk. Although they are affected by their own”house risks” (e.g., house burning down, being burgled, etc.)

In this article of course, we’re only really interested in stocks, so let’s continue to think about the 2 types of risk in the context of stocks.

Firm specific risk (aka Unsystematic Risk)

Firm specific risk is risk that relates explicitly to a given firm. Hence the name! But of course, us folks in Finance love jargon. So there are a whole host of other terms used to describe firm specific risk, incuding:

  • unsystematic risk
  • idiosyncratic risk
  • diversifiable risk

RELATED: What is Unsystematic Risk

In the context of Facebook for example, idiosyncratic risk might be things like the risk of Mark Zuckerberg dying or leaving, because the firm is so tied down to him.

For a company like Tesla, unsystematic risk might include the kind of cars that they’re manufacturing, or whether they have access to materials for their batteries.

And similarly for Netflix, it might be things like whether the servers are working and in good order. And what the risk of a hack or a security breach is, for example.

Generally speaking, if we think about companies across the entire stock market – they can become insolvent, or go bankrupt. They can face leadership issues, or make poor decisions. And indeed, they can be involved with scandals (accounting misstatements, accounting fraud, etc)

Market risk (aka Systematic Risk)

Market risk on the other hand, are things that impact all firms regardless of which industry they’re in, what their operations look like, or anything else.

On a macro level, markets can face:

  • Inflation,
  • Deflation,
  • Recession,
  • Depression,
  • Political turmoil,
  • Natural calamities,
  • Terrorist attacks,
  • Changes in interest rates

There’s a whole host of things that can happen. And this is just a small list of all the possible reasons as to why your investments are risky.

Similar to the case with diversifiable risk, we have a whole host of terms to describe systematic risk measure, including:

  • non diversifiable risk
  • non idiosyncratic risk
  • systemic risk
  • beta value

RELATED: What is Systematic Risk

To explore systematic risk in more detail, see this article and to learn how to measure the beta coefficient / beta value for stocks.

How to Measure Risk of a Stock

What we can hopefully agree on is that all firms inevitably end up being impacted or influenced by these two types of risk.

The risk that’s explicit or specific to their firm, and the risk that they just have to bear as part and parcel of being in an economy.

If we agree on this, then we can say that the total risk of any firm or any stock is simply the market risk plus the firm specific risk.

And conditional on us agreeing with this notion, we can then start thinking about how we actually estimate this total risk.

Importantly, there will always be arguments for and against any measure / estimate.

But the good news is that there is a generally accepted measure of total risk of stocks.

And that is the stock’s volatility (aka its standard deviation).


Related: Investment Analysis and Portfolio Management Course

This Article features a concept that is covered extensively in our course on Investment Analysis & Portfolio Management (with Excel®).

If you’re interested in learning how to quantify risk for stocks and portfolios, working with real world data, then you should definitely check out the course.


Intuition behind risk measurement

If you’ve taken any kind of statistics or econometrics course, then you know exactly what I mean when I say “standard deviation”.

If you haven’t taken the statistics course, then not to worry. Because we’re going to go over how the standard deviation works and what it’s all about and why it’s a reasonably good measure of the risk of a stock.

In a nutshell, the standard deviation is trying to capture how far the reality is from that which you expect.

Specifically, its comparing the expected return (i.e., the amount of money you expect to make expressed in percentage terms) to the realised return (i.e., the amount of money you actually make, expressed in percentage terms).

One way to measure the expected stock return is to compute its historic average (or mean).

And if you plotted the returns and expected return (average return) of Facebook, it’ll look something like this:

Slide showing returns vs expected returns introducing how to measure risk of a stock

Importantly, you’ll see a pretty much identical chart, regardless of which stock you choose to work with, no matter where you are in the world and which stock market you’re looking at!

You can see how the returns of stocks are quite random, but the expected return — at least using the mean method — is this very simplistic line. That’s kind of “predicting” what the return should be.

RELATED: How to Calculate Stock Returns

If we agree that this is a okayish measure of expected returns, then we can say that the volatility is essentially a function of what we expect the returns to be versus what they actually are.

Volatility as Risk

In other words, we can say that volatility is approximately equal to risk. The greater the disparity between our r_j (the return of stock j) and its expected return E[r_j], the greater the volatility of the stock j.

And the greater the volatility of the stock, the greater the risk of the stock as well.

Put differently, we’re saying that the volatility (or the risk) of a stock j increases as the difference between r_j and E[r_j] increases.

Now going forward we’re going to describe r_j - E[r_j] as deviations. Because this value represents the deviation from the mean expectation.

That’s because we’re saying the stock earned r_j. And we expected it to earn E[r_j].

And so the difference between the two is the deviation from that which we expected.

If we visualise these deviations graphically, then here’s what they look like:

Slide showing deviations of returns to display how to measure risk of a stock

Each and every point has a deviation, because it’s not exactly equal to the expected return. So every single point that is NOT equal to the expected return is a deviation.

All of these are deviations because it’s a case where the realised return r_{FB} is different from our expected return E[r_{FB}].

Now if we were to add all of these deviations up for every single observation, we’ll get what we call the sum of deviations, naturally.

The problem, is that this value (the sum of deviations) will always be equal to zero.

Deviations and Zero

In other words, if you were to take all of the deviations that we had in the graph above… if we were to sum up all of these different deviations, you’ll find (unsurprisingly) that the sum of all the deviations is equal to zero.

This is unsurprising because all the positive deviations will cancel off the negative deviations.

What you have is a net effect of zero. And you’ll literally see this when we look at an example.

But for now, just remember that the sum of all deviations is zero. Mathematically…

\sum_{t=1}^n (r_j - E[r_j]) = 0

(r_{j1} - E[r_j]) + (r_{j2} - E[r_j]) + ... + (r_{jn} - E[r_j]) = 0

Evidently that means that the sum of deviations by itself is of little value to us.

Remember, we’re trying to estimate the risk of a stock. We’re trying to measure the volatility of a stock. And if all we can say is that the measure is always equal to zero, well that’s not very helpful, is it?

Want to go further?

Get the Investment Analysis & Portfolio Management (with Excel®) Study Pack (for FREE!).

Investment Analysis & Portfolio Management (with Excel®) Study Pack Feature

Squared Deviations

To overcome this issue of the zero sum, we can use what’s called the sum of squared deviations, which sounds more fancy than it actually is.

All we’re doing is squaring each of the deviations that we had before. And then summing them up (instead of just summing up the deviations). So the sum of square deviations s as D is this equation here:

    \[SSD = \sum_{t=1}^n (r_j - E[r_j])^2\]

You take the individual deviations and square them. Then, you sum up all the squared deviations.

If we were to open up this equation it would look like this:

    \[SSD = (r_{j1} - E[r_j])^2 + (r_{j2} - E[r_j])^2 + ... + (r_{jn} - E[r_j])^2\]

Why do we do this?

Well, recall that when we just looked at the sum of deviations, we were going to end up at a zero value by default.

By squaring the deviations, we get three core benefits:

Always Positive

Squared deviations ensure that the volatility is always expressed as a positive number. And this is intuitive. You want this.

Because how would you interpret negative risk?

I mean, zero risk means that it’s risk free. A positive risk means that it’s risky. But negative risk? I haven’t got a clue how to interpret negative risk!

Thus it makes sense to have a metric for risk that is greater than or equal to zero. So it’s a positive number.

Zero = Risk free

The second thing this allows us to achieve is that’s a value of zero can reasonably interpreted as risk free.

Penalising deviations

And last but certainly not the least it ensures that all the deviations are penalised appropriately because we’re squaring the deviations.

Thus, large deviations are interpreted as more risky, and small deviations can be interpreted easily as less risky.

That’s as far as the sum of squares deviations goes. But we’re not quite done yet, because remember I said that the measure of risk is the standard deviation.

In order to get to the standard deviation, we first need to get the stock’s variance.

Now the good news is, we’re pretty much already there.

Variance of a Stock

The variance of a stock is simply the sum of the square deviations divided by n-1.

So the variance of a stock var(r_j) \equiv \sigma^2_j is estimated as:

    \[var(r_j) = \frac{1}{n-1}\sum_{t=1}^n(r_j - E[r_j])^2 \equiv \sigma_j^2\]

All we’re doing is we’re taking the sum of square deviations and we’re multiplying it by \frac{1}{n - 1} or simply just dividing it by n - 1. And that’s going to give us the variance of the stock (aka Sigma squared, denoted \sigma^2).

Now, you might be wondering why we’re dividing by and n - 1. When we look at the estimating mean for instance, we divided by n. Where did this minus one come from?

We divided by n - 1 because the n - 1 is the unbiased estimate of the true variance.

Unbiased Estimator

If you’ve done a statistics course, then you’ll know exactly what I mean by this.

If you haven’t done a statistics course, here’s just a quick (really short) overview.

Long story short, when we’re dealing with any kind of data, there’s basically two worlds if you like.

There’s a population world and there’s what we call a sample world.

If you believe in what’s called the many worlds hypotheses, the population would include an infinite number of universes. So it’s way bigger than any kind of data that we’re looking at.

Samples on the other hand, is largely the data that we’re working with.

So when you downloaded stock data from Yahoo! Finance or Google sheets Google Finance, you’re working with sample data.

And we’re using the sample data to try and estimate the population measures.

By dividing the sum of squared deviations by n - 1 we’re getting closer to the population estimate; we’re getting closer to a better estimate for the “true” variance of a stock.

Variance & its unit

Just to wrap this variance of a stock that part again this is our equation for the variance of a stock and if we were to open this up quite similar to what we had before.

    \[var(r_j) = \frac{(r_{j1} - E[r_j])^2 + (r_{j2} - E[r_j])^2 + ... + (r_{jn} - E[r_j])^2}{n - 1}\]

We’re taking individual deviations we’re squaring them. And then we’re adding up all of the squared deviations. Then, to get to the variance of a stock, we just divide the sum of squared deviations by n - 1. This gives us the variance of a stock.

Crucially though, it’s not quite the standard deviation. So we still have a little more work to do to get to our measure of total risk.

The reason we need to get to the standard deviation — the reason we’re not simply happy with the variance — is because while the variance is a measure of volatility, its interpretation is quite very limited.

And it also tends to be a very small number.

We overcome the limitations of the variance by taking its square root, and this gives us the standard deviation.

Standard Deviation

What this also does, as a byproduct, is it ensures that the volatility is expressed in percentage terms.

If you think back to our equation for the variance, the returns r_j was a percentage. And the expected return E[r_j] is a percentage. But when you square it, it’s no longer a percentage!

And because it’s not percentages anymore, it’s not really comparable to returns.

When you take the square root of the variance, you essentially go back to the original metric — which is in percentage terms.

And because it’s now a percentage, it makes it considerably easier to compare directly with the returns. This allows us to compare risk with the return.

Ultimately then, our measure of risk — the standard deviation — of a stock is simply the square root of the variance of a stock:

    \[\sigma_j = \sqrt{\frac{1}{n-1}\sum_{t=1}^n(r_j - E[r_j])^2} \equiv \sqrt{\sigma^2_j}\]

We’re taking the individual returns and subtracting the expected return to get the deviations. Then, we square each deviation. Next, we sum up all of the squared deviations. And once we’ve got the sum of squared deviations (SSD), we multiply it by \frac{1}{n - 1} or we divide it by n - 1. Again, remember, this gives us the variance.

Finally, we take the square root of the variance to get the standard deviation.

And that’s pretty much it!

Now you know how to measure risk of a stock from scratch!

If you want to explore how to calculate portfolio risk, feel free to read our sister article, or check out and enroll on the course below to take your investment analysis skills to the next level.


Related Course: Investment Analysis & Portfolio Management (with Excel®)

Do you want to leverage the power of Excel® and learn how to rigorously analyse investments and manage portfolios?

Explore the Course

Filed Under: Finance, Investment Analysis

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Footer CTA

Do You Want To Crack The Code of Successful Investing?

Yes! Tell Me More

  • About Us
  • Write For Us
  • Contact Us

Copyright © 2025, Fervent · Privacy Policy · Terms and Conditions


Logos of institutions used are owned by those respective institutions. Neither Fervent nor the institutions endorse each other's products / services.

We ethically use cookies on our website to give you the best possible user experience. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT