docstox.ai · a deterministic trading system
Signals in. Disciplined orders out. Everything on the record.
DocStox is a deterministic algorithmic trading platform. The operator chooses the strategies, from momentum to options income to following public disclosure filings, and sets the filters, limits, and signal sources. The system executes those choices automatically, with rule-based discipline instead of hunches: every signal passes a hard risk layer, every order takes one audited path through the brokerage's trading API, and no AI ever touches the order path.
§ 01 · The premise
Strategies built on rules, not hunches.
Every strategy DocStox runs is chosen and configured by its operator: which signal sources to read, which filters apply, how much capital each strategy may use, and the risk limits nothing may cross. The platform's job is to execute those choices exactly, every time, and to write down what it did, and why, including when it did nothing.
The sources form a menu rather than a single bet. DocStox can watch public disclosure filings from members of Congress and from the large institutional investors whose reported positions move markets: the whales and the movers. It can watch government activity, such as federal contract awards landing on a company. It can watch the options market for unusual behavior: a rising count of open options contracts, or trades far larger than a stock usually sees, measured over a trailing window of roughly eighty to ninety days. And it can watch price itself, ranking stocks by momentum against their peers. No single source is the star; the discipline around them is.
Take one of those sources, congressional disclosures, as an example. Members of Congress are required by law to report their trades; the filings are public and arrive up to 45 days late. Most attention paid to them is noise: screenshots, hot takes, hero-worship. Configured as a source in DocStox, they become a dataset: disclosed amounts stay the ranges they really are ($1,001-$15,000 is a pair of bounds, never a fake point estimate), and candidates are scored by how many distinct members bought the same stock inside a rolling window.
A lone purchase is weak evidence; four members converging on one name in a month is a different kind of fact. But that score is a ranking input only: it never triggers execution and never bypasses the risk layer. The same shape holds for every source the operator turns on: signals propose, rules dispose. Each source exists to hunt for edges the market has not priced in, and none earns the right to trade until it proves itself in honest, survivorship-audited backtests and paper trading. Ambition is welcome here; it queues behind evidence.
§ 02 · How it works
One pipeline. One order path. No exceptions.
Every order originates in a strategy, is ranked by the strategy engine, passes the risk layer, and is built by the execution module. Nothing else may place an order: not an alert, not a monitoring job, not a manual shortcut. If a signal is good enough to trade, it belongs in the ranked pool where the risk layer sees it. If it is not, it is not good enough to trade.
STEP 1
Ingest
Signal-source data and market data arrive through one common intake (disclosures, prices, option chains), cleaned into structured records and cached for reproducibility.
STEP 2
Signal
Strategies are pure calculation: market state in, signals out. They know nothing about brokers, accounts, or money; the same code runs in backtest and live.
STEP 3
Risk
Every signal faces the full battery of hard checks. Any single failure kills the order and writes the reason to the audit log.
STEP 4
Execute
Orders are built and placed through one audited path to the brokerage's API. Each entry gets a trailing stop at the broker as soon as the fill confirms.
STEP 5
Audit
Every decision is committed to an append-only log, including, deliberately, every decision not to trade, with its reason.
Strategy code cannot even reference the order-placing code. The dependency runs one way, and a test enforces it. Broker connectivity sits behind a swappable provider layer; no strategy is tied to a single broker.
§ 03 · Determinism
Same inputs, same outputs. Provable by test, not promised by policy.
What deterministic means here
Signal generation, position sizing, risk checks, and order placement are 100% deterministic code. The test suite runs the full pipeline twice over identical inputs and confirms the output is identical to the byte. Even the clock is a supplied input (the logic never asks the wall for the time), so every run can be replayed exactly.
Where AI is, and is not
There is no AI in the path that places orders, ever. Language models are permitted only in offline, non-trading roles: tidying messy filing text into structured records, or writing plain-English explanations after the fact. Nothing a model produces can ever reach an order. This is an architectural rule, not a preference.
§ 04 · Safety engineering
The interesting engineering is in what the system refuses to do.
DocStox is designed around the assumption that its own process can die at any moment, and that the most dangerous code path is the one added "just this once." The protections below are structural: enforced in code and infrastructure, not in documentation.
ReliabilityBroker-side trailing stops
Every stock position carries a trailing stop that rests at the broker, not inside DocStox. If the software crashes, the machine reboots, or a login expires overnight, the stop keeps protecting the position anyway. The system still keeps its own copy of where the stop should be and compares it against the broker's resting order every few minutes: trust the broker for execution, verify continuously.
ControlThe kill switch
A single command halts all order placement immediately and cancels open orders. It is engineered to work without a database and without network access to anything but the broker. On the dashboard it is the only write action that exists, and it requires a typed confirmation, not a click.
NovelStructural no-lookahead
Disclosure filings carry two dates: when the trade happened and when it was reported, which can be up to 45 days apart. Letting a backtest use the earlier date is time travel. DocStox forbids it at the database permission level: the account the strategy engine connects with is simply not allowed to read trade dates, only report dates. Honesty is enforced by the database itself, not by code review.
ConstraintAccount-aware by hard rule
The rules of the account being traded are encoded as risk-layer rejections, not strategy conventions. A retirement account, for example, forbids shorting and naked options, so the system enforces no short selling, no leverage, no uncovered options, and refuses any order that would spend cash from a sale that has not yet settled. Options are restricted to fully covered or fully cash-backed structures; the order builder will not construct anything else.
MemoryAppend-only audit trail
Every signal, every check result, every order, every fill, and every decision not to trade is written to an append-only log with its reason. Every open position traces back to why it exists: the originating strategy and signal are part of the record.
DisciplineAllowed to do nothing
When nothing qualifies, the system says so ("no qualifying candidate" is an explicit, recorded state) and holds cash indefinitely. It never relaxes filters, lowers thresholds, or takes the least-bad option just to stay invested. Sitting out is a first-class outcome, logged like any other.
- settled cash covers the order
- position size cap
- max positions held
- daily order cap
- daily-loss circuit breaker
- max-drawdown halt
- no short positions
- allowed & blocked symbols
- market hours & holidays
- liquidity minimums
- collateral verified live
- permitted structures only
- could cover every assignment
- covered shares locked
- no calls below cost basis
- earnings too close
- adjusted contracts excluded
- expiry window bounds
A sample of the risk layer. Any check failing kills the order and logs the reason. ✕ marks checks that halt trading entirely or exist to prevent a prohibited position.
§ 05 · Honest backtesting
A backtest that flatters you is worse than no backtest at all.
Nothing goes live before it has a reproducible backtest, and the backtest engine is built to make lying to yourself difficult. No numbers from those backtests appear on this page, and that is deliberate: publishing them would invite exactly the inference the system is built to resist.
DocStox is also built to improve with use. Every decision it records becomes evidence, and strategies are periodically re-tested against that growing record. When a refinement earns its place, it earns it the same way everything else here does: by proving itself through the same honest backtesting gate before it may trade.
Survivorship, audited
- The dead companies problem: standard price feeds return nothing for delisted, acquired, or bankrupt tickers. A naive multi-year backtest silently drops every company that stopped existing, and inflates itself in the process.
- DocStox compares the list of stocks a backtest asked for against the list it could actually price, and reports the difference. If any historical signal cannot be priced, the backtest fails loudly with the missing names. It never skips them silently.
- Until historical data that includes delisted companies is wired in, every result is flagged as unverified for survivorship bias, a label the engine stamps on its own output.
Fills, modeled pessimistically
- Options fills are where backtests go to lie. Simulated fills land at a configurable point between the midpoint and the worse side of the spread, never at the optimistic midpoint. Commissions and assignment fees are included.
- Replay uses report dates only, by construction. The engine cannot peek at when a trade actually happened, only at when the public could have known about it.
- Parameters are swept, not assumed. Stop distances and cooldown windows are validated across a grid before going live, including a metric for winners that were shaken out by ordinary noise. A default is never trusted because it was specified.
§ 06 · The strategies
Three rule sets. One of them is literally a state machine.
Disclosure following. Buys on report dates only, whether the filing came from a member of Congress or a large institution, ranked by disclosure clusters; exits are governed entirely by a trailing stop resting at the broker that ratchets up and never down. After a stop triggers, the stock goes on a cool-down list so it cannot be bought and re-bought into the ground, and sale proceeds must settle before the cash is redeployed.
Cross-sectional momentum. Long or flat only. Standard, boring, well-documented relative strength with a volatility filter, rebalanced on a schedule. Deliberately uncreative.
The wheel, an options-income cycle implemented as an explicit state machine. Sell a cash-secured put on a stock worth owning; if the shares are assigned, sell covered calls above cost basis until they are called away; repeat. Every stage is saved and every transition is written to the record before any order is placed, so a crash mid-cycle recovers to a known point.
Every stage change is saved before any order is placed. Collateral is verified in settled cash, across all open puts at once, at the moment the order is built, against live account data. A covered call below cost basis is rejected outright, not warned about. Shares backing an open call are locked away from every other strategy. If a sold option reaches half its maximum profit early, it is bought back and the premium banked; the trigger is configurable, and premium is tracked net of closing costs, never gross.
§ 07 · Architecture
Engineered like infrastructure. The dashboard can watch, not touch.
The trading core answers to no one's browser. Brokerage credentials are encrypted at rest and never leave it; the dashboard sits behind authenticated access with a second factor; and the dashboard itself is a read-only observer: if it goes offline, trading continues uninterrupted, because it was never a dependency. It exposes exactly one action that can change anything: the kill switch, which is built to keep working even when almost nothing else does. And no one has to sit watching any of it. The platform monitors itself: scheduled jobs check the checkers, and anything that needs attention is flagged on the record without a human having to hunt for it.
The dashboard is reachable only through authenticated access (a verified identity, a second factor, sessions that expire daily), and the core double-checks that identity proof itself rather than trusting the front door: defense in depth. Brokerage credentials are encrypted at rest and never leave the core. The dashboard is never a dependency: if it dies mid-session, trading does not notice, and a test proves it.
§ 08 · Membership
Preparing for membership
DocStox is preparing to open membership access. Members will connect their own brokerage account (DocStox never holds funds or securities), then choose which strategies to run, set their own filters, limits, and risk rules, and let the platform do the rest. Everything described on this page comes with it: the hard risk layer, the single audited order path, the permanent record of every decision, and strategies that start in paper-trading mode before they can ever go live.
Members will also be able to begin with a dedicated paper-trading account: real market data, simulated money. Connect it, configure a strategy, and watch the platform run the whole loop end to end before any real account is involved. Paper results are practice, not proof, and never a promise of live performance.
Access is not open yet, and no launch date is promised: the doors open when the engineering is ready, not before. If you would like a note when that changes, write to hello@docstox.ai. Expressing interest is just that: not an application, not an account, and not an invitation to send anything but questions.
You can sit and watch every decision land on the dashboard. You never have to: the platform watches itself, and the record is waiting whenever you choose to look. Stylized illustration, not a screenshot; no real data is shown.