mktlab is a private trading laboratory. We design, build and operate proprietary algorithmic systems across futures, crypto and equities. This site documents the work; nothing here is for sale.
The same event-driven core runs every mode. A strategy that survives replay runs the identical code path in production; nothing is reinterpreted on the way to the market.
Every tick, order and fill is an event on one bus. State is derived, never assumed.
No order reaches a market without clearing the risk layer first. The gate cannot be bypassed.
Same code, same hash, both sides. If replay and live disagree, that is a bug, not a market condition.
Sessions are reconstructed event by event from recorded data; only validated systems proceed to live.
Two of the surfaces the systems read and write: order book depth and account equity. All figures on this page are simulated for display.
A strategy is treated as a hypothesis until tested. Four procedures determine whether it trades or gets archived.
Recorded market data is replayed event by event through the same engine that trades live. Determinism makes every run reproducible: same inputs, same state, same orders.
Parameters are fit on one segment of history and judged on the next, rolling across regimes. In-sample performance is treated as noise until it survives out-of-sample.
Trade sequences are resampled to map the distribution of outcomes, not a single equity curve. Sizing decisions are derived from the tails, not the average.
Position size follows a capped fraction of the Kelly optimum under drawdown constraints. The cap is structural; no signal overrides it.
Performance is scored out-of-sample on Sharpe, Sortino, profit factor, drawdown depth and duration. The Sharpe ratio is deflated for the number of trials: an inflated backtest is treated as what it is.
Capital runs across strategies with low pairwise correlation; futures, crypto and equity legs are balanced so no single system dominates portfolio variance. Weights follow risk budgets with hard drawdown caps.
Single strategies fail; portfolios of weakly correlated strategies persist. Allocation across strategy classes and instruments is a design decision, made before the first line of strategy code.
The theory is Markowitz applied to strategies instead of assets: portfolio variance is dominated by covariance, so a marginal strategy is valued for its correlation profile more than for its standalone Sharpe. A mediocre system that is genuinely orthogonal to the book beats a brilliant clone of what already runs.
Correlations are measured on stress windows rather than calm averages, because correlations converge exactly when diversification is needed most. Instruments diversify the plumbing as well as the returns: futures, crypto and equities differ in venue risk, session hours and microstructure, so a failure in one leg does not propagate to the others.
mktlab is not a platform and does not operate one. The engines are open source or commercial, Nautilus Trader and the NinjaTrader ecosystem; the strategies, risk logic and tooling on top are proprietary.
Excerpts from the internal engineering log. Full entries stay internal.
Four engineering tracks, one pipeline: ideas become code, code gets tested against market history until it breaks or proves itself, survivors go live.
Systematic strategies for index futures, digital assets and equities: momentum and breakout, mean reversion, market making, statistical arbitrage. Signal research, position logic and risk envelope designed as one unit, validated in market replay before any live order.
Custom NinjaScript add-ons, control dashboards, strategy managers and market-replay tooling built on and around the NinjaTrader platform. Internal tooling, engineered to production standard.
Direct pipelines to Tradovate, Binance and OKX. VPS-deployed, supervised by an alert-driven monitoring layer with hard kill conditions.
Backtesting engines, parallel market-replay farms and performance analytics. The machinery that determines which strategies reach deployment.
Every system moves through the same seven states. No stage is skipped, in either direction.
Written down as a falsifiable hypothesis before any code exists. If it cannot fail a test, it does not enter the pipeline.
Minimal implementation in the research stack. Code quality is secondary at this stage; ambiguity in the rule set is not accepted.
Event-sourced validation across recorded regimes: trend, chop, shock. Deterministic, reproducible, archived.
Rolling out-of-sample verification. In-sample results are treated as noise until they survive here.
Live market data, simulated capital. Parity checks between replay expectations and observed behavior.
Deployed unchanged behind the risk gate, with kill conditions armed and telemetry on every decision.
A system that drifts outside its replay envelope is pulled and archived with the data that retired it. The archive stays queryable.
Every strategy passes the same gate sequence before it touches a live market. The checklist is code; a red item blocks the deploy.
Retirement follows the same discipline in reverse. A live system that drifts outside its replay envelope is pulled, archived, and sent back to research. Drift is treated as a defect, never as a reason to wait.
Three asset classes, one architecture. The engines are open source or commercial; the assembly, the risk logic and the tooling are ours.
| event core | Nautilus Trader · Rust core, Python API. Open source engine; we build on it, we don't own it. |
| futures execution | NinjaTrader ecosystem · Tradovate API. Custom NinjaScript add-ons and control dashboards, engineered internally. |
| crypto execution | Binance · OKX, through Nautilus adapters. |
| replay / validation | Parallel market-replay farm. Deterministic sessions; same code path as live. |
| trade journal | PostgreSQL. Every order, fill and decision archived and queryable. |
| telemetry | Alert-driven monitoring with hard kill conditions; notifications to operators in real time. |
Strategy code is versioned like any serious software: reviewed, tested in replay, deployed unchanged, monitored, and retired when the market moves on. No manual overrides in live sessions.
Orders of magnitude, not marketing numbers. The budget exists so that every component knows what it is allowed to cost.
| market data ingest → event bus | sub-millisecond, in-process |
| signal evaluation | single-digit milliseconds per event |
| risk checks | < 1 ms · evaluated before every order, no exceptions |
| venue round-trip | network-bound, tens of milliseconds · VPS placed close to the venue |
| kill switch → flat | engine-level, immediate · no human in the loop |
Recorded market data outlives any single strategy.
Every tick consumed and every order produced is journaled to PostgreSQL, raw and immutable. Sessions can be reconstructed on demand, years later, exactly as they happened, because replay does not read from summaries: it reads from the same event log the live engine wrote.
The archive is also the research corpus. New strategy candidates are validated against the full history of recorded regimes, and rejected candidates are stored next to the data that rejected them. Nothing is deleted: re-testing an idea that already failed costs more than storing the evidence of its failure.
mktlab operates as an engineering group, not a trading desk. Independent and self-funded. Decisions follow tested evidence.
The lab runs on a simple protocol: hypotheses are written down before they are tested; tests are reproducible or they don't count; results are archived whether they flatter us or not.
We don't manage outside capital, sell signals, or publish performance. The systems trade our own money, which keeps the incentives exactly where they should be: on being right, not on looking right.
Short write-ups on how the lab thinks. Longer versions live in the internal wiki. Tap to expand.
A vectorized backtest aggregates history into bars and applies logic after the fact. It answers "would this rule have correlated with returns", which is not the question. The question is "would this system have traded", and the difference is everything that happens between signal and fill: queue position, partial fills, latency, rejected orders, a risk gate that says no.
Replay reconstructs the session event by event. The strategy consumes the same stream it would consume live, through the same engine, and fills are simulated against the recorded book rather than assumed at the close of a bar. Costs, slippage and microstructure stop being parameters and become consequences.
The output is not an equity curve; it is a trade journal, every decision with its full context, reproducible on demand. When a replay run and a live session disagree, that is a bug with a stack trace, not a market mystery.
Search enough parameter combinations and something will look brilliant by construction. Multiple testing guarantees it: the expected maximum Sharpe of N random trials grows with N even when every trial is pure noise. White formalized the problem in 2000; the industry has been rediscovering it ever since.
Our response is bookkeeping. Every research line carries an explicit trial count, and candidate strategies are scored on the deflated Sharpe ratio of Bailey and Lopez de Prado, which corrects for the number of trials and for non-normal returns. A strategy must clear the deflated bar, not the raw one. Most don't; that is the point.
The archive does the rest. Rejected candidates are stored with the evidence that rejected them, so the same idea cannot be re-discovered a year later and re-tested as if for the first time. Selection bias depends on forgotten trials; the archive keeps every one of them visible.
The Kelly fraction maximizes long-run growth, and at full size it produces drawdowns that no operator, and no prop account, will survive. Growth-optimal is not risk-acceptable. The gap between the two is where sizing actually lives.
We resample trade sequences, ten thousand paths or more, to map the drawdown distribution of each strategy rather than trust a single realized curve. Size is then set as a capped fraction of Kelly such that the probability of breaching the drawdown limit stays below tolerance on the resampled paths, not on the lucky one that happened.
At the portfolio level the same discipline applies across strategies: risk budgets weighted toward low pairwise correlation, measured on stress windows rather than calm averages, because pairwise correlations rise sharply in stress regimes, precisely where diversification must hold. No single system is allowed to dominate portfolio variance.
The methodology stands on published work. Non-exhaustive.
Email only.