# Price-to-Book Valuation

`D18-F03-A03` · Fundamental Analysis and Valuation → Relative Valuation · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/relative-valuation/price-to-book-valuation/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## 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

```ts
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

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `rawInputs` | `unknown` | yes | Declared `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

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

### Input

`rawInputs`:

```json
{
  "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

```ts
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, …

```json
{
  "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

`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.

## Verification and provenance

Tier: **verified** (via input-expected).

The worked example below is the figure published in this algorithm's article, replayed and asserted by the test suite on every build. The arithmetic cannot drift without the build failing.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.13.0.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/fundamental-analysis-and-valuation/relative-valuation/price-to-book-valuation/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/fundamental-analysis-and-valuation/relative-valuation/price-to-book-valuation/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/llms.txt
