Optimal Execution in Algorithmic Trading

Our PhD quant consulting service can canvass the academic literature on trade execution modelling for you, and help you design, backtest and optimize your execution strategy. Contact us to let us know how we can supercharge your trading.

Individual investors who only trade in small volumes may not need to consider an execution strategy. But institutional investors who wish to trade a large number of shares, such as investment banks, hedge funds and mutual funds, encounter the issue that large trades cause adverse price movements. If they attempt to trade the whole amount in one go, liquidity will thin out and they’ll quickly move through less and less favorable bid/ask levels in the limit order book. For this reason, traders will often attempt to split large orders into a series of smaller trades over a period of time. But there are trade offs to a more passive execution strategy. Firstly, there is the opportunity risk that prices will move unfavorably before you liquidate the whole order. Secondly, other traders may notice what you are doing and react accordingly.

Electronic exchanges typically make available not just the best bid and ask prices for a given security, but several layers of bid and ask prices along with the corresponding volumes. This data, known as “market microstructure”, is exactly what we need to inform algorithmic trading algorithms which attempt to optimize execution.

In this article, we’ll explore some of the mathematics around algorithms which optimize execution strategies.

Simple execution models

We first discuss two simple and well-known approaches to order execution, before examining more sophisticated approaches.

TWAP, or Time Weighted Average Price, involves splitting an order into equally sized pieces that are equally spaced in time. When breaking the order into N pieces to be executed over a time T, a fraction 1/N of the order is executed every 1/T seconds. The idea is that the liquidity in the market has time to recover in between orders, avoiding slippage. The price achieved is simply the average of the N prices at each execution.

VWAP, or Volume Weighted Average Price, also breaks the order up into multiple orders spaced at regular time intervals. It differs from TWAP in that the amount transacted at each time step is weighted according to the relative trading volume. Relative trading volume must be judged by using an average over many days in the historical data, and one must assume that the daily trading pattern is persistent. The price achieved is then a weighted average of the N prices at each execution.

POV, or Percentage of Volume, is similar to VWAP except that instead of using historical average volume, the volume over the last say, ten minutes is used. This has a clear advantage if today’s volume could differ substantially from the historical average.

One could improve on both VWAP and POV by both making use of today’s volume data, while still incorporating the historical volume trend to allow you to forecast volume later in the day. More precisely, at each time step the amount remaining to be traded would be apportioned using the most recent volume data for that time step, and the historical forecasted volume for the future timesteps. To get even more fancy, you could try to adjust the historical forecast based on the actual volume traded thus far today – a machine learning algorithm would be great here.

However, the main advantage of these three models is in their simplicity. They are not generally optimal, and their application can potentially be detected by other market participants.

More complex models

A good place to start in exploring more sophisticated execution models is the Almgren-Chriss model. While the model relies on some data that may be difficult to know in practice, it illustrate some of the key issues that should be understood when developing your own personal strategy. See our article on optimal liquidation using the Almgren-Chriss model.

Optimal execution as an optimal stopping problem

The problem of optimally executing a large trade can be cast as one of a familiar class of problems in mathematics – optimal stopping problems.

  • Optimal stopping problems in mathematics are are a category of problems where, at any time \(t\), you can choose to “stop”, and receive a certain reward which changes with time. The trouble is you only know what the reward is for the current time and earlier times. You do not know what the reward will be in the future. Should you “cash in your chips” now, or wait, and hope the reward will be better in the future?

The relevance to finance here is obvious. Choosing when to execute trades or exercise an American option are both examples of optimal stopping problems.

Optimal execution using stochastic control theory

