# Arms Index (TRIN)

`D04-F04-A02` · Market Breadth and Internals → Thrust and Pressure · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/market-breadth-and-internals/thrust-and-pressure/arms-index-trin/
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 { calculate } from "fintech-algorithms/market-breadth-and-internals/thrust-and-pressure/arms-index-trin";
```

## Signature

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

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `row` | `Row` | yes | One 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

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

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

### Call

```ts
calculate(row)
```

### Returns

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

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

## Verification and provenance

Tier: **verified** (via row-fixture).

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.1.
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/market-breadth-and-internals/thrust-and-pressure/arms-index-trin/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/market-breadth-and-internals/thrust-and-pressure/arms-index-trin/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/market-breadth-and-internals/llms.txt
