I have been building an automated research, signal, and paper-trading system for equities on the Dubai Financial Market and Abu Dhabi Securities Exchange. It can collect market data, screen the universe, reject illiquid names, generate a signal, assign an allocation tier, calculate a whole-share amount, and record a simulated position.
What it cannot do is send an order. Market data can enter through an authenticated Interactive Brokers paper session, but execution is deliberately manual. That boundary is not a temporary omission. It is part of the system.
This note documents the architecture and lessons, not the private strategy. It contains no account values, current positions, live signals, security identifiers, allocation weights, or decision thresholds. It is not investment advice.
§1The real problem was not prediction
A signal is easy to produce and dangerously easy to overstate. The real engineering problem is deciding when the inputs are trustworthy, when a stock is actually tradable at the intended size, how much cash is genuinely available, and whether the evidence survives costs and a different period of history.
That changes the goal. The system is not optimized to issue the most recommendations. It is optimized to make every recommendation traceable—and to return no action when the chain is incomplete.
§2One-way pipeline, hard stop at the order
The controlled research pipeline
- 01ObserveRead authenticated market data.
- 02QualifyApply universe and liquidity gates.
- 03ScoreRun the frozen signal rules.
- 04TierClassify the allocation band.
- 05SizeRespect cash, price, and participation limits.
- 06RecordWrite a paper position and audit trail.
§3Liquidity is a gate, not a preference
A backtest can pretend that every printed price was available in useful size. A real portfolio cannot. The engine therefore treats liquidity as an eligibility condition: recent turnover must be meaningful relative to the exchange, stale observations fail closed, and the proposed position must remain small relative to the stock's normal activity.
The important detail is point-in-time evaluation. A stock cannot be admitted to an old test because it is liquid today. The evidence used to qualify it has to belong to that moment in the simulation.
§4Confidence changes allocation, not truth
A binary BUY label hides too much. The current design uses two allocation grades: high and low. The grade does not claim a probability of success. It says how much of a pre-agreed risk budget the evidence is allowed to request.
| State | Allocation treatment | What remains true |
|---|---|---|
| High | The larger of two bounded allocation bands. | Still capped by cash, liquidity, position, and participation limits. |
| Low | A smaller, deliberately conservative band. | Still needs a complete data and eligibility chain. |
| No signal | Zero allocation. | Uncertainty is not rounded up into a trade. |
§5A cash ledger changes what “available” means
The portfolio model assumes no margin. It distinguishes settled cash, unsettled proceeds, existing exposure, and cash already reserved by open paper decisions. Settlement timing is part of buying power rather than a footnote added after sizing.
The output is practical: a security, a tier, a reference price, a maximum cash allocation, and a whole-share amount. The calculation is bounded by the smallest applicable limit. If any required input is missing, the share amount is zero.
§6Backtests are allowed to disappoint
The current backtests have not produced evidence strong enough to claim positive expected value after realistic costs. A challenger idea was tested and rejected when it failed to improve the relevant portfolio result. That is a useful outcome: the research loop refused to promote a more complicated story simply because it sounded plausible.
A candidate only moves forward when its rules were fixed before evaluation, its inputs were available at the time, it survives costs and harsher assumptions, it is not dependent on one security or one market regime, and it remains credible on data that did not shape the rule.
Do not optimize the backtest until it looks profitable. Pre-register one change, test it against the frozen baseline, keep the result whether it wins or loses, and promote only evidence that survives the holdout.
§7What is running now
The live-data path has been exercised through an authenticated paper session, the mapping and volume checks have been tested, and the internal ledger has recorded a simulated position. That proves the operating path; it does not prove the strategy.
The next phase is intentionally slower: extend the historical evidence, test one registered change at a time, stress transaction costs and liquidity assumptions, and accumulate paper decisions through different sessions. Automation does the repetitive work. The system earns more authority only when the evidence earns it first.
The design in one page
- Automate observation, screening, sizing, validation, and record-keeping—not the order.
- Make low liquidity an exclusion, not a warning.
- Use high and low as bounded allocation grades, never as promises.
- Model cash and settlement before producing a share amount.
- Let a failed backtest reject an idea without rewriting the test.
- Keep strategy, portfolio, account, and current signal details private.