fintech-algorithms

Arrival-Price Execution

Install and import

bash
npm install fintech-algorithms
ts
import { 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

NameTypeNotes
inputArrivalPriceInputArrival 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

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

Arrival-Price Execution — system map

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.

Read the article →

References