Home MarketXLS
Dashboard MarketXLS
Screener MarketXLS
Options Profit Calculator MarketXLS
Stock Ranks MarketXLS
Spreadsheet Builder MarketXLS
Documentation MarketXLS
Logout MarketXLS

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

Written by  MarketXLS Team on 
Sat Jul 29 2017
 about Fundamental analysisStocksValuation Models
Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls) - MarketXLS

Meet The Ultimate Excel Solution for Investors

  • Live Streaming Prices Prices in your Excel
  • All historical (intraday) data in your Excel
  • Real time option greeks and analytics in your Excel
  • Leading data in Excel service for Investment Managers, RIAs, Asset Managers, Financial Analysts, and Individual Investors.
  • Easy to use with formulas and pre-made sheets
Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls) - MarketXLS

Let us find out if there is a fast and easy way to screen stocks that are underpriced by the market using margin of safety analysis of stocks.

Margin of safety analysis of stocks

Key Concepts

Before we get down to the analysis, let us understand the key concepts we will use to perform this margin of safety analysis.

  1. Book value per share: If you assume that a company liquidates as on today, then what will be the value of one share. That means if you are a shareholder of the company and you own one share how much money you will get if the company shuts down today. So as the name suggests, this is the value of your share as per the books of the company.
  2. Margin of safety: Let us assume that the book value per share of a company is $10, but the market price of one share is $20. The difference between the market price and the book value is the margin of safety. Remember that the market price of a share may not always represent the value of that share. So in this scenario, even though we know for a fact that the value of one share of this company is $10 but still the market price of one share of the company’s $20. So, we may conclude that the market price is higher than the value of that share. Which means that the stock is possibly overvalued by the market.

Screen undervalued stocks

What we want to do with our analysis is find out, if there are some stocks where book value is higher than the market price. And also look to establish a relationship between the book value and the market price by looking into the historical data of some stocks. This analysis will make us more confident when we actually make our decision to recommend or buy an undervalued stock with this approach.

Using MarketXLS Formulas

MarketXLS has inbuilt functions to get the historical book value per share and also to get the historical close prices of the stocks. Below is the syntax that we will use to get these values.

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

This function will get the book value per share of any symbol in the history.

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

This function will get the historical close price of any symbol in the history on a specific date.

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

And this function will get the last price of the stock. The last price in the current price at which this stock is trading.

Analyze one stock

So before we do this analysis for the whole of the S&P 500, let’s value one stock. As you can see below I have collected the book value and the price of Microsoft in 2016. Now you may wonder what price point we will take as a representative of the whole year of close prices. For this analysis, we have taken the close price at the last trading day of a year.

book value per share

So the value $9.08 the is the book value of Microsoft and the period ending 2016 and the price $62.14 is the close price on the last day of trading in 2016.

The difference between the market price and the book value per share is the margin of safety. The higher this difference the higher the market perceives its value to be. However, as we understood earlier markets may not represent the real value of the stocks at all the time.

So, what if the market price of the stock is exactly same as its book value? In that case, we may say that the stock price is fairly valued by the market.

Now let’s look at what is the situation today as on July 7, 2017. We can simply use the formula like shown below. Instead of looking at each number we can calculate the ratio of the book value to the last price. This ratio shows us, that book value is x percent of the stock price.

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

When this ratio is 100% it means that the stock is fairly priced by the market and the sentiments do not play a big role in the price. In other words, the price is based on facts and not the opinion of the traders and speculators. When this value is 0% it means, that in reality there is no value in this company but still the market is assigning a value to it.

Screen the whole market for margin of safety analysis of stocks

So now we will do this margin of safety analysis of stocks for the whole of S&P 500 and find out the ratio of the book value to the stock price. So, we calculate the ratio and then sort the table in descending order of the ratio.

margin of safety

After doing this analysis we find a few stocks in S&P 500 which seems to be undervalued by the market. This analysis definitely provides us with some good candidates for further exploration.

Validations with historical data of multiple stocks

In an ideal world, the more the book value the more should be the share price. And if the book value per share of the stock is growing over the years its price should also increase. That means the book value per share will normally have or should have a direct relationship with the price of the share.

I have charted below the relationship between the book value and the price of various stocks to validate this.

alt="Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)">AAPL-BV-Price.png” alt=”aapl margin of safety” width=”672″ height=”272″ /> Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls) alt="Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)">MSFT-BV-Price.png” alt=”” width=”669″ height=”276″ /> alt="Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)">XOM-BV-Price.png” alt=”” width=”677″ height=”275″ />

 

When looking at the book value and the price with the time perspective,  we can now some very interesting observations. For example, in the case of Blackberry, market initially started to be very optimistic about the company. But as the years passed the price settled near the Book Value.

Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)

In all these charts you would notice that the orange line is above the blue line. So, the price is mostly above the book value per share. But in the interesting case of GNW (Genworth Financial, Inc. (NYSE)) the book value is higher than the current trading price. So, we should look at this for our further analysis in our conquest of finding undervalued stocks.

alt="Margin Of Safety Analysis Of Stocks With Formula In Excel (With Marketxls)">GNW-BV-Price.png” alt=”” width=”674″ height=”276″ />

 

Perform margin of safety analysis of stocks with MarketXLS with more than 300 inbuilt stock market formulas.

[thrive_leads id=’5213′]

Ad slot not ready
Interested in building, analyzing and managing Portfolios in Excel?
Download our Free Portfolio Template
I agree to the MarketXLS Terms and Conditions
Call: 1-877-778-8358
Ankur Mohan MarketXLS
Welcome! I'm Ankur, the founder and CEO of MarketXLS. With more than ten years of experience, I have assisted over 2,500 customers in developing personalized investment research strategies and monitoring systems using Excel.

I invite you to book a demo with me or my team to save time, enhance your investment research, and streamline your workflows.
Implement “your own” investment strategies in Excel with thousands of MarketXLS functions and templates.

MarketXLS is a complete Excel stock solution

Kevin Hsu

StockKevin.com

I have used lots of stock and option information services. This is the only one which gives me what I need inside Excel

Lloyd Lenase

Option Day Trader

MarketXLS is a data junkie’s dream. It gives me the flexibility to mine for hidden treasures.

Dave

Swing trader since 2011

I like to access historical closing prices on a particular date. That makes tracking performance easy.

Patrick Cusatis, Ph.D., CFA

Associate Professor of Finance - Penn State University

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today

🎉 Exciting news! 🎉

You are invited to join our Discord Channel.

Interact, learn, and grow with experts in the markets!

Join our Discord