Arrival-Price Execution
Install and import#
npm install fintech-algorithmsimport { arrivalPriceExecution } from "fintech-algorithms/execution-and-transaction-cost-analysis/cost-risk-optimization/arrival-price-execution";Signature#
arrivalPriceExecution(input)Benchmarks against the price at the moment the decision was made, which front-loads execution. The most demanding common benchmark, because every second of delay is measured against it.
Parameters#
| Name | Type | Notes |
|---|---|---|
input | ArrivalPriceInput | Arrival price, quantity, horizon, and the aggression parameter controlling how quickly the order is worked. |
Returns#
{ schedule, front_loading, expected_slippage_bps, … }
The schedule with its front-loading and expected slippage against arrival.
Errors#
- When aggression falls outside its permitted range — throws
Complexity: time O(steps),
space O(steps).
Worked example#
executed 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#
{
"remaining_quantity": 8000,
"side": "buy",
"arrival_price_atoms": 1000000,
"current_price_atoms": 1000500,
"tolerance_bps": 8,
"observed_market_volume": 50000,
"base_participation_bps": 1000,
"defensive_participation_bps": 300,
"max_participation_bps": 2000,
"intervals_remaining": 10,
"deadline_threshold_intervals": 2,
"max_child_quantity": 1500,
"lot_size": 100
}Call#
arrivalPriceExecution(input)Returns#
object with 12 fields: side, arrival_price_atoms, current_price_atoms, signed_move_bps, tolerance_bps, price_state, chosen_participation_bps, observed_market_volume, …
{
"side": "buy",
"arrival_price_atoms": 1000000,
"current_price_atoms": 1000500,
"signed_move_bps": 5,
"tolerance_bps": 8,
"price_state": "inside-band",
"chosen_participation_bps": 1000,
"observed_market_volume": 50000,
"target_from_volume_quantity": 5000,
"child_quantity": 1500,
"remaining_quantity": 6500,
"state": "inside-band"
}Other exports#
This module also exports
almgrenChrissOptimalExecution, implementationShortfallExecution, liquiditySeekingExecution, opportunisticDarkPoolExecution, 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.
Diagrams#
Calculation flow#
Arrival-Price Execution calculation flow
flowchart LR
S1["Validate benchmark side rates deadline volume parent c"]
S2["Compute the signed move from arrival price"]
S3["Apply deadline favorable adverse then insideband prece"]
S4["Floor the volume target to lots and cap by parent and "]
S1 --> S2
S2 --> S3
S3 --> S4
S4 --> D{"signed move exactly plus or minus the tolerance"}
D --> O["child_quantity + diagnostics"]
O --> A["Audit: Child is lotaligned and cannot exceed the parent or max ch"]
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- The Implementation Shortfall: Paper versus Reality — Andre F. Perold
- Staff Report on Algorithmic Trading in U.S. Capital Markets — Staff of the U.S. Securities and Exchange Commission
- FIX Algorithmic Trading Definition Language Online Specification — FIX Trading Community
- Evidence boundary