# forge.ta.kama

```python
forge.ta.kama(source: ArrayLike, period: int = 10, fast_period: int = 2, slow_period: int = 30) -> np.ndarray
```

Kaufman adaptive average.

The smoothing constant is ``(er * (fast_sc - slow_sc) + slow_sc)^2`` with ``er`` the efficiency
ratio over ``period`` bars and ``sc = 2 / (n + 1)`` for the fast and slow periods. NaN for the
first ``period`` bars of each unbroken run.

Since Forge API 1.

## Class forge.ta.KAMA

```python
forge.ta.KAMA(**inputs: Any) -> None
```

Average that speeds up when the price trends and slows down when it chops.

sc = (ER * (fast_sc - slow_sc) + slow_sc)^2, with fast_sc = 2 / (fast_period + 1) and slow_sc = 2 / (slow_period + 1)

KAMA[i] = KAMA[i-1] + sc * (x[i] - KAMA[i-1]), seeded with x[period-1]

The first period values are left empty. After a gap the average starts again.

Since Forge API 1.
