Correlation, constraints and control
AI, trading systems and blood glucose control studies
1. Introduction
Recent advances in artificial intelligence have been driven by improved methods for learning statistical relationships from large datasets. These methods have proved effective across a range of domains, particularly in language and pattern recognition.
Their behaviour in real-world systems is more nuanced.
In many practical environments—such as financial market infrastructure or physiological control—systems are subject to constraints that are not naturally aligned with statistical modelling. These include requirements for determinism, bounded behaviour, auditability and stability over time.
This note examines how correlation-based models interact with such constraints, with particular reference to trading systems and blood glucose control.
2. Correlation as a modelling approach
Modern machine learning systems, including large language models, estimate conditional probability distributions over observed data.
- They do not require an explicit model of the underlying system.
- They assume that future inputs are drawn from a similar distribution to historical data.
Where these assumptions hold, performance can be strong. Where they do not, behaviour can degrade in ways that are not always immediately visible.
3. Where correlation is effective
Correlation-based models perform well when the environment is relatively stable, data is representative of future conditions, and errors are either tolerable or can be corrected over time.
In trading environments, this includes pattern recognition in order flow, anomaly detection in FIX message streams and classification of trading behaviour.
In physiological systems, similar techniques can be applied to short-term glucose prediction, detection of trends and excursions, and estimation of insulin sensitivity under stable conditions.
4. Constraints in real-world systems
4.1 Determinism and sequencing
In trading systems, message ordering is fundamental. Execution decisions depend on precise sequencing of events: order submission, acknowledgement, fill and cancellation.
Small inconsistencies in timing or ordering can lead to divergent system states. Statistical models do not inherently preserve this determinism.
A similar issue arises in physiological control. The timing of insulin delivery relative to glucose excursions is critical. Delays or misalignment can produce oscillatory or unstable behaviour.
4.2 Auditability and reproducibility
Trading systems must support post-trade reconstruction: what happened, when it happened and why decisions were made. This requires reproducible behaviour and traceable decision paths.
In medical or quasi-medical applications, similar requirements exist. Decisions affecting dosing need to be explainable and, where possible, repeatable under the same conditions.
4.3 Regime change and non-stationarity
Financial markets are inherently non-stationary: liquidity conditions change, participant behaviour evolves and microstructure shifts over time. Models trained on historical FIX flows may capture patterns that are no longer present.
Physiological systems exhibit analogous behaviour: insulin sensitivity varies with time of day; activity, stress and illness alter response; repeated dosing changes system dynamics.
4.4 Bounded behaviour and safety
Trading systems operate under explicit limits: position limits, credit limits, maximum order size and latency constraints. These limits are enforced deterministically.
In blood glucose control, the constraints are physiological: avoiding hypoglycaemia, limiting rapid excursions and maintaining stability over time.
5. Trading systems in practice
In production trading environments, machine learning components are typically introduced in constrained roles: classification of order flow, detection of anomalous FIX sequences, monitoring of system behaviour and generation of candidate trading signals.
Core functions remain deterministic: order validation, risk checks, state management and execution logic. A model may identify a pattern suggesting an opportunity. The decision to act on that pattern is then subject to risk limits, current system state and regulatory constraints.
6. Blood glucose control as a system
Blood glucose control provides a useful parallel. The system consists of continuous input, delayed and distributed effects, and external disturbances such as food and activity.
In practice, insulin dosing strategies often rely on simplified models: estimated insulin sensitivity, carbohydrate ratios and time-of-day adjustments. More advanced approaches may incorporate predictive models estimating future glucose trajectories and adjusting doses based on recent trends.
However, control remains constrained. Doses are bounded, adjustments are incremental and safety margins are maintained. Overly aggressive responses can lead to instability, including oscillation between high and low glucose and delayed corrections that amplify previous actions. This is a control problem, not just a prediction problem.
7. A common pattern
- Statistical models interpret noisy data, identify patterns and suggest actions.
- Deterministic systems enforce constraints, maintain state and ensure bounded behaviour.
8. Conclusion
Correlation-based modelling has enabled significant progress in AI. Its integration into real-world systems requires careful consideration of constraints.
In both trading systems and physiological control, effective solutions combine statistical inference, deterministic control and explicit handling of limits and state.