In the book Algorithmic and High Frequency Trading by Cartea et al., the authors describe the use of stochastic optimal control and stopping methods to attack this problem.

  • Control theory is a field of mathematics that has applications to a wide range of engineering problems. Abstractly, the concept is to find a given “input” to a dynamical system to achieve a desired “output” from the system. A simple example is cruise control, in which the throttle (system input) must be dynamically adjusted to achieve the desired constant speed (system output), for example, when the car begins going uphill. In the case of finance, the dynamical system is typically a stock price \(S(t)\) (typically assumed to follow geometric Brownian motion) or other market information, the system input is the choice of trading strategy, and the system output is the profit of the market participant. The goal is to choose the strategy or “input” which maximises profit.
  • Stochastic control theory is a subfield of control theory in which the time evolution of the dynamical system is not completely determined by the system input, but also contains a stochastic or probabilistic element. Financial applications of control theory obviously fall squarely into this category, since market behaviour such as stock prices are not determined solely by the actions of a single market participant, but have a very significant random element.

Finding an optimal strategy or algorithm for market interaction is a problem the arises across a wide range of trading and investing problems. Many of these problems can be cast as stochastic control problems.

Optimal execution using machine learning

Another possible approach to the optimal execution problem is to put to one side attempts to find an optimal theoretical solution, and allow algorithms to trawl through the vast quantities of freely available data and try to determine an effective strategy empirically.

The primary function of such an algorithm would be in estimating the likely shape of the order book. Optimal execution strategies depend critically on how trade volume is distributed among different bid/ask levels. This is because it is this that determines how fast the price will move as you liquidate increasing amounts of inventory. Since the order book data may often be unknown or partial, various machine learning approaches could be effective in developing an empirical model of the order book. The algorithm would analyse how past trades of various sizes affected the top of the order book (taking into account, of course, how closely spaced the trades were in time).

Machine learning is increasingly in vogue in a wide range of fields, including finance. See this useful summary of a report issued by J.P.Morgan about the future of data science and big data in the financial services industry.

In their paper Reinforcement Learning for Optimized Trade Execution, Nevmyvaka et al. examine the effectiveness of machine learning in finding effective execution strategies. See also the more recent paper Double Deept Q-Learning for Optimal Execution by Ning et al.

The execution strategy to be optimized will take as input, at regular time intervals \(t_i\) for \(i=0,\ldots,n\) , a set of observable market variables (principally market microstructure). It produces as output a limit order, or ask price, at which we are willing to execute all remaining inventory. The algorithm may not wait around forever for the best possible price – so it is reasonable to assume that there is a maximum time \(t_n = T\) at which all remaining inventory must be executed regardless of market prices.

By taking a large number of different stocks, and by considering the same stock at different times, we have a large number of data sets of the form \(S(t_i)\) for \(i=0,\ldots,n\). Our execution strategy must depend on time, because as we near the end of the interval, we are running out of time to transact the remaining inventory. As mentioned in the paper by Nevmyvaka, it’s reasonable to make the Markovian assumption that the optimal strategy depends only on market microstructre at the current time step, and not on what it may have been at previous time steps. Thus, whether proceeding by machine learning or by some other method, determining the optimal execution strategy for each step can be done by working backwards from the final time step, in a similar manner to how one prices an American option using Monte Carlo. At time \(t_n = T\) we already know what the strategy is – we must execute all remaining shares regardless of market prices. At time \(t_{n-1}\), for each individual data set we would like to execute at time \(t_{n-1}\) any shares that can be executed at a price equal or better than they could be at time \( T \). The machine learning algorithm must determine, on average after considering all the data sets, what is the optimal map from the market microstructure (bid/ask levels and volumes) to a price at which we are willing to transact at that time step. Continuing to work backwards, we eventually come up with an optimal strategy at each step.

The question remains – what kind of relationship should we assume between the market microstructure and the optimal transaction price at the same time step? We might, with some careful thought, make a guess as to the form of the mathematical function, so that the machine learning algorithm can optimize the parameters. Another option is to use a neural network which may succeed in finding the form of the relationship by itself. Experience shows that making little effort and expecting a machine learning algorithm to work magic is not always successful. Guiding the process using human theoretical insight and human empirical observation, and then using machine learning techniques to merely to optimize, will often yield the best results.

3D Reconstruction of Faces and Objects

3D reconstruction is the process of capturing the 3D shape of a real world object. The algorithm may take as input one or more depth maps of the object, possibly from different angles. Alternatively, the algorithm may be provided only with 2D images or 2D video and asked to infer the depth coordinate. The algorithm must then generate a smooth and accurate representation of the 3D object. 3D facial reconstruction is especially difficult because humans have evolved to detect even very slight differences in facial structure.

