Building a paper-first DFM trading system
The hard part of a research and paper-trading system for DFM and ADX stocks is building the checks that make it stop. It records no action when data, evidence, liquidity, cash or authorisation fall short.

I have been building an automated research, signal and paper-trading system for equities on the Dubai Financial Market and the Abu Dhabi Securities Exchange. It collects market data, screens the universe, rejects illiquid names and generates a signal. It then assigns an allocation tier, calculates a whole-share amount and records a simulated position.
It cannot send an order. Market data can arrive through an authenticated Interactive Brokers paper session, but execution is manual, and that boundary is a permanent part of the design.
The hard part was everything around the signal
A signal is easy to produce and easy to overstate. The engineering work is deciding when the inputs can be trusted and whether a stock can be traded at the intended size. The same work covers how much cash is available and whether the result survives costs and a different stretch of history.
I judge the system by whether each signal can be traced through those checks on inputs, size, cash, costs and history. When any link in that chain is missing, the system returns no action.
A one-way pipeline that stops before the order
The research pipeline
- ObserveRead authenticated market data.
- QualifyApply universe and liquidity gates.
- ScoreRun the frozen signal rules.
- TierClassify the allocation band.
- SizeStay within cash, price and participation limits.
- RecordWrite a paper position and audit trail.
The proposed share amount goes to a person. Review and ticket entry are manual and sit outside the engine.
A stock must be liquid enough to qualify
A backtest can assume that every printed price was available at the size it needed. A real portfolio cannot. So the engine treats liquidity as a condition of eligibility. Recent turnover must be meaningful relative to the exchange, stale observations fail closed, and the proposed position must stay small relative to the stock's normal activity.
The key detail is point-in-time evaluation. A stock cannot enter an old test because it is liquid today. The data used to qualify it has to come from that moment in the simulation.
Confidence decides how much budget a signal gets
A binary BUY label hides too much, so the current design uses two allocation grades: high and low. A grade makes no claim about the probability of success. It sets how much of a pre-agreed risk budget the signal may request.
| State | Allocation treatment | What remains true |
|---|---|---|
| High | The larger of two capped allocation bands. | Cash, liquidity, position and participation limits still apply. |
| Low | A smaller, conservative band. | Still needs a complete data and eligibility chain. |
| No signal | Zero allocation. | Uncertainty is not rounded up into a trade. |
A cash ledger changes what “available” means
The portfolio model assumes no margin. It separates settled cash, unsettled proceeds, existing exposure and cash already reserved by open paper decisions. Settlement timing feeds into buying power before sizing starts.
The output is a security, a tier, a reference price, a maximum cash allocation and a whole-share amount. The smallest applicable limit caps the share amount. If any required input is missing, the amount is zero.
What the backtests show so far
The current backtests have not shown a positive expected value after realistic costs. The research loop tested a challenger idea and rejected it when it failed to improve the relevant portfolio result. Sounding plausible was not enough to promote the more complicated idea.
A candidate moves forward only when its rules were fixed before evaluation and its inputs were available at the time. It also has to survive costs and harsher assumptions without depending on one security or one market regime. Finally, it has to stay credible on data that did not shape the rule.
I pre-register one change at a time and test it against the frozen baseline instead of adjusting the backtest until it looks profitable. The result stays on record whether it wins or loses, and only a result that survives the holdout is promoted.
The market clock belongs in the data pipeline
Update · 9 September 2026. The research system now checks session policy at both the scheduler and the data boundary. A scheduled job is only the first gate. A direct call to the provider or the persistence layer must also respect the permitted window.
Observation and simulated decisions have separate cutoffs, so the closing phase can stay open for data collection after the decision window has ended. Weekends, configured holidays and incomplete special-session overrides block collection instead of producing a session that looks normal.
Changing that policy exposed another requirement: a new rule must not reinterpret an old record. I gave the revised collection window an effective date and kept earlier sessions under the policy that applied when they ran. A completeness check now needs both the session date and the relevant policy version.
The original observations stay as they were. If a later analysis uses different rules, I label it as a new analysis and keep the original result beside it.
The checks cover window boundaries, closed days, shortened sessions and the preservation of earlier records. Passing them shows how the guard behaves. A running scheduler, an authenticated data connection and a profitable strategy each remain a separate claim.
What had been exercised by 9 September 2026
By the 9 September 2026 update, the live-data path had run through an authenticated paper session. The mapping and volume checks had been tested, and the internal ledger had recorded a simulated position. That confirms the operating path and says nothing yet about the strategy.
The next phase is slower on purpose: extend the historical data and test one registered change at a time. That phase also stresses the transaction-cost and liquidity assumptions and collects paper decisions across different sessions. Automation handles the repetitive work, and the system gets more authority only after the test results support it.