mdubya

mdubya

Algorithmic trader. Trading systems designer.

From zero programming to a stack of production trading and observability systems in about four months, by treating AI as the implementation layer and owning everything around it. They have run live ever since, through a full rewrite of the trading engine into Rust.

How I work

I build AI-first. The model writes most of the code; I own the parts that decide whether a system is any good: architecture, requirements, debugging, security posture, and deployment. That division of labor has let me ship and operate real systems far faster than my background would predict.

The systems hold themselves to account. A fleet of autonomous agents reviews the codebases on a schedule against a security-first rubric, monitors the live processes, and surfaces regressions before I do. The same discipline runs through everything I build: least privilege, isolated failure domains, and operator controls that cannot fire by accident.

Before this, years in retail management: team building, sales, and P&L ownership. That is where the operator instinct comes from. The medium changed. The job of running something real that cannot quietly break did not.

System architecture

One signal source drives a trading server and a signal-aware market maker across exchange venues. A separate observability and control plane watches the live processes, reviews the code that runs them, and is the only way to change their behavior.

Strategy signals Trading server Exchange venues Market maker webhook orders position state quotes OBSERVABILITY AND CONTROL telemetry monitors control Operations dashboards live telemetry and charts Autonomous agent fleet reviews code, monitors runtime Operations bot status reads and controls

Projects

Rust Trading Engine ground-up rewrite of the live engine

live

Live in production

  • Rewrote the production trading engine from Python to Rust: async runtime, typed venue adapters, crash-safe position persistence. Runs the same strategy across six perpetual-futures markets on two exchange venues.
  • The cutover was gated on differential testing, not on confidence. Both engines consumed the same live signals in parallel for weeks, and the rewrite had to produce zero decision disagreements before it was allowed to take over, with many fills matching digit for digit. One-shot cutover, documented rollback, never both engines live at once.
  • Mid-lifecycle restarts restore open positions and reconcile against the venue with zero mutations. Proven against live positions rather than in a test harness.
  • Killed the feature that justified the rewrite. A split-exit that backtested well turned out to be an artifact of bar-level trailing: live results inverted the drawdown improvement it promised, so I disabled it, flipped the unsafe default in code, and added a regression test to keep it off. The engine itself earned its keep and stayed.

Stack Rust, tokio, serde, systemd

Multi-Exchange Algorithmic Trading Server first generation

superseded

Ran in production. Engine since replaced by the Rust rewrite above

  • Webhook-driven trading server running a trend-following strategy across multiple perpetual-futures markets, managing positions across 6 sub-accounts on two exchanges from a single signal source.
  • ATR-based risk management, tiered slippage, race-condition guards, automatic state recovery on restart. Per-account flip, force-close, and manual size adjustment, all gated behind an admin token.
  • Live operator dashboard with a two-tier auth split: separate credentials for admins (write) versus read-only monitors, so a leaked monitor credential cannot place a trade.
  • Production-hardened: built and shipped fixes for infinite exit loops from API verification failures, double-order race conditions, signal repainting, and an SDK-level hang that needed a custom stack-trace dump on detection.

Stack Python, Flask, asyncio, nginx, systemd, SQLite

Directional Market Maker multi-pair, signal-aware quoting

Live in production

  • Signal-aware, one-sided maker: reads position state from the upstream trading engine and places passive, post-only (maker-or-reject) limit orders on the active side across three pairs, earning maker fills and reinforcing the trend rather than quoting both sides of the book.
  • Per-pair PnL kill switches (intentionally pair-level, not pooled across the book). Debounce logic so a single bad tick or zero-price read cannot force a trade.
  • Hang-detector sidecar that triggers a stack-trace dump on the wedged process after a configurable log-silence threshold.
  • Control API never exposed to the public internet; reachable only through a privately scoped tunnel from a separate ops host.

Stack Python, asyncio, systemd, SSH ControlMaster tunneling

Autonomous AI Agent Fleet production-grade agentic operations