3D reconstruction is an active field of research with many applications in computer graphics and animation, medical imaging, robotics, landscape and vegetation scanning (including LiDAR), facial recognition and cybersecurity.

Many difficult and interesting mathematical problems arise when trying to capture digital representions of 3D objects. Firstly, the process of 3D scanning itself gives rise to a number of issues including dealing with sensor accuracy limitations and noise, including reflective or transparent surfaces. Some existing solutions require very expensive scanners, and thus there is scope for researching solutions that use only inexpensive and widely available equipment, such as a smartphone.

Once a depth map has been captured there is the problem of deciding how to combine multiple depth maps or images into a single coherent representation, and how to interpolate between data points in the point cloud to yield a smooth and accurate representation of the original object. Furthermore, algorithms are often computationally intensive which renders them useless for real time applications. Designing efficient yet effective algorithms for real time 3D reconstruction is therefore an even more difficult problem.

Computer vision researchers at the University of Nottingham have developed an algorithm which uses machine learning / AI (in this case, a neural network) to reconstruct a 3D face model from a single 2D photograph.

Another research team have created accurate facial reconstruction technology using video captured from a smart phone.

Interested in developing 3D reconstruction technology for your industry? Our research consultants are excited to collaborate with you to develop 3D vision algorithms for all your applications.

Financial Algorithm Consulting Services

Are you a financial services firm interested in developing algorithms to take your business into the 21st century?

We’re a cloud-based consulting firm who develop custom-built financial algorithms in languages like C++, python and VBA.

What is an algorithm?

Broadly speaking, an algorithm is a process that can be carried out by a computer, usually with efficiency, accuracy and comprehensiveness that cannot be matched by a manual process. Algorithms typically take in a set of inputs or data sources, perform calculations, and output useful business information.

What kinds of financial services firms can benefit from algorithm tech?

Algorithms and automation are now touching all corners of the finance ecosystem including banking, investing, trading and insurance.

What are the benefits of algorithms in finance?

Algorithms allow businesses to

  • Automate calculations and processes so they can be carried out much more quickly and without costly human labour
  • Carry out sophisticated calculations involving large amounts of data from multiple sources that are unmanageable for humans
  • Succeed at time-sensitive applications where human analysis and decision making is too slow, such as trading, and especially high frequency trading of course
  • Provide online calculators to generate customer quotes and assessments on-demand
  • Analyse data to provide valuable business insights and drive decisions

What are the applications of algorithms in finance?

  • Calculating risk
  • Pricing insurance
  • Making investment decisions
  • Trading and execution

A significant example is a volatility smoothing algorithm.

Algorithmic trading

For information and services relating to algorithmic trading, see our main article Algorithmic Trading Consulting Services.

What’s all this about machine learning?

Machine learning, a subcategory of data science, represents an exciting range of techniques where an algorithm can use data to optimize it’s behaviour. This includes:

  • When is the best time to buy/sell stock
  • Which customers are most likely to default on loans or make insurance claims
  • Which transactions should be flagged as suspicious
  • Which economic variables impact profitability

Interested in taking your business up a technological notch with financial algorithms? It’s as easy as Contacting Us.

In fact, financial algorithms are only one of a wide range of quantitative services we provide to the financial services industry. Be sure to check out our main page Quant Consulting.

Hire a Freelance Quantitative Analyst

Looking to hire a freelance quantitative analyst to augment your team? Interested in learning about the benefits of working with freelancers?

We offer sophisticated cloud-based quant services including:

Learn how I bested one of the top four financial firms at risk modelling.

Do you require the skills of a quantitative analyst in your team, but not permanently or not full time? In the modern interconnected world, our cloud-based quant consulting service is the ideal solution.

We provide sophisticated, on-demand quantitative analysis to trading firms, banks, and managed funds, big or small.

Contact us to learn how our expert quantitative skills can augment your business.

Learn more about our quant consulting services.

