# Inverse-Volatility Weighting

`D14-F02-A01` · Portfolio Construction → Risk Allocation · archetype `record-transform` · difficulty 3/5 · verification **contract**

Full page: https://docs.thefintechbuilder.com/portfolio-construction/risk-allocation/inverse-volatility-weighting/
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 { inverseVolatilityWeights } from "fintech-algorithms/portfolio-construction/risk-allocation/inverse-volatility-weighting";
```

## Signature

```ts
inverseVolatilityWeights(assetIds, standaloneVolatilities)
```

Assigns capital in inverse proportion to each asset standalone volatility and normalizes the scores, with a covariance diagnostic showing what the rule leaves out.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `assetIds` | `ordered `string[N]`` | yes | `N >= 1`, non-empty, unique; order is preserved |
| `standaloneVolatilities` | `ordered finite numeric `N`-vector` | yes | strictly positive; same declared horizon/unit |

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

`assetIds`:

```json
["A", "B", "C"]
```

`standaloneVolatilities`:

```json
[0.1, 0.2, 0.15]
```

### Call

```ts
inverseVolatilityWeights(assetIds, standaloneVolatilities)
```

### Returns

object with 6 fields: assetIds, weights, normalizedInverseVolatilityScores, sumWeights, method, status

```json
{
  "assetIds": ["A", "B", "C"],
  "weights": [0.46153846153846145, 0.23076923076923073, 0.3076923076923077],
  "normalizedInverseVolatilityScores": [1, 0.5, 0.6666666666666667],
  "sumWeights": 0.9999999999999999,
  "method": "inverse-volatility",
  "status": "ok"
}
```

## Verification and provenance

Tier: **contract**.

The module loads, the entry point is callable and its declared signature matches the compiled code. The example below is real captured output, but no independently published figure asserts the numbers.

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.2.
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/portfolio-construction/risk-allocation/inverse-volatility-weighting/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/portfolio-construction/risk-allocation/inverse-volatility-weighting/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/portfolio-construction/llms.txt