Live in production

  • Code-review agents: three scheduled review agents covering the trading, market-maker, and macro-index codebases against a security-first rubric with tiered alerting on a 4-hour cadence. First production runs caught real bugs on day one and have continued to surface regressions.
  • Performance-monitor agent: regime-aware periodic recommendation reports. Pulls multi-month price and funding history, discovered and worked around two undocumented exchange-API pagination limits, runs k-means regime clustering on 8 engineered features (with an HMM successor variant built and gate-tested against the live release).
  • Log-stream monitor agent: persistent live-log stream into the model with a structured pattern catalog of 14+ matchers across four primitive families (temporal, sustained-state, filesystem-watch, HTTP snapshot-delta) and a cross-pattern correlation layer that collapses paired signals into a single combined alert.
  • Fleet-briefing meta-agent: runs on a fixed twice-daily schedule, consolidating the other agents' output and live-system state into a single operator briefing and escalating only when something needs a decision. An agent that supervises the agents.
  • Autonomous build agent: takes a written spec and lands working code unattended. Its first assignment shipped a market-data recorder end to end, now running as a hardened service capturing minute-resolution order books across 33 markets on three venues plus hourly options surfaces from a fourth, scored daily against a coverage gate that excuses genuine venue outages and flags everything else.
  • Source code reaches the agent host only through one-way read-only mirrors, never through any external code-hosting system.

Stack Claude Code (subscription auth), systemd timers, SSH ControlMaster tunneling, Discord webhooks

Operations Bot chat-driven control plane

Live in production

  • 15+ slash commands for controlling the agent fleet and trading systems: status reads, pause/resume, position queries, kill switch, watchlist CRUD.
  • Routes over a restricted private tunnel to internal control APIs; nothing exposed to the public internet. Designed for fast phone use: space-separated args with smart defaults.
  • Destructive actions (kill switch) require a typed-confirmation token, run server-side timeouts, and write to an audit log on every invocation.

Stack Python, Flask, SSH ControlMaster tunneling, Discord Bot API

Consumer Stress Index daily macro indicator

Live, auth-gated

  • Computes and publishes a curated daily consumer-stress index from public federal economic series, corporate regulatory filings, and a market-data watchlist.
  • Cached clients over each upstream, with handling for source-side outages, release-lag quirks, and rate limits.
  • Composite weights driven by what the historical data actually supports; calibration window chosen after discovering and excluding an anomalous early-period revision.

Stack Python, Flask, SQLite, FRED and EDGAR APIs

Live Operations Dashboard market-maker telemetry

Live, auth-gated

  • Operator dashboard over the market-maker process. Periodic snapshot timer writes to a local time-series store.
  • Charts above raw state dumps: PnL curve, drawdown gauge, fills volume, cycle-health sparklines.
  • Kill-switch UI with typed-confirmation dialog, server-side timeout, and a confirmation guard that prevents accidental fires.

Stack Python, Flask, SQLite, vanilla JS charts

Quantitative Strategy Research two books in shadow deployment

research

Paper and shadow, not in production

  • Market-wide regime scanner: factorized hidden Markov models over global macro and crypto state, with model size chosen by information criterion and out-of-sample cross-sectional skill rather than in-sample likelihood. The validation harness scores state-conditional forward returns using quintile spreads and autocorrelation-robust t-statistics.
  • Funding-rate carry book: backfilled hourly funding history across the full market universe of both venues, then ranked candidates on full-year carry after a strong 90-day read on one asset reversed sign over a full year. Short-window carry reads are now banned in the project.
  • Both books run read-only monitors and shadow harnesses on a schedule, with the pass-or-fail threshold written down before the data arrives. Several candidates have been cut on their own evidence, including one dropped for regulatory exposure despite carrying the best yield in the universe.

Stack Python, hmmlearn, NumPy/pandas, SQLite, systemd timers

Walk-Forward Optimization Pipeline strategy research

tooling

Research tooling

  • Hyperparameter-search framework for trading strategies with a multi-seed robustness check baked in (parallel optimization isn't deterministic even with a fixed seed; multi-seed catches that).
  • Treats the pipeline itself as the deliverable: multiple candidate strategies run through it have failed walk-forward analysis, which is the point. The framework is the durable asset.
  • A library of trading-platform strategies built in parallel against a consistent architecture: ATR-based risk, trend filters, webhook-ready alerting.

Stack Python, Optuna, TradingView Pine

Infrastructure & hardening

Contact

Email
mdubya895@gmail.com

Resume and additional channels available on request.