Hire a Freelance Algorithm Developer

Looking to hire a freelancer to work on your next algorithm development project? Interested in learning about the benefits of working with freelancers?

We combine PhD level mathematics expertise with expert coding skills in a wide range of languages. Furthermore, we have solid industry experience in mathematical algorithm development. We’re perfectly positioned to assist professionals in a wide range of industries as their fields become increasingly technical from a mathematical and computational perspective.

Global internet communications, the explosion of knowledge in the 21st century and the ever increasing specialization it entails means freelance consultants are a powerful new way to augment your business. According to Morgan Stanley, the freelance economy could represent more than 50% of the US working population within ten years. And as mentioned by the Financial Review, freelancers can increase a firm’s talent agility while reducing costs.

We can design all kinds of mathematical algorithms including:

Learn more about our algorithm consulting services.

Derivative Pricing Consulting – the Longstaff-Schwartz Method using Machine Learning and Optimization Techniques

Interested in pricing callable or early exercise derivatives using the Longstaff-Schwartz method? Our consulting service can design and implement a Longstaff-Schwartz algorithm to meet your specific needs, in languages like C++ and python. Learn more about our derivative pricing consulting services.

\(\)In this article we’ll make some interesting observations concerning the well-known Longstaff-Schwarz method for pricing derivatives. Specifically, we’ll look at how to determine an optimal function fitting or regression approach. Most interestingly, we’ll see that one can actually do away with function fitting altogether (!) and apply machine learning and optimization techniques in its place.

In the famous paper of Longstaff and Schwarz, the authors introduced an approach for pricing derivatives that allow for early exercise using Monte Carlo. This includes a vanilla American option and also more complicated exotic options. Their method dramatically reduces the number of paths required by assuming that the relationship between the value of the underlying (or underlyings) and the expected value of continuing (that is, not exercising yet) can be described by a smooth function. In their original paper, they illustrated their method by fitting a quadratic polynomial. This raises the question of what function fitting method should actually be used. What order polynomial should be chosen? Should a more sophisticated non-parametric fitting method be chosen which doesn’t require knowing in advance what kind of function to choose?

We’ll start with a brief recap of the Longstaff-Schwarz method.

Consider pricing an a American call option with expiry \(T\). At any earlier time \(t_0\), the value of exercising the option depends on the current underlying asset price as shown in the following graph.

This graph also gives you the fair price of the option at expiry \(T\). We consider that the option can be exercised at a set of time steps \(t_0, t_1, t_2,…,t_n = T\).

Since Longstaff-Schwartz is a Monte Carlo method, we begin by generating a large number of possible future paths for the underlying asset. We can price the option by finding the average payoff over all the asset paths. The complexity comes from the possibility of early exercise, which requires that we determine where it is optimal to exercise for each path. Once we know at which time step a given path will be exercised, the payoff for that path is simply the exercise value at the time step where it is exercised.

  • Assuming a given path reaches time \(t_n = T\) without being exercised, it is trivial to determine whether we will exercise based on whether the price is above the strike price or not.
  • At \(t_{n-1}\), we assume the option has not yet been exercised, and we have to determine whether to exercise at this step for each path. To do this we compare the value of exercising at this step with the expected value of not exercising
  • We can iterate the procedure to determine whether we will exercise earlier at time \(t_{n-2}\). Continuing to iterate, we eventually get back to \(t_0\), having determined for each path the earliest time step where it is optimal to exercise.

So pricing a derivative with early exercise comes down to determining, for each path, the expected value of continuing at each time step.

In the graph below, each blue dot represents one of the paths at some given time step \(t_i\). The horizontal axis shows the payoff from exercising at this time step, and the vertical axis shows the value of continuing based on the known future trajectory of the path. This is the value of exercising at the earliest future time step where we have determined that it is optimal to exercise. But since we wouldn’t normally know the asset path at future time steps, we need to work out the expected value of continuing.

An obvious way to do this would be to generate, for each path above, a large number of future trajectories for that path to find the expected value of continuing. But then the number of paths would grow exponentially at each time step.

