Skip to content

About

Swiss-Editorial FIFO Limit Order Book Simulator, Zero-Lookahead Walk-Forward Backtester & Tail-Risk Terminal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

QuantPress Broadsheet

Swiss-Editorial Limit Order Book Matching Engine, Causal Walk-Forward Statistical Arbitrage Backtester & Tail-Risk Terminal built with FastAPI, NumPy/SciPy, and HTML5 Canvas.

Terminal Preview

QuantPress Swiss Editorial Broadsheet Terminal

Architecture & Core Capabilities

  1. Price-Time FIFO Limit Order Book (src/quantpress/orderbook.py)

    • Deterministic deque-per-price-level matching engine supporting resting LIMIT and sweeping MARKET orders (BUY / SELL).
    • Computes real-time Best Bid/Ask, Mid Price, Spread (bps), Depth Imbalance, and Volume-Weighted Microprice.
  2. Strictly Causal Walk-Forward Backtester (src/quantpress/backtester.py)

    • Enforces zero look-ahead bias: z-score rolling windows use strictly prior bars (px[t-lookback : t]), signals computed at bar t apply to returns earned from t -> t+1 (lag_pos), and round-trip maker/taker fees + half-spread slippage are deducted upon position changes.
    • Evaluates three distinct stochastic regimes (mean_revert, volatile_chop, macro_trend) across partitioned 60% In-Sample / 40% Out-of-Sample splits.
  3. Institutional Tail-Risk Engine (src/quantpress/risk.py)

    • Computes Annualized Return, Volatility, Sharpe Ratio, Sortino Ratio (downside semi-deviation), Calmar Ratio, Maximum Drawdown, Empirical 95% VaR, and 95% Conditional VaR (Expected Shortfall).

API Endpoints (src/quantpress/app.py)

Method Endpoint Purpose
GET /api/book/snapshot Returns L2 bid/ask ladders, spread bps, microprice, imbalance, and recent fills
POST /api/book/order Submits LIMIT or MARKET order to the FIFO matching engine
POST /api/book/reset Resets L2 order book to realistic seeded depth
POST /api/backtest/run Executes causal walk-forward strategy evaluation across regimes

Quick Start & Verification

pip install -e .
quantpress serve --host 127.0.0.1 --port 11470 --open

Run JS + Python test suite:

make test

About

Swiss-Editorial FIFO Limit Order Book Simulator, Zero-Lookahead Walk-Forward Backtester & Tail-Risk Terminal

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages