Is a Stock Overvalued or Undervalued?
Introduction
This application calculates the fair value of a stock, given the current market prices and several growth assumptions.
Simply pick an industry, stock exchange, and then a company.
Maple then downloads the current market share price, EPS (for the trailing 12 months) and dividends (for the trailing12 months) from Yahoo Finance (hence a connection to the web is needed). Given a series of growth assumptions, afair value is then calculated. The valuation process is described at the bottom of this application, and is mostappropriate for stable companies with a history of dividend payments.
The stock is undervalued If the fair value is greater than the current market price, and vice-versa.
This application comes with an Excel spreadsheet with a list of over 25000 companies across multiple industries andinternational exchanges, and their corresponding ticker symbols. This spreadsheet is used to populate the interface
with industries, exchanges and companies, and must be saved in the same location as the Maple worksheet.

Valuation ProcessThis application uses a method of calculating the fair value of a stock that is most appropriate for stable companies
with a long history of dividend payments. Other methods should be used to value companies undergoing significant
distruptive challenges or structural changes.
Let's run through a worked example - are shares of Exxon Mobil worth buying at the present time?

Growth Assumptions
We'll need to make some financially conservative estimates about Exxon Mobil's future growth prospects
Expected EPS growth rate

> EPSGrowthRate d 0.05 :Desired annual rate of return> DesiredReturn d 0.05 :Holding period in years> HoldingPeriod d 3 :Download Financial Data
We'll first download the following financial quotes from Yahoo Finance> ticker := "XOM" :Diluted EPS for the trailing 12 months (the diluted value takes into account outstanding options that would
reduce the share price)> str d cat "http://download.finance.yahoo.com/d/quotes?s=", ticker, "&f=e" :> EPSttm := ImportMatrix str 1, 1
EPSttm := 7.94900000000000
Dividend per share for the trailing 12 months> str := cat "http://download.finance.yahoo.com/d/quotes?s=", ticker, "&f=d" :> DividendPerSharettm := ImportMatrix str 1, 1
DividendPerSharettm := 2.70000000000000
Most recently traded share price> str := cat "http://download.finance.yahoo.com/d/quotes?s=", ticker, "&f=l1" :> PriceCurrent := ImportMatrix str 1, 1
PriceCurrent := 91.8300000000000

Forward PE

The forward PE over the holding period is assumed to be the current price divided by the earnings per share overthe trailing twelve months;> PEForward :=PriceCurrent
EPSttmPEForward := 11.5523965278651

EPS Growth Over the Holding Period
The EPS over each year of the holding period> EPSProjected := seq EPSttm 1 CEPSGrowthRate i, i = 1 ..HoldingPeriod
EPSProjected := 8.18747000000000, 8.43309410000000, 8.68608692300000
Hence the total earnings per share over the holding period> totalEPS := add i, i = EPSProjected
totalEPS := 25.3066510230000

Present Fair Value
Expeced share price at the end of the holding period> ExpectedSharePrice := EPSProjectedHoldingPeriod PEForward
ExpectedSharePrice := 100.345120410000
The dividend payout ratio is the current dividend per share divided by the EPS in the final year. We’re using theEPS in the final year in order to be conservative and calculate a lower dividend payout ratio.
DividendPerSharettm> DividendPayoutRatio := EPSProjected

HoldingPeriod

DividendPayoutRatio := 0.310841927318346
Hence the total dividends per share paid out over the holding period> TotalDividends := totalEPS DividendPayoutRatio
TotalDividends := 7.86636817796211
Expected share value at the end of the holding period> ExpecedShareValue := ExpectedSharePrice CTotalDividends
ExpecedShareValue := 108.211488587962
Given the desired return, the present price for fair value> PresentSharePriceGoodValue :=ExpectedSharePrice
1 CDesiredReturn HoldingPeriod

PresentSharePriceGoodValue := 86.6818878393262

Should I Invest?
> piecewise PresentSharePriceGoodValue !PriceCurrent, "Overvalued. Do not invest.","Undervalued. Buy buy buy!""Overvalued. Do not invest."
Legal Notice: © Maplesoft, a division of Waterloo Maple Inc. 2015. Maplesoft and Maple are trademarks of Waterloo
Maple Inc. Neither Maplesoft nor the authors are responsible for any errors contained within and are not liable for any
damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only.
Contact the authors for permission if you wish to use this application in for-profit activities.