The insight of Longstaff and Schwartz was that we can assume that the expected value of continuing is a smooth function of the asset price. This function can be found using some kind of function fitting or regression technique on the data in the above graph. It turns out that the least squares fitting of a set of vertical points is exactly their average. This means that regression can be viewed as a kind of average which is able to utilize paths at nearby x-values, so we do not need an inordinate number of points vertically above every asset value. The graph below shows a function fitted to the data above.

In their original paper, Longstaff and Schwartz considered using least squares to fit a simple polynomial to the data. However, the literature on function fitting is vast, and a practitioner needs to consider which method to adopt. Since a function must be fitting at each of a potentially large number of time steps, the computational efficiency of the method becomes important. This becomes even more critical when one considers the multidimensional case for basket options with more than one underlying. In this case, we must fit a function of multiple variables. Of course, one also then encounters the curse of dimensionality.

Polynomial fitting has a number of drawbacks. Firstly, a polynomial may not be the appropriate choice for some data sets. Second, you have to decide in advance what order polynomial to choose. If the order is too low, the function will not be able to fit the data. If the order is too high, it suffer from overfitting.

Another approach is to use non-parametric regression methods. For example, local linear regression fits a polynomial only locally, using only points within some “bandwidth” to do the fitting. The fitting can also be weighted so that points further away have less contribution. This is the method used to generate the graph above. However, determining an appropriate bandwidth does give rise to a similar issue to the polynomial case. If the bandwidth is too large, you will miss important function features. Too small, and you will overfit.

The efficacy of different function fitting techniques, particularly non-parametric techniques, is an interesting question. And in considering this question one would examine both the accuracy and the computation time of these methods. But as we’ll see in this article, in considering this one is lead to an even more interesting question – do we need to fit a function at all? Can we simply use optimization and machine learning techniques to determine when it is optimal to exercise?

To see why, let’s start by placing the value of exercising and the our fitting function representing the value of continuing on the same graph.

Remember that the only piece of information used in pricing is whether we are going to exercise at this time step. This in turn depends only on whether the fitted function, representing the expected value of continuing, is above or below the exercise value. In the above graph, if the asset has price around 100, it is optimal to continue (not exercise). But once the asset price passes about 122, a slightly higher average payoff comes from exercising now rather than continuing. Thus, if we know that the value of continuing is above the value of exercising on the left hand side, and “crosses over” at about 122, then we have all the information we need to price the option. The exact shape of the blue fitted function is entirely irrelevant beyond that.

This raises a very interesting question. Do we need to fit a function at all?

In the graph below, we introduce a new function labelled “linear fit”. This is a straight line that has been determined using an optimization method. Precisely, for our candidate function \(f(x)\), we have maximised the sum over all paths \(p_i = (x_i,y_i)\) of the following:

\[V(f) = \left\{\begin{array}{lr} y_i, & \text{if } f(x_i) > E(x_i)\\ E(x_i), & \text{if } f(x_i) \leq E(x_i) \end{array}\right\} \]

Here, \(E(x)\) is the function representing the value of exercising for asset price \(x\).

Actually, we first did a linear regression to come up with a rough initial approximation to use as a rough initial point for the optimization procedure. But this line has been fitted by optimization, not by regression. Note that the optimization procedure has succeeded in finding the exact crossover point at 122 of the much more sophisticated non-parametric fitting. And although a poor fit for the data, the linear fit is above and below the exercise value in exactly the right regions, so it makes exercise decisions perfectly.

So it seems like we can dispense with function fitting! The only piece of information we need are the places where the value of continuing “crosses over” the value of exercising (combined with knowing whether it is above or below in at least one region)

It’s clear that our optimization procedure will work splendidly whenever there is only one crossover point. What is there are many crossover points? One option is to use an optimization procedure to find a higher order polynomial to serve as our decision surface, as in the below illustration. We would need a polynomial of order equal to the number of crossovers.

But do we need to bother with a function at all? It does offer one advantage – the ability to use a polynomial regression to generate a rough initial point for the optimization procedure. But the astute reader will notice that what we are looking at here is really a classification problem, not a function fitting problem at all. The information we are really trying to extract is the following:

