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

Relative Valuation

5 algorithms in Fundamental Analysis and Valuation · 5 with asserted arithmetic.

In this family#

  1. P/E Comparable Valuation verified

    Values a target company off its peer group by dividing each peer's price by its earnings per share, taking the median of those P/E ratios, and multiplying that median by the target's own earnings per share.

    pEComparableValuation(rawInputs)
  2. EV/EBITDA Comparable Valuation verified

    Takes the median of the peer group's enterprise-value-to-EBITDA multiples, applies it to the target's EBITDA, then walks the resulting enterprise value down to an equity value and a per-share price through a net-debt bridge.

    evEbitdaComparableValuation(rawInputs)
  3. Price-to-Book Valuation verified

    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.

    priceToBookValuation(rawInputs)
  4. PEG Ratio verified

    Divides forward P/E by expected EPS growth measured in percentage points for the target and for every peer, compares the target's PEG against the peer median, and re-prices the target at that median PEG when a forward EPS is supplied.

    pegRatio(rawInputs)
  5. Peer-Multiple Regression verified

    Fits an ordinary least squares regression of each peer's log multiple on an intercept, expected growth, return on equity and net debt to EBITDA, then exponentiates the target's fitted value into an implied multiple and applies it to the target's valuation metric.

    peerMultipleRegression(rawInputs)

What they share#

Every topic here is a record-transform, so once you have called one the rest follow the same shape. Import paths differ only in the final segment:

ts
import { pEComparableValuation } from "fintech-algorithms/fundamental-analysis-and-valuation/relative-valuation/p-e-comparable-valuation";
import { evEbitdaComparableValuation } from "fintech-algorithms/fundamental-analysis-and-valuation/relative-valuation/ev-ebitda-comparable-valuation";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Fundamental Analysis and Valuation collects 52 algorithms across 6 families. For the concept behind this family rather than the call signatures, see the concept guides.