These three metrics in their historical form are extremely popular indicators and financial ratios often asked about. While we do have them as the latest snapshot in our Fundamentals API feed (MarketCapitalization and PERatio under Highlights section, PriceBookMRQ under Valuation), we don’t keep a history of these.

Using the data for the sample ticker AAPL (with the demo key that is provided in our financial documentation) and the date December 30th, 2020 we’ll show how it’s done.

Historical Market Capitalization

This one is very easy to calculate. One needs to take the amount of shares outstanding from the outstandingShares section and multiply it by the historical price of the corresponding period taken from the EOD API feed.

Market Capitalization = Outstanding Shares × Price

So the market capitalization of Apple, Inc. for December 30th, 2020 will be:

The result. 17,114,000,000 × 133.5205 = 2,285,069,837,000.00

This works for any date.

Historical Price-to-Earnings Ratio (PE Ratio) 

This ratio is quite easy to calculate as well. One needs to divide the historical price of the stock by the corresponding historical EPS (epsActual taken from the Earnings section of the Fundamentals).

P/E ratio = Market Price per Share ​Earnings per Share

The result. P/E ratio for Apple, Inc. for December 30th: 133.5205 / 1.68 = 79.4765

Historical Price-to-Book Ratio (PB Ratio) 

For this ratio, one has to calculate the book value first. Its formula is quite simple though: 

Book Value = Total Assets – Total Liabilities

With that knowledge, we can calculate the P/B ratio for Apple, Inc., say,  for a specific day: December 30th, 2020. From the balance sheet for Q4, sample ticker fundamentals data, we need to get the total assets and total liabilities figures:

  • totalAssets: 354,054,000,000.00
  • totalLiab: 287,830,000,000.00

The book value of Apple, Inc. for 2020 Q4 will be: 354054000000.00 – 287830000000.00 =  66,224,000,000.00

Then we get to the formula for the ratio itself:

P/B ratio = Market Price per Share ​Book Value per Share

Before going to the EOD API for the price, we need to know the figure to use in the denominator. 

Quarterly outstanding shares for 2020 Q4. shares: 17114000000,

Book value per share = 66,224,000,000.00 / 17,114,000,000.00 = 3.8696

And finally, EOD price for 2020-12-30: adjusted_close: 133.5205,

P/B ratio for Apple, Inc. for Dec 30th, 2020: 133.5205 / 3.8696 = 34.5050

That’s it. The process can be repeated for any given date.

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.