In the higher dimensional case where there is more than one underlying, the cross-over points are not points, but hypersurfaces. In the case of two underlyings for example, the cross-over boundary consists of one or more curves in the plane. Let’s consider what this would look like in the two dimensional case where there are two underlying assets to the derivative:

Here, each red “x” represents a data point where the value of exercising is greater than the value of continuing. Each blue “o” represents a data point where the reverse is true. Our task is to come up with the decision boundary which most accurately “classifies” the points into exercise vs continue. But this is looking exactly like a classification problem from machine learning! In particular, this problem is looking exactly like the sort of problem one can solve using a support vector machine (SVM)!

For the moment, we’ll leave this exploration there. Hopefully the reader has become convinced that there are some exciting possibilities for applying machine learning and optimization methods to the pricing of derivatives using the Longstaff-Schwartz method. Except, since we have dispensed with function fitting entirely, I’m not sure we can call this the Longstaff-Schwartz method anymore! Whatever it’s called, it’s an intriguing new approach to pricing derivatives with early exercise using Monte-Carlo. It would be interesting to conduct a study of these new methods and how they compare to a more conventional Longstaff-Schwartz approach.

Interested in developing code to price derivatives with early exercise? We offer derivative pricing consulting services, and a wide range of general quantitative analysis consulting services.

Monte Carlo Risk Model Development

Looking for PhD level Monte Carlo risk models for your business? We design and develop high quality Monte Carlo models in languages like python, C++ and VBA. Contact us to learn how we can help your business.

The key concept behind the Monte Carlo method is to model risk or profit by generating a very large number of future paths or outcomes. It is a conceptually simple, flexible and very powerful approach to solving mathematics which would otherwise be very difficult or impossible. And with the power of modern computers, it’s pragmatic as well.

In the financial services industry, Monte Carlo risk models have extensive applications including:

  • Market risk simulation of value at risk, calibrated to historical market data
  • Operational risk calculations, in particular aggregating lognormal distributions to calculate diversification benefit
  • Modelling and optimizing portfolio returns
  • Pricing exotic financial products and derivatives

However, risk is something that must be estimated and managed across a wide range of industries. Monte Carlo risk models are also used in a range of other industries including telecommunications, electric, and oil.

When dealing with distributions, there typically is no manageable formula to describe their many combinations. This situation frequently arises when trying to aggregate multiple risks which are not normally distributed. In other situations, the relevant distributions are not known at all and must be entirely simulated. Monte Carlo risk models are the ideal approach all but the simplest models.

In addition to developing custom-build Monte Carlo risk models, we provide a wide range of cloud-based quant consulting services, market risk advisory, and more generally, diverse mathematical modelling, research and software development services.

Are you interested in developing a Monte Carlo model to estimate risk for your business? Our mathematicians will provide you with an industry-leading solution. Contact us today.

Sensor Fusion Techniques – How to Combine the Output of Multiple Sensors

In many sensor applications there is a network of sensors observing the same phenomenon. The sensors may completely duplicate each other, or they may overlap only partially, perhaps observing different angles or aspects of the situation. They may be identical sensors or they could be sensors of entirely different types. Multiple different sensor types may be required as they may be more effective at different speeds, distances or light levels, all of which may vary throughout the observation period. The addition of multiple sensors can create a more accurate and complete picture, but their output also needs to be integrated somehow and reconciled where they disagree.

When creating algorithms to process sensor data from a network of multiple sensors, some complex mathematics can be required to “fuse” the readings together into a single coherent picture. Since modern sensing systems can generate vast amounts of data, efficient fusion algorithms are a necessity to quickly combine and condense the data into manageable quantities.

When sensors are being used to influence decision making of an automated system, deciding which sensors should be given priority and how discrepancies should be resolved can be a matter of critical importance. When the machine controls a manufacturing production line or an aeroplane’s angle, a sub-optimal algorithm that fails to manage it’s many inputs effectively could mean lost money or lost lives.

Sensor fusion can be “competitive”, where sensors present potentially differing measurements of the same quantity, or “cooperative”, where the sensors work together to build up a complete picture.

