Daniel Togni

Java 21 · Interactive Brokers · live for ~5 years

A live, rules-based algorithmic trading engine.

Runs in Docker against the Interactive Brokers TWS API, manages real and paper accounts, and has been placing real orders unattended on a daily cron for ~5 years.

Framing: rules-based. No prediction, no discretionary calls, no returns or performance claims. The signal is engineering and operational rigor — a live system I run.

What it does

Trades automatically across real accounts. Connects to Interactive Brokers TWS and runs rule-based rebalancing, signal, and exit strategies against 3+ live and paper accounts, every day.
Feeds FamilyFund. Pushes positions and prices over REST into FamilyFund, the book of record.
Reports daily. Generates HTML email reports with JFreeChart charts — the operating visibility for the engine.

How it works

Engine
Java 21, Maven, runs in Docker; daily cron.
Broker
Interactive Brokers TWS API; live + paper across 3+ real accounts.
Strategies
Two independent rule-based strategies (SimpleRebalance, LinearRegression) behind a common execution interface.
Data in
Positions, prices, and executions read from Interactive Brokers over the same TWS connection.
Data out
Pushes positions & prices to FamilyFund via REST (POST /api/asset_prices_bulk_update, POST /api/portfolio_assets_bulk_update).
Reporting
HTML email reports with JFreeChart charts.

Strategies

Mechanical and rule-driven — no AI in the signal path.

SimpleRebalance

Rules-based target-weight rebalancing.

LinearRegression

Trend-based signal.

Investment strategy

The thesis the engine implements: start from the broad index, treat leverage as capital efficiency rather than speculation, split that exposure across All Seasons-style buckets, and let the rebalancer hold the targets. Mechanical, not predictive — no calls on direction, no discretionary overrides.

Investment strategy

Starts from the broad index as the baseline, uses 3x leverage as capital efficiency instead of stock-picking, buckets exposure across All Seasons categories (growth, stability, crypto), and lets a quarterly rebalance hold the targets.

Rebalancing strategy

Why most strategies try to predict the market and this one doesn't — target weights, the drift problem, trading bands around each target, the sell-high / buy-low triggers, the tight-vs-wide band knob, and the time-based force rebalance every ninety days regardless of drift.

Trading bands

Per-asset target allocations with deviation triggers and live drift charts — how the rules look in FamilyFund, which is the book of record that DS Trader feeds.

FamilyFund trading-bands view: per-asset target allocations, deviation triggers, target/actual variance, portfolio variants over time, and drift charts.

Engineering & operations

  • ~570 tests (44 TestNG classes, with data-provider row expansion) guarding the order logic.
  • Daily scheduled execution (cron) in production for ~5 years, unattended.
  • Multi-account orchestration against a real brokerage API (live and paper).
  • HTML / charting report pipeline for daily operating visibility.

The integrated platform

DS Trader is one half of a two-app platform: it feeds FamilyFund, a Laravel portfolio app my family actually uses. End-to-end ownership across Java, PHP, Python, data modeling, API design, and operations.

About / contact

Built and operated solo. — jdtogni@gmail.com · GitHub · back to home