# Percentage-of-Volume Execution

`D13-F01-A04` · Execution and Transaction Cost Analysis → Schedule-Based Execution · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/execution-and-transaction-cost-analysis/schedule-based-execution/percentage-of-volume-execution/
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 { percentageOfVolumeExecution } from "fintech-algorithms/execution-and-transaction-cost-analysis/schedule-based-execution/percentage-of-volume-execution";
```

## Signature

```ts
percentageOfVolumeExecution(total_quantity, participation_rate_bps, market_volume_buckets, lot_size, max_child_quantity)
```

Trades a fixed share of whatever volume occurs. The schedule is unknown in advance by design, which limits impact — and means the order may not complete at all if volume never arrives.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `total_quantity` | `number` | yes | Total quantity. · min: 1, integer: true |
| `participation_rate_bps` | `number` | yes | Target participation in basis points of market volume. · min: 0 |
| `market_volume_buckets` | `number[]` | yes | Observed or forecast market volume per bucket. |
| `lot_size` | `number` | yes | Lot size. · min: 1, integer: true |
| `max_child_quantity` | `number` | yes | Cap on any single child order, which stops a volume spike producing an outsized print. · min: 1, integer: true |

## Returns

`{ schedule, projected_completion, unfilled_quantity, … }`

The schedule with projected completion and any quantity the volume path cannot absorb.

## Errors

- When the participation rate is not positive — throws

## Complexity

Time `O(buckets)`, space `O(buckets)`.

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

`total_quantity`:

```json
10000
```

`participation_rate_bps`:

```json
1000
```

`market_volume_buckets`:

```json
[5200, 4600, 4100, 3800, 3500, 3300]
```

Showing 6 of 24 elements.

`lot_size`:

```json
100
```

`max_child_quantity`:

```json
700
```

### Call

```ts
percentageOfVolumeExecution(total_quantity, participation_rate_bps, market_volume_buckets, lot_size, max_child_quantity)
```

### Returns

object with 10 fields: total_quantity, participation_rate_bps, lot_size, max_child_quantity, observed_market_volume, released_quantity, remaining_quantity, achieved_participation_bps, …

```json
{
  "total_quantity": 10000,
  "participation_rate_bps": 1000,
  "lot_size": 100,
  "max_child_quantity": 700,
  "observed_market_volume": 120900,
  "released_quantity": 10000,
  "remaining_quantity": 0,
  "achieved_participation_bps": 827.129859,
  "schedule": [
    {
      "bucket": 1,
      "market_volume": 5200,
      "cumulative_market_volume": 5200,
      "target_cumulative_quantity": 500,
      "child_quantity": 500,
      "released_cumulative_quantity": 500,
      "remaining_quantity": 9500,
      "achieved_participation_bps": 961.538462
    },
    {
      "bucket": 2,
      "market_volume": 4600,
      "cumulative_market_volume": 9800,
      "target_cumulative_quantity": 900,
      "child_quantity": 400,
      "released_cumulative_quantity": 900,
      "remaining_quantity": 9100,
      "achieved_participation_bps": 918.367347
    },
    {
      "bucket": 3,
      "market_volume": 4100,
      "cumulative_market_volume": 13900,
      "target_cumulative_quantity": 1300,
      "child_quantity": 400,
      "released_cumulative_quantity": 1300,
      "remaining_quantity": 8700,
      "achieved_participation_bps": 935.251799
    }
  ],
  "state": "parent-complete"
}
```

## Other exports

`twapExecution`, `historicalVwapExecution`, `adaptiveVwapExecution`, `calculate`. Every module additionally exports `run` as an alias of its primary
function, and a `meta` object carrying its catalog id, domain, family, shape and article URL.

## Verification and provenance

Tier: **verified** (via D).

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/execution-and-transaction-cost-analysis/schedule-based-execution/percentage-of-volume-execution/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/execution-and-transaction-cost-analysis/schedule-based-execution/percentage-of-volume-execution/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/execution-and-transaction-cost-analysis/llms.txt