The sensing systems used to make decisions in modern technology leave little room for ineffective algorithms that can’t balance multiple sensors, or handle conflicting, erroneous or unexpected sensor input.

Sensor fusion for identical sensors making identical measurements

Let’s look first at the simplest case of sensor fusion, which occurs where multiple identical sensors have made the same measurement (this situation could also result from the same sensor making a measurement multiple times). There are two reasons why such a setup is desirable. Firstly, since sensors always have some finite accuracy limitation, multiple measurements are likely to differ due to an element of random noise. By taking multiple measurements, you can average over them to average out some of the noise. This may be a preferable solution to developing or purchasing more accurate (and more expensive) sensors. The second reason for fusing together multiple identical measurements is redundancy to handle sensor errors or sensor failure. When an aeroplane is making decisions based on the readings from a number of sensors, it is critical that it be able to identify and discard the readings from an erroneous sensor.

The simplest way to combine the output from the sensors in this case is simply to take the average of their measurements. Going a little further, if some of the sensors are known to be more accurate than others (measured by the variance in their outputs), you can give more weight to the more accurate sensors in a mathematically precise way. Going to ever further levels of complexity, one can use Kalman filters or Bayesian statistics to combine these measurements.

More problematic is that the practical realities of sensors mean that their readings don’t just suffer from statistical noise, but they can sometimes fail in ways that cause them to give completely random readings, or no reading at all. Thus, it is wise to implement algorithms that can recognise and discard outliers before inputting the data into your sensor fusion algorithm. Fault tolerance is a main motivation of multi-sensor systems in applications that require robustness.

For some applications, it may be known that the data ought to obey some functional relationship, like a straight line or exponential. In this case the averaging is effectively carried out by assuming this functional form and doing a function fitting (i.e. regression). In this case, erroneous readings and sensor errors can be eliminated using algorithms like RANSAC. Furthermore, principal component analysis can be used to discard irrelevant measurements and simplify data.

Sensor fusion for disparate sensor types or sensors making different measurements

Multiple sensors of the same type may be set up in a network to observe different angles or aspects of a situation. A simple example of this would be sensors each observing a different part of the scene, with possibly some degree of overlap. Where the sensor domains overlap, their measurements might be fused using the techniques mentioned in the previous section.

A more interesting situation occurs when sensors are set up in a way that means their readings are not directly comparable. For example, a network of sensors might be observing a scene from different angles. In this case the sensors will sometimes compete with each other, and sometimes cooperate to provide additional information that other sensors can’t see. An effective algorithm must decide which is appropriate at any given time.

Mathematical transformations on sensor data

When sensors are making measurements that are not directly equivalent (such as different angles of the same scene), their outputs cannot be immediately integrated. A similar situation occurs with sensors of different types that measure different physical properties. The sensor outputs are not estimates of the same quantities, but may imply estimates of the same quantities after mathematical calculations are performed on them. In this situation, mathematical transformations must be performed to extract the desired quantities before fusion can occur. Furthermore, their uncertainties cannot be directly compared either. Rather, the sensor uncertainties must be processed through the same calculations to determine the error in the quantities of interest. This leads to some interesting statistics when trying to fuse together the outputs of a diverse sensing system.

Sensor fusion consulting services

Muliple sensor systems are how machines observe the world. As automated devices like self-driving cars become more common, sophisticated sensing systems and the algorithms that drive them will become more mainstream.

We design sensor fusion algorithms for scientists and engineers. We also offer many other sensor data analysis consulting services. See our main article here.

Manufacturing algorithms and industrial process data science consulting

Algorithms are being used across a wide range of industries to optimize and monitor manufacturing and industrial processes. We develop algorithms in languages like python and c++ which are custom-made from scratch for your business.

While industrial optimization (or “operations research”) has existed for a while, data science and machine learning are now also finding increasing applications in industry. According to the Royal Society, demand for data scientists has more than tripled in five years. Yet, particularly in industrial applications, there is a shortage of people with the necessary skills. This makes our consulting service quite unique.

