Point-in-time by construction

A trading environment where agents cannot see the future

QFinZero puts market data, news and a paper broker behind one API. Bind an agent to a simulation session and every tool it calls answers as of that bar, enforced by the server rather than by the prompt.

54
MCP tools
4
US sessions, incl. overnight
1
port for UI, REST and MCP
sess_3f2a9c1e · 1m · 2026-02-19 09:35 ET
REGULAR

upq_chain_snapshot("ANET")

→ 1,596 contracts · bid/ask/mid · IV

esp_search_news("ANET")

→ only stories published before 09:35

pmb_buy_option(… MARKET)

→ filled at the ask 0.44

upq_stock_minute(… end=16:00)

→ returns bars through 09:34

Everything an agent needs to trade, in one place

Six parts that share one clock, one storage format and one set of credentials.

Market data

UPQ

Minute and daily bars for US stocks and OPRA options, minute NBBO quotes, intraday option-chain snapshots with Greeks priced off the mid, rates and corporate actions.

News and events

ESP

News, earnings calendars and macro releases in one event schema, replayable at any past moment so results appear only after they were published.

Paper broker

PMB

Step-driven sessions with market, limit and stop orders, trading hours, DAY and GTD expiry, partial fills, options that fill against the book, and checkpoints to branch experiments.

Agent interface

MCP

54 tools over the Model Context Protocol, plus REST under one port. step_until lets an agent sleep until a fill, a price or the next open instead of polling every minute.

Intraday research

Research

A small, safe factor language compiled to columnar SQL: IC, rank IC, quantile spreads, turnover and cost-aware backtests on hundreds of names in seconds.

Data pipeline

qfz-data

Adapters for massive, Tushare and Databento (DBN or parquet, any layout) convert vendor files into one storage format. New vendors need an adapter, not engine changes.

Look-ahead is closed at the server

  • A minute bar is visible only after it closes; a daily bar after 16:00 ET; the end-of-day option chain after 16:15 ET.
  • Connect with X-QFZ-Session and every data tool is capped at that session's current bar. The agent cannot widen it.
  • Sessions follow US trading dates: overnight trading from 20:00 ET belongs to the next day, as brokers book it.

One trading day, four segments

Overnight

Blue Ocean · limit only

20:00–04:00 ET

Pre-market

extended hours · limit only

04:00–09:30 ET

Regular

stocks and options

09:30–16:00 ET

After-hours

extended hours · limit only

16:00–20:00 ET

Orders carry REGULAR, EXTENDED or OVERNIGHT trading hours. Options trade in the regular session only and fill against the NBBO when quotes are loaded.

Mine intraday factors without writing a backtester

Factors are one expression. Windows only look backwards and reset each day; trades enter at the next bar's open; costs include the quoted half-spread.

shell
qfz-research eval "cs_rank(-pct(close, 15)) * cs_rank(ts_mean(volume, 30))" \
  --start 2026-08-10 --end 2026-08-21 --universe 500 --horizons 5,15,30

IC · rank IC

per horizon, with t-stats

Quantiles

forward return by bucket

Turnover

of the top quantile

Backtest

Sharpe, drawdown, costs

Run it

Start with the bundled synthetic dataset, then point the pipeline at your vendor files. Give each agent an API key from your account page.

shell
docker compose up -d                # hub, services and a sample dataset
# or from source:
pip install -e ".[server,pipeline]"
qfz-sample generate --out ./qfz-sample
QFZ_DATA_ROOT=./qfz-sample qfz-server   # UI, REST and MCP on :19777
mcp.json
{
  "mcpServers": {
    "qfinzero": {
      "url": "https://your-host/mcp/",
      "headers": {
        "Authorization": "Bearer qfz_…",
        "X-QFZ-Session": "sess_3f2a9c1e"
      }
    }
  }
}