# Aroon Up, Down, and Oscillator

> Measure Extreme Recency

`D07-F02-A03` · Technical Indicators → Trend Systems · archetype `series-transform` · difficulty 2/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/technical-indicators/trend-systems/aroon/
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 { aroon } from "fintech-algorithms/technical-indicators/trend-systems/aroon";
```

## Signature

```ts
aroon(high, low, period)
```

Measures how recently the highest high and lowest low occurred within the lookback, expressed as 0–100. Unlike most trend indicators it reads *elapsed time* rather than price distance.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `high` | `number[]` | yes | Per-bar high prices, chronological. |
| `low` | `number[]` | yes | Per-bar low prices, chronological. |
| `period` | `number` | yes | Lookback in bars for the extreme search. · min: 1, integer: true |

## Returns

`Record<string, (number | null)[]>` · length same-as-input

Parallel series: `aroon_up`, `aroon_down`, and the `oscillator` difference between them.

## Warm-up

The first `period` positions are `null`. A full lookback is required before an extreme can be located.

## Errors

- When period < 1 or is not an integer — throws RangeError
- When the input series are not all the same length — throws RangeError

## Complexity

Time `O(n × period)`, space `O(n)`.

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

`high`:

```json
[101.415, 102.06264, 102.772785, 103.494002, 104.181554, 104.803509]
```

Showing 6 of 180 elements.

`low`:

```json
[99.3245, 99.468834, 99.976055, 100.625352, 101.389232, 102.216086]
```

Showing 6 of 180 elements.

`period`:

```json
25
```

### Call

```ts
aroon(high, low, period)
```

### Returns

object with 3 fields: aroon_up, aroon_down, oscillator

```json
{
  "aroon_up": [null, null, null, null, null, null],
  "aroon_down": [null, null, null, null, null, null],
  "oscillator": [null, null, null, null, null, null]
}
```

## Verification and provenance

Tier: **verified** (via scenario-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/technical-indicators/trend-systems/aroon/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/technical-indicators/trend-systems/aroon/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/technical-indicators/llms.txt