Industries left and right are being disrupted by the applications of algorithms made possible by fast processors and reams of cheap data. What can algorithms accomplish for your business? Here are a few examples:

  • Optimizing manufacturing processes to minimize cost per unit and maximize product quality. For example, assembly line balancing which is an application of the mathematical assignment problem. This also includes queuing, scheduling, shipping and supply chain problems. 
  • Predictive maintenance – predicting which machine parts are likely to fail and when, to optimize when machine parts are replaced or scheduled for maintenance. A solution must be found which optimizes how limited maintenance and replacement budget is spent, while also minimizing failure and lost profit due to downtime
  • Predicting which units are faulty early in a production line rather than late, to reduce wastage
  • Optimizing network designs to reduce costs and minimize the probability of network failure
  • Algorithms to analyse sensor data gathered from industrial processes, including multiple sensor fusion and compensating for erroneous or incomplete data.
  • Data science and machine learning techniques can be used to create algorithms that adjust themselves based on data gathered from machinery in real time.
  • See also our page on algorithms for business strategy.


The astonishing complexity of modern industrial facilities means there is a lot of money to be saved through automation, optimization and data science techniques.

Just like with the game of chess, algorithms can be either completely autonomous, or merely provide information to augment the decision making capability of human operators. Automating decisions not only allows for the more efficient use of human labor, but can in various ways improve upon human decision making. After all, an algorithm can process large amounts of relevant data, monitor the factory continuously and react more quickly.

Machine learning algorithms are in Vogue due to their ability to detect patterns and relationships in data, and automate human decision making. But not all effective algorithms need machine learning techniques.

The impact of algorithms on every aspect of the economy is only going to grow. Algorithms are taking over the world.

We develop manufacturing algorithms and provide consulting services for all kinds of industrial data science. Interested in leveraging algorithms and data science to take your industry into the digital age? Drop us a message.

Business algorithms and data-based decision making consulting services

We offer business algorithm consulting services such as:

  • Data science techniques to analyse your data and extract business value
  • Decision making algorithms in languages like python and c++
  • Algorithms to automate processes in your business, including machine learning and AI
  • Optimization algorithms to optimize business processes

Algorithmic business is the approach of using mathematical algorithms to make decisions or optimize business activities. Most companies have already recognised the importance of investing in data-driven business algorithms. Forbes has called it the golden age of algorithms. See also Fortune’s article The Algorithm CEO. In this digital era of big data and fast computers, we are already seeing the impact of algorithms on business decision making. However, there is much more to come.

You’ve no doubt heard of examples like product recommendations and advert targeting, demand-based (dynamic) pricing, and predictive forecasting. But the scope of business algorithms extends far beyond these.

In fact, business algorithms can be used in any situation where data contains relevant information, but is particularly useful where machines can leverage the data in ways humans can not. Algorithms can make decisions within a fraction of a second which is important for time-critical applications, such as stock trading. The ability to act on data in real time, rather than wait days or weeks while human eyes analyse the information can be highly advantageous for businesses. Algorithms are also capable of analysing and integrating a vast array of disparate data sources which is simply beyond the capability of a human decision maker. And machine learning algorithms can discover relationships within data that humans wouldn’t suspect.

The process typically begins by noting all the data you have available to you, or which additional data sources you need to obtain. Then, mathematicians can get to work and, through data science, develop an algorithm which can output information of business value. Algorithms can be used to forecast the future, anticipate where faults are most likely to develop in a network or manufacturing process or which patients are most likely to develop a certain disease, automate processes that previously required human labor, find mathematically optimal solutions to resource deployment, match business operations to future demand and much more.

In particular, industrial algorithms are extremely important in configuring and optimizing manufacturing and logistics operations. See our page on machine learning. To learn more about the value that an algorithm and automation consulting service can bring to your business, see how algorithm consulting is taking over the world.

So, you’re a business owner who has heard stories about how your competitors are leveraging data and algorithms , and you want to get on board. Maybe you have a specific idea you want to discuss, or you’re just broadly interested in the possibilities. Either way, feel free to drop us a message to get the conversation started.