Przejdź do treści
Biblioteka skilli
Finanse i księgowość · Analiza

queue-position-modeling

/queue-position-modeling

Szacuje pozycję w kolejce i prawdopodobieństwo wypełnienia zleceń pasywnych z danych MBO lub L2, porównując modele i kalibrując je.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
11.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
3
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Szacuje pozycję w kolejce i prawdopodobieństwo wypełnienia zleceń pasywnych z danych MBO lub L2, porównując modele i kalibrując je.

Oryginalny opis (EN)

Estimate passive-order queue position and fill probability from MBO or aggregated L2 data; compare conservative and probabilistic queue models and calibrate them against observed executions. Use for maker-fill simulation, quote placement, and queue-value research.

Jak działa

  1. Workflow
  2. Diagnostics
  3. Guardrails
  4. Deliverable
  5. Further reading
Sekcje z nagłówków SKILL.md, w oryginale · 44 linii, 507 słów
Podgląd SKILL.md
---
name: queue-position-modeling
description: Estimate passive-order queue position and fill probability from MBO or aggregated L2 data; compare conservative and probabilistic queue models and calibrate them against observed executions. Use for maker-fill simulation, quote placement, and queue-value research.
---
# Queue Position and Passive Fill Modeling

Treat queue position as a latent state unless the feed and venue protocol expose sufficient order-level information. The objective is a calibrated fill distribution, not a single overconfident point estimate.

## Workflow

1. **Establish matching priority.** Confirm FIFO/price-time, pro-rata, size-time, or hybrid rules, plus special priority classes, hidden/reserve liquidity, self-trade prevention, and order modification priority.
2. **Classify available data.** MBO with stable order IDs may support direct queue reconstruction. MBP/L2 reports aggregate size and requires an inference model. State exactly which facts are observable.
3. **Initialize queue ahead.** Align the order's venue acknowledgement time with book events. Estimate displayed quantity ahead at the price when the order becomes live, accounting for exchange-to-feed and order-entry timing. Do not initialize from the local decision timestamp alone.
4. **Process events.** Trades at the price consume queue ahead according to aggressor and matching rules. Additions behind do not move the order backward under FIFO. Cancellations/reductions in L2 are ambiguous: model the fraction ahead versus behind rather than assuming every decrement advances the order.
5. **Compare model families.** At minimum, test:
   - **Risk-averse bound:** cancellations do not improve the simulated queue; only executions advance it.
   - **Probabilistic model:** allocate ambiguous depth reductions ahead/behind using a monotone function of estimated ahead and behind volume. Test several shapes rather than picking one because it produces more fills.
   - **MBO reconstruction:** exact order-level transitions only when the data and venue priority semantics justify it.
6. **Add timing uncertainty.** Simulate feed latency, order-entry latency, acknowledgement latency, and cancel latency. Include the possibility that the market moves before the order is acknowledged or cancelled.
7. **Calibrate on held-out fills.** Compare predicted fill probability, time-to-fill, partial-fill size, and queue-ahead evolution with actual order outcomes. Segment by depth, order size, spread, volatility, and time of day.
8. **Report bounds and uncertainty.** Run conservative/base/aggressive assumptions and show the strategy's P&L and fill rate range. A backtest that only works under optimistic queue assumptions is not robust.

## Diagnostics

- Fill probability calibration curve and Brier/log loss where appropriate.
- Time-to-first-fill and time-to-complete-fill distributions.
- Predicted versus realized partial-fill ratios.
- Fill rates by estimated queue-ahead bucket and order size/depth ratio.
- Sensitivity to unknown cancels, feed batching, and latency distributions.

## Guardrails

- Never treat L2 queue position as ground truth.
- Do not use fills to calibrate and evaluate on the same sample without a temporal holdout.
- A cancel is not automatically a cancellation ahead of your order.
- A full fill is not evidence the model is correct on unfilled orders; account for censoring.
- Do not claim realistic maker backtesting if queue position and latency are absent.

## Deliverable

State the matching rule, observability level, initialization timing, queue model equations/parameters, calibration split, fit diagnostics, scenario bounds, and the degree to which the result is identified by the data.

## Further reading

- Rigtorp, *Estimating Order Queue Position*: https://rigtorp.se/2013/06/08/estimating-order-queue-position/
- HftBacktest queue models: https://hftbacktest.readthedocs.io/en/latest/order_fill.html
- Moallemi & Yuan, *A model for queue position valuation in a limit order book*: https://business.columbia.edu/faculty/research/model-queue-position-valuation-limit-order-book

Wersje

W bazie nie ma innych skilli o nazwie queue-position-modeling.

Migawka bazy z 13.11.2026 · wersja paczki 01938be7d2ed (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100queue-position-modeling-for-passive-orders
    Szacuje, ile wolumenu stoi przed pasywnym zleceniem w kolejce cenowej i jaką ma wartość przy kolejnych realizacjach.
  • 100order-book-reconstruction
    Projektuje, wdraża lub audytuje parser i odtwarzacz księgi zleceń giełdy z danych ITCH lub MBO/L2: sekwencje, migawki i inwarianty.
  • 100mbo-create-scenario
    Zamienia pytanie o podział budżetu mediowego w skonfigurowany scenariusz MBO, a także zmienia nazwę, edytuje lub usuwa istniejące scenariusze.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.