fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Price-to-Book Valuation

Install and import#

bash
npm install fintech-algorithms
ts
import { priceToBookValuation } from "fintech-algorithms/fundamental-analysis-and-valuation/relative-valuation/price-to-book-valuation";

Signature#

priceToBookValuation(rawInputs)

Divides each peer's price by its book value per share, takes the median of those price-to-book multiples, and multiplies it by the target's book value per share to get an implied price.

Parameters#

NameTypeNotes
rawInputsunknownDeclared unknown and narrowed at runtime. It must be a plain object with a target object and a peers array. target supplies a positive book_value_per_share and an optional current_price. peers holds at least three objects, each with a nonempty and unique string id, a positive price and a positive book_value_per_share.

Returns#

Record<string, unknown>

model, peer_count, peer_multiples (per peer: id, price, book_value_per_share, price_to_book), multiple_summary with minimum, median, maximum and range, selected_multiple which is that median, target_book_value_per_share, implied_price, premium_discount_to_current (implied price divided by target.current_price minus one, or null when no current price was given) and state, always valuation-complete.

Errors#

  • When rawInputs, target or a peer row is not a plain object, or a numeric field is not a finite number — throws TypeError
  • When peers is not an array of at least three rows, or a peer id is missing, blank or duplicated — throws RangeError
  • When target.book_value_per_share, a peer price, a peer book_value_per_share or target.current_price is not greater than zero — throws RangeError

Complexity: time O(n log n), space O(n).

Worked example#

verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.

Input#

rawInputs
{
  "target": {
    "book_value_per_share": 24,
    "current_price": 40
  },
  "peers": [
    {
      "id": "B1",
      "price": 24,
      "book_value_per_share": 20
    },
    {
      "id": "B2",
      "price": 30,
      "book_value_per_share": 20
    },
    {
      "id": "B3",
      "price": 36,
      "book_value_per_share": 20
    }
  ]
}

Call#

priceToBookValuation(rawInputs)

Returns#

object with 9 fields: model, peer_count, peer_multiples, multiple_summary, selected_multiple, target_book_value_per_share, implied_price, premium_discount_to_current, …

{
  "model": "median-positive-book-value-peer-pb",
  "peer_count": 5,
  "peer_multiples": [
    {
      "id": "B1",
      "price": 24,
      "book_value_per_share": 20,
      "price_to_book": 1.2
    },
    {
      "id": "B2",
      "price": 30,
      "book_value_per_share": 20,
      "price_to_book": 1.5
    },
    {
      "id": "B3",
      "price": 36,
      "book_value_per_share": 20,
      "price_to_book": 1.8
    }
  ],
  "multiple_summary": {
    "minimum": 1.2,
    "median": 1.8,
    "maximum": 2.4,
    "range": 1.2
  },
  "selected_multiple": 1.8,
  "target_book_value_per_share": 24,
  "implied_price": 43.2,
  "premium_discount_to_current": 0.08000000000000007,
  "state": "valuation-complete"
}

Other exports#

This module also exports calculate, pEComparableValuation, evEbitdaComparableValuation, pegRatio, peerMultipleRegression. Every module additionally exports run as an alias of its primary function, and a meta object carrying its catalog id, domain, family, shape and article URL.

Diagrams#

Price-to-Book Valuation — article hero
Price-to-Book Valuation — decision boundaries
Price-to-Book Valuation — method selection
Price-to-Book Valuation — system map

How it works#

This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.

Read the article →

References#

The rest of the Relative Valuation family#