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

Arms Index (TRIN)

Install and import#

bash
npm install fintech-algorithms
ts
import { calculate } from "fintech-algorithms/market-breadth-and-internals/thrust-and-pressure/arms-index-trin";

Signature#

calculate(row)

TRIN: the advance/decline issue ratio divided by the advance/decline volume ratio. Above 1 means declining issues are absorbing proportionally more volume than their numbers suggest — the arithmetic is a comparison of two ratios, and inverting either flips the reading.

Parameters#

NameTypeNotes
rowRowOne session's advances, declines, unchanged and directional volume. Rows carry a ready flag; a row that is not ready is excluded rather than treated as zero, because a missing count and a count of zero mean opposite things about market breadth.

Returns#

{ status, value, issue_ratio, volume_ratio }

TRIN with both component ratios exposed, which is what makes an unexpected value diagnosable.

Errors#

  • When either denominator is zero — reported as a status rather than thrown

Complexity: time O(1), space O(1).

Worked example#

executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

Input#

row
{
  "session_date": "2026-02-05",
  "advances": 600,
  "declines": 400,
  "unchanged": 20,
  "advancing_volume": 120000000,
  "declining_volume": 60000000,
  "ready": true
}

Call#

calculate(row)

Returns#

object with 4 fields: status, value, issue_ratio, volume_ratio

{
  "status": "resolved",
  "value": 0.75,
  "issue_ratio": 1.5,
  "volume_ratio": 2
}

Diagrams#

Arms Index (TRIN) — decision boundary
Arms Index (TRIN) — family map

Calculation flow#

Calculation Flow — Arms Index (TRIN)
flowchart LR
    A["Four positive synchronized legs"] --> B["Issue ratio A/D"]
    A --> C["Volume ratio V+/V−"]
    B --> D["TRIN = issue ratio / volume ratio"]
    C --> D
    A -->|"Any leg ≤ 0"| X["Incomplete topology"]
    D --> E["Publish TRIN plus both ratios"]

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#

  • Claim-to-source map
  • Arms Index (TRIN) — Fidelity
  • Arms Index (TRIN) — StockCharts ChartSchool
  • ArmsIndex Function — TradeStation
  • Historical-example decision

The rest of the Thrust and Pressure family#