Market Making with Excel
The AEX Excel Add-in provides a spreadsheet-native interface for market makers who want to manage two-sided quotes using Excel formulas and curves. This page covers the Excel-specific tools: the ORDERTRACK formula, formula-driven quote management, and position tracking.
For AEM-based market making tools (Curve Manager, Compliance Dashboard), see the relevant AEM documentation.
Prerequisites
- Add-in installed and authenticated (see Installation and Authentication)
- Enable Order Tracks toggled on in the ribbon before any
ORDERTRACKformulas will submit orders
ORDERTRACK formula
=AEX.ORDERTRACK(contractCode, side, volume, price, liveFlag) is the core formula for spreadsheet-driven order management. Each formula instance:
- Submits a single order to the market
- Tracks the order's state through its lifecycle
- Returns the server-assigned order ID in the cell
Parameters
| Parameter | Type | Description |
|---|---|---|
contractCode | Text | 7-character contract code (e.g. OON3CH6) |
side | Text | "buy" or "sell" |
volume | Number | Order quantity in MW |
price | Number | Order price in $/MWh |
liveFlag | Boolean | TRUE = working order; FALSE = held (has ID, not matching) |
Cell output
| Display | Meaning |
|---|---|
PENDING... | Order submitted, waiting for server confirmation |
xl-xxxxxxxx-... | Order is live — cell shows the server order ID |
xl-xxxxxxxx-... [FILLED] | Order has been fully filled |
xl-xxxxxxxx-... [CANCELLED] | Order has been cancelled |
DISABLED | Order Tracks are globally disabled (use ribbon toggle) |
ERR: ... | Submission or validation error |
Live vs held orders
Setting liveFlag to FALSE submits the order in a held state. The server assigns an order ID, but the order does not participate in matching until you flip liveFlag to TRUE. This lets you pre-stage your entire curve — pricing everything before any quote goes live.
=AEX.ORDERTRACK("OON3CH6", "buy", 10, B2, $A$1)
When cell $A$1 is FALSE, the order is staged. Change it to TRUE and the whole curve goes live simultaneously.
Submitting an ORDERTRACK formula sends a real order to the market. Ensure prices and volumes are correct before setting liveFlag to TRUE. Use the ribbon's Enable Order Tracks toggle to prevent accidental submission when opening a workbook.
Building a quote curve in Excel
A typical market-making layout uses one row per contract, with buy and sell quotes side by side:
| Contract | Bid Price | Ask Price | Volume | Live? | Bid Order | Ask Order |
|---|---|---|---|---|---|---|
| OON3CH6 | =MidPrice-Spread/2 | =MidPrice+Spread/2 | 10 | FALSE | =AEX.ORDERTRACK(A2,"buy",D2,B2,E2) | =AEX.ORDERTRACK(A2,"sell",D2,C2,E2) |
Price cells can reference any formula — moving average, imported data, or manual entry. When prices change, ORDERTRACK automatically sends an amendment to the server (debounced to avoid excessive updates).
Amendments are debounced at 300 ms. Rapid cell recalculations are batched — only the final value within the debounce window is sent. This prevents the amendment storm monitor from triggering during normal formula recalculation.
Managing orders with ribbon commands
The ribbon provides three commands for order management:
| Button | Action |
|---|---|
| Enable Order Tracks | Activates ORDERTRACK formulas — orders will be submitted |
| Cancel All | Sends a cancel-all event — cancels every open order for your entity |
| Refresh Connection | Forces a WebSocket reconnect |
Enable Order Tracks is off by default when a workbook opens, preventing accidental order submission on load.
Position tracking with Excel formulas
The add-in provides formula functions for reading your live position data:
=AEX.POSITION(contractCode, property)— streaming position reader for a single contract=AEX.POSITIONS()— spill array of all positions across contracts
Common property values for AEX.POSITION:
| Property | Returns |
|---|---|
"net" | Net position in MW (positive = net long) |
"long" | Cumulative MW bought |
"short" | Cumulative MW sold |
"pnl" | Realised P&L from offsetting trades |
"avgOpenPrice" | VWAP of the open net position |
These update in real time as fills arrive, making them suitable for formula-driven hedging triggers.
Reading order state with AEX.ORDER
=AEX.ORDER(orderId, property) reads a live property from any order, using the order ID returned by ORDERTRACK:
=AEX.ORDER(G2, "state") → "working", "filled", "cancelled"
=AEX.ORDER(G2, "fillQty") → filled quantity in MW
=AEX.ORDER(G2, "price") → current working price
This lets you build conditional logic — for example, triggering a hedge order when a quote is filled.
AEM tools for market making
The following market making tools live in AEM (the browser platform), not in Excel:
- Curve Manager — graphical multi-product curve editor with bulk price adjustments, spread controls, and Submit All / Cancel All actions
- Compliance Dashboard — tracks your quoting obligations: quote presence, spread compliance, and volume targets
See the AEM documentation for details on these panes.
Next steps
- Installation — sideload the add-in into Excel
- Authentication — sign in and connect to the market