
When to Cross the Spread?
Published on 21.10.2026 CEST
Trade aggressively or remain passive in the order book? This is one of the many crucial questions that our trading algorithms consistently address when executing orders. In this technical article, we delve into recent research and the quantitative models at the heart of execution algorithms.
Broker algorithm landscape and liquidity fragmentation
The landscape of equity execution is evolving rapidly, and the brokerage world is more competitive nowadays than ever before. Algorithmic execution, which was virtually unheard of 20 years ago, is now a standard offering for reputable brokerage firms: from essential benchmark-oriented algorithms like TWAP, VWAP, POV, and TMOC to specialized options such as Trailing Stop, Sniper and Dark algorithms. Advanced offerings often include proprietary implementation shortfall and liquidity-seeking algorithms, such as our PACE with various aggressivity modes, as well as more niche products like opportunistic algorithms.
While the range of services offered is largely consistent across the brokerage industry, the complexity of execution systems continues to grow, driven by Europe’s increasingly fragmented liquidity landscape. For instance, when executing a trade for a Novartis share, our execution algorithms and smart order router will source liquidity not only from the primary exchange (SIX) but also from four MTFs, five auction-on-demand platforms, seven dark pools, four systematic internalizers, three conditional liquidity venues, and two request-for-quote platforms in a fully automated fashion (see Figure 1). Each venue competes for client orders by introducing new order types, special instructions, or even entirely new trading mechanisms.
In the Transaction Banking unit, we closely follow the innovations in the liquidity space, often being the first broker to provide clients with the new features of the venues (such as Auction Volume Discovery, which SIX introduced in 2023, followed by Euronext in 2025 and Xetra in 2026).
Inside the decision center of an algorithm
Given the complexity of the whole trading landscape, an algorithm’s design is vital for its reliability and robustness. Modern execution algorithms need to process multiple data streams from various sources while managing numerous orders across different venues. These systems operate in highly concurrent environments, where real-time status updates on child orders are received with delays. For example, new trading instructions sent to venues may be accepted or rejected, while orders that have already been placed could be fully or partially executed, with trade reports still on their way back to the execution algorithm.
The internal order management system is a key component in ensuring the reliability and stability of the algorithm. Additionally, the algorithm must be able to effectively manage all trading modes of the venues, such as auctions or stop trading, various order types, and special features and trading mechanisms, as well as the specifics of order handling at non-lit venues like dark pools, conditional venues, or periodic auctions. As such, the overall design of the algorithm plays a crucial role in ensuring precise, efficient execution in such a dynamic environment.
However, simply having functional components and a smoothly operating algorithm is not enough to deliver top-tier execution quality and maintain a competitive edge. Throughout its operation, the algorithm continuously makes decision, potentially up to 100,000 times for a single “Day” order, determining when, where, and how to execute each individual trade. The quality of these decisions directly affects the overall slippage of the execution relative to the arrival price or the tracking error against a benchmark price, such as VWAP. Clients monitor execution performance closely by examining post-trade transaction cost analysis (TCA) reports and using automated tools such as “broker wheels”, which evaluate execution performance in real time and automatically route orders to the most efficient broker.
To enhance overall execution quality, each execution algorithm integrates several advanced quantitative models, such as volume and volatility forecasting models at daily and intraday timescales, liquidity models to analyze order book dynamics, and models for forecasting the future dynamics of the price (trading signals). These models are calibrated and tuned using extensive analysis of historical data and back-testing simulations. They define the optimal time to place the orders and shape the long-term trajectory of the algorithm, aiming for the best possible price for the client.
When to cross the spread?
Following a long-term execution plan, the algorithm constantly faces a critical question: Should it post a passive order in the book or aggressively cross the spread?
An aggressive market order ensures execution but at the cost of crossing the spread and paying the taker fee at the exchange. On the other hand, posting passively at or below the touch level would save the spread, which is often substantial, even for blue-chip stocks, spreads can reach 10 bps, and they are often much larger for less liquid instruments (see Figure 3). As an added benefit, passive execution usually entails lower fees and may even receive a rebate from certain alternative venues. However, the downside of passive orders is the risk of non-execution. If a passive order isn’t filled, the algorithm may later need to catch up to the target quantity by using an aggressive execution, potentially at a worse price than at the initial decision-making point (See Figure 2).
The market risk of price drift can be proxied by market volatility, while the potential price improvement corresponds to the market spread (see Figure 3 for a selection of Swiss stocks). While the price improvement is fixed, the market risk associated with the passive order grows the longer it remains in the book.
To optimize the trade-off between reward (price improvement) and risk (volatility), the algorithm needs to incorporate another key variable: the probability of the order being filled. Intuitively, the longer a passive order remains in the book, the higher the chance of execution. However, the fill is never guaranteed. There is always a chance that the market will drift away, leaving the order unfilled (see Figure 4). Furthermore, the fill probability decreases as the order is placed deeper in the book.
By combining market risk with expected price improvement, the algorithm can determine an optimal placement strategy. For example, placing a limit order for a fraction of a second minimizes market risk but also reduces the probability of execution. Conversely, leaving the order open for a longer period increases the chances of a passive fill, but also increases the risk of adverse price movement, potentially leading to an aggressive catch-up at an unfavorable price. The optimal resting time for a passive order could be determined using a fill probability model that provides quantitative forecasts.
A robust fill probability model must provide timely, accurate forecasts that account for immediate market conditions. Typically, the fill probability increases when volatility rises or spreads narrow, regardless of the side on which the order is placed. However, the immediate state of the order book and market momentum can significantly influence the actual probability of execution. When these factors are favorable, such as high momentum aligning with the order’s direction, the actual probability of a fill would be much higher than the average values shown in Figure 4. Conversely, during unfavorable market conditions, the expected chances of achieving a passive fill decrease.
Quantifying buy and sell pressure
One phenomenon widely recognized among traders and quantitative professionals is buy/sell pressure. Empirical evidence suggests that if the order book, or more generally, the order flow, is heavily skewed toward the buy (sell) side, the market price tends to rise (fall). With regard to the visible order book, this effect could be quantified, for instance, using the order book imbalance (OBI) metric, which provides a normalized view of buy/sell pressure. An OBI close to 100% (when the book is bid-heavy) indicates potential for price improvement. Conversely, in the case of an ask-heavy book and an OBI close to −100%, the book is positioned toward a price decrease. At the touch level, the OBI provides insights about short-term price changes. However, when calculated across deeper levels of the order book, it also provides a forecast on longer-term price dynamics.
In the context of short-term order book changes, it is crucial to understand that price movements in imbalanced books are driven more often by aggressive trades, which consume liquidity at the best price levels, than by cancellation of limit orders on those levels. This dynamic is illustrated by the likelihood of the next trade occurring on the best bid (or ask), depending on the OBI (Figure 5).
Figure 5 suggests that the accuracy of predicting the time-to-fill for orders could be improved by incorporating features like OBI. Building on these findings, we have delved into research with the goal of developing and training a predictive model to optimize the trade-off between passive and aggressive execution.

Deep dive into the forecasting model
The design of our forecasting model is motivated by the recent advances in market microstructure and deep-learning research. Deep learning, a branch of machine learning, uses neural networks to detect intricate predictive features in data. A typical neural network is made up of layers of artificial neurons that use activation functions to model non-linear relationships. By stacking multiple layers and their activation functions, deep neural networks can effectively approximate any continuous function and discern patterns that are beyond the reach of traditional linear models.
Over recent decades, deep learning has brought transformative changes to fields such as computer vision, natural language processing, and audio signal processing. More recently, generative AI applications have revolutionized how information is retrieved, structured, and analyzed. However, despite considerable academic interest, applying deep learning in finance remains far from straightforward.
Deep neural networks require a large number of homogeneous and stationary datasets for efficient training, and the lesser the strength of the signal in the data or the higher the chance of regime shifts, the more data is needed for effective training. This poses a primary challenge for financial applications: being notoriously known for having extremely low predictive power in their models, they require a meticulous statistical approach. For example, traditional investment management, which operates at daily and longer time scales, has to deal with an extremely low signal-to-noise ratio and a small amount of data. In such a challenging environment, deep learning struggles in real-life trading systems to outperform simpler models like gradient boosted trees, random forests, or even regularized linear and non-linear regression. These traditional models are typically more robust against overfitting and require far less data to achieve reliable results.
By contrast, when delving into intraday scales, particularly on second or sub-second timeframes, the dynamics change significantly. Here, not only does the signal-to-noise ratio improve, but the availability of richer data also enables the use of specific pre-processing techniques to mitigate non-stationarity and sample bias without substantial data loss. This has facilitated the widespread adoption of high-frequency deep forecasting models in both academic and industrial settings.
Model architecture and the challenges
In our application for predicting fill probability, a deep neural network relies on a series of order book snapshots as input. The order book information is processed by an encoder and represented as a high-dimensional latent vector that summarizes the current state and historical context of the order book. The latent representation is then transformed into a forecast of the probability that a passive order will be filled within the next T seconds. Figure 6 illustrates a feed-forward implementation of such an encoder-decoder framework.
Training and operating such models requires a substantial amount of data. For instance, periodic order book snapshots at a frequency of 10 msec for a single stock like Novartis can amount up to several gigabytes of data per trading day. This places immense demands on both the research infrastructure for training and the production systems for near real-time inference. Each of our several algorithmic servers typically handles hundreds of parent orders (and thousands of child orders) simultaneously, making system performance and scalability critical.
Another challenge is that the fill probability (Figure 4) is by definition a non-decreasing function. Ensuring that the neural network outputs adhere to this behavior is not straightforward. One potential solution is to use a monotonic decoder architecture, which restricts the decoder’s weights in a particular way to ensure well-behaved, monotonic outputs. Our extensive experiments with the monotonic decoder have shown it to be highly versatile, capable of predicting a wide variety of fill probability curves, along with a high-quality forecast power.
To determine the optimal order placement time, the trading system needs access to the entire fill probability curve (Figure 4) for any arbitrary future time T. Using a monotonic decoder, this would require evaluating the network’s output multiple times for different values of T, which is a computationally expensive process. Given that the system makes decisions multiple times a second, this factor was a significant obstacle to even contemplating implementation of such a system in live trading. Therefore, we had to further restrict the network’s architecture.
To address this problem, we developed a novel semi-parametric decoder architecture capable of producing the entire curve in a single output. While this custom regularization introduced a slight bias and marginally reduced the forecast’s precision, it dramatically simplified the model architecture and enhanced its feasibility for real-time deployment.
On the way to the production systems
Integrating the fill probability model into the decision-making core of our trading systems represents a significant departure from the original passive posting logic. Such substantial changes in the system design must always be undertaken with caution.
In the Transaction Banking unit, we prioritize the stability of the execution platform and algorithms, and every change undergoes rigorous testing, including controlled production testing in live systems. For the fill probability model, testing in UAT environments is particularly challenging due to the vastly different dynamics compared with real markets. After successful historic simulation and UAT testing, we typically roll out new systems in two phases, first activating new features for internal clients. After a successful internal testing phase, we gradually enable it for external clients’ trade flows, closely coordinating with the Global Execution desk. Throughout this process, we emphasize monitoring and validating of live results to ensure alignment with expected behavior.
Transformative system improvements require considerable time, resources, and commitment. Starting such initiatives is always a leap of faith for any business: in the very beginning, there is no guarantee that the project will be successful. Therefore, it is always tempting to keep the current systems intact and not expand into uncharted territory. But despite the uncertainty, such ventures are indispensable for maintaining and improving a competitive edge, which is only possible through continuous innovation.
Published on 21.10.2026 CEST
ABOUT THE AUTHORS
Show more articlesDr. Vladimir Filimonov
Head of Algorithmic Trading
Vladimir Filimonov heads the Algorithmic Trading team in the Transaction Banking unit at Vontobel. He is responsible for design and implementation of the execution trading strategies.
Show more articlesAdrian Willi
Quantitative Researcher
Adrian Willi is a Quantitative Researcher on the Algorithmic Trading team in the Transaction Banking unit at Vontobel. He works on quantitative models that employ machine learning and deep-learning techniques.
