# `DeltaCalc.Concentration`
[🔗](https://github.com/ZenHive/delta_calc/blob/v0.3.0/lib/delta_calc/concentration.ex#L1)

Concentration-risk primitives for portfolio asset weights.

HHI is returned on the normalized 0-1 scale: equal weights move toward 0 and
a single-asset portfolio returns 1.

## API Functions
| Function | Arity | Description | Param Kinds |
| --- | --- | --- | --- |
| `hhi` | 1 | Calculate Herfindahl-Hirschman Index over asset weights. | `weights: value` |

# `weight_input`

```elixir
@type weight_input() :: %{optional(term()) =&gt; Decimal.t()} | [Decimal.t()]
```

# `hhi`

```elixir
@spec hhi(weight_input()) :: Decimal.t()
```

Return the normalized HHI: `sum((weight / total_weight)^2)`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
