AI, Machine Learning and Algorithmic Decision-Making in Trading

AI, Machine Learning and Algorithmic Decision-Making in Trading

Increasingly, decision-making in the markets is done through artificial intelligence (AI), machine learning, and algorithmic decision-making. 

Back in the 1990s and even into the 2000s and today, much analysis on financial markets and securities was done on spreadsheet programs like Microsoft Excel.

That’s now changing to more complex ways of analyzing the world.

The human brain is constrained in terms of how much data it can process and how well it can do it. In many respects, machines can do it faster, better, and less emotionally. They don’t care if their answers are popular or not, whereas humans are subject to the “wisdom” and pull of crowds.

Fundamentally, artificial intelligence, machine learning, and other complex analysis systems want to understand the cause and effect linkages behind the economy and the markets they’re trying to understand. 

They then take that understanding to develop rules that can be stress-tested across time, geography, markets, and different environments

For instance, when a country is undergoing a recession when short-term interest rates are at zero, how do various types of assets behave – e.g., stocks, nominal-rate government bonds, inflation-linked bonds (ILBs), oil, gold, and so on. 

Users of this technology and type of decision-making can then use this information to systematically improve how they trade and what kind of portfolios they create.

 

Limitations of AI and Machine Learning

These days, with cheap computing power, it’s easy to feed lots of data into a computer about a particular thing you’re trying to figure out and come up with algorithms of what to do.

But it also depends on what’s fed into the machines.

Is what you’re generating causal and useful to whatever you’re trying to apply it toward? Or is it just data-mined nonsense?

Over-optimization is a big problem. Many traders build systems that look at recent history and use that to inform their trading and portfolio construction decisions. 

But if what you’re feeding into the machine worked in the past and the future is different from the past, that’s probably going to be something you need to be very careful about.

AI and machine learning does well in situations where the past – what the data are based on – is a good representation of the future. 

Chess programs would be a good example. 

By studying past games, and being chess is a closed system with rules that don’t change – where all the possible permutations of the game can theoretically be known – you can develop a chess system that is more powerful and can play better than any human could ever hope to achieve.

Another example would be surgical operations. For many types of surgeries, every human body is basically the same. So AI and machine learning can open up an avenue where certain surgeries can be more efficiently done with its use.

But trading and investing is more complex. It’s an open system and what worked in the past can’t necessarily be a good guide for the future.

It’s easy for an investing or trading system to fall out of sync with reality. 

So much can come up that’s outside the main analysis.

Covid-19 and pandemics would be an example. It can also include natural disasters and other types of events that have an impact on economies and financial markets that nobody has discounted in because they simply can’t be anticipated.

Computers also lack common sense and imagination.

A computer could look at a situation where you regularly eat breakfast before the sun rises and come to the conclusion that your eating may be causing the sun to rise. 

You need to be able to argue the logic behind decisions.

Too many invest blind faith in something they don’t have the deep understanding of. It may be easier to simply trust a system because it takes less effort, but without deeply understanding what it’s doing it can be dangerous. 

 

Forming decision rules

For any decision you make in the markets it can be helpful to write down your criteria for making the decision. 

  • Why did you make it?
  • What was the result?
  • How can you refine it over time?

One example might be having more exposure to a currency if its real interest rate increases. That’s a logically driven reason why you may want to own it (i.e., it yields more). If a currency yields more, it’s worth more, holding all else equal.

Or owning more gold relative to the reference currency (dollars per ounce, euros per ounce, etc.) if currency and reserves in the currency increase beyond the production of the global gold stock. 

Above all, whatever the decision rules are, they have to be logical. 

Can someone point to that and understand its logic or is just being blindly followed?

 

AI and machine learning and the impact on the market

If more of the market is based on machine learning and the bulk of that is going off things that have worked in the past that may not be representative of the future, then that can dictate market action in a riskier way. 

It also inherently means historical data is less useful. It changes market action and it also therefore changes future prices and future data in the market.

That can also lead to bad decision-making because it becomes out of sync with what’s really going on. 

Just because something went one way in the past five years doesn’t mean that’s a good indicator of how it should act going forward. 

A new asset class like cryptocurrencies is an example. There’s limited history and anyone trying to use machine learning from past data might find themselves in a dangerous situation.

But at any point in time, if people can find an optimizer in some way, they’ll use it until it breaks and doesn’t work anymore.

 

AI and algorithmic decision-making produces leverage

Trading the markets there’s already a lot of stress on your brain. There are many, many things happening and you can’t possibly keep track of everything.

If the decision-making criteria can be coded in, the computer can work with that in real-time. 

Then instead of thinking about the overabundance of things coming at you, you can pay attention to what it’s getting wrong and why in order to help improve those formulas (algorithms) over time. 

You can also devise if/then statements. For example, if the price of oil rises, that makes people with oil richer, and the people who don’t have oil, but need oil, see their margins squeezed in some way. 

It also produces a flow of capital from one area to another. The balance of payments of oil-exporting countries improves, holding all else equal, while that of oil-importing countries decreases. 

That impacts their currencies depending on the extent, which has to be measured. 

As that capital moves, it impacts things like growth and inflation. And there are distributional effects because it impacts each country differently. 

The trading and investment business is increasingly going this way. The marginal cost of code is zero. So that’s good for margins. It also reduces the marginal cost of decision-making if the computer/decision-making system is doing that alongside or even in lieu of humans. 

 

The importance of readability by both humans and machines

It’s possible to do analysis in Excel, such as on financial securities. But spreadsheets can be limiting when you have to do lots of data at scale.

If algorithms are done in pure programming languages (e.g., C++) then it can be hard for non-programmers to know what’s in the rules and be able to stress-test them, changing inputs to determine how that impacts outputs. 

The logic behind the algorithms should be available to all types of traders and investors, so that it’s clear. And how to use it when it’s relevant and when not to use it when it’s not relevant. 

If it’s not intuitive to most people, then it’s difficult for people to play around with the data to understand what’s absent from it and what is wrong and/or what can go wrong. The data, logic, and visualization aspects are very important.

When everything you know, or your firm knows, about the markets is being consistently applied, then all you need to think about is focusing on what you’re missing.

There is information that can come from being wrong and refining the decision rules. For example, if your trading system didn’t handle the 2020 pandemic well, what can you learn from that?

And there’s also information that can be input from the outside about how the world might be changing.

For example, the pandemic stressed a lot of systems because something like that (plagues, natural disasters) happen very infrequently. 

The same is true when short-term interest rates hit zero. That happens infrequently over the course of history. But it has implications when you can no longer lower rates to encourage credit creation and get an expansion.

Wartime economies are another, where there are typically large fiscal deficits and capital controls. 

These are all situations where inputting a bunch of data or algorithms based on normal economic situations is likely to be suboptimal in helping you navigate.

So, in developing artificial intelligence and algorithmic decision-making there needs to be a process for integrating things that might be missing, as markets are dynamic. 

If you’re aware of something, you’ll probably do something about it – e.g., what a pandemic can do to risk appetite – but if oblivious to something, it can be very destructive. 

 

Evidence-based decision-making

Trading needs to be based on evidence, not on faith. Most traders end up losing a lot of money because they bet on faith or get “hot tips” from somewhere and it’s hard to win like that.

Because they heard company XYZ is innovative or they hear people making a lot of money in it, they decide to get in as well. Doing so, they’re more likely to get in closer to market tops rather than when something is out of favor. 

Assets look like better investments when they go up and worse investments when they go down. Humans are more likely to fall prey to this than machines because of the emotional component.

A machine is more likely to rationally calculate risk premiums and make more informed decisions on a value basis, if that’s part of how the machine is programmed.

Take the example of the Peter Lynch Fidelity Magellan Fund. This was the most successful mutual fund of all time, earning 29.2 percent annualized returns from 1977 to 1990.

Yet supposedly, the average person who invested managed to lose money.

When the environment was favorable toward good investment returns in equities and the results were excellent, people wanted to buy in and the fund took in more inflows.

Yet when it had spells where it did poorly people got sold out of it, which is the typical reaction of a human trader or investor.

This type of behavior led to buying toward the tops and selling at the bottoms. And when people need to sell assets to meet their payments it’s usually when things are bad, and that exacerbates the sell-off.

When things do well, people look at the past and assume it’ll continue to be that way going forward. When things go poorly, people assume that it’s a bad investment rather than a cheaper market that may be worth adding to.

A computer can do something like this quite well, whereas a human can’t monitor everything and there’s the difficulty of buying into a falling market.

For example, if you want to short something because you think it’s a bubble, then you should write down what your criteria for being a bubble is (e.g., valuations high by traditional metrics, new buyers entering into the market).

Then stress test it to see if it’s worked in other timeframes and in other places and markets. That way if it’s eventually put into the system it can be applied everywhere. You don’t have to be constantly searching for it if the computer can help you do the work. 

In the early 1990s, computers did only about 5 percent of the work in financial markets in terms of algorithmic decision-making. By 2021, they were responsible for more than 50 percent of the trade activity.

 

Algorithms designed by experts vs. machine learning generated algorithms

There are algorithms that can be designed by experts and those that can be generated from the machines themselves.

It’s straightforward that an investor or trader can go to a programmer and say what their criteria are for a decision and have that written into code that can then be stress-tested and potentially used for making actual trades with. 

A different process is having machines come up with their own algorithms.

Computers are very good at always remembering/storing things and they have more “determination” than humans, as they can work around the clock. 

They can also process in ways that humans can’t, though they lack imagination and common sense, and what they produce in terms of algorithms can be gibberish (i.e., non-causal conclusions between two or more phenomena).

Increasingly in the trading and investing world, there’s more of an approach toward machine learning

Naturally, as computing power becomes better and cheaper and more data becomes available, there’s more of a focus on going the route of computers taking all that in and looking for patterns. 

There’s more scalability and it’s easier.

But this is dangerous because it relies on the data being fed into it being a reliable representation of what the future will hold. 

On top of that, if a decision rule is widely used, it becomes integrated into the price and moves markets. The value of an insight that’s widely known disappears over time. 

Without knowing what the algorithms are doing at a deep level, you won’t be able to know if all the data that’s been fed into the system is of genuine value. 

And things that may have once had value may no longer have value because they’ve become so widely known and baked in that their value has disappeared. Markets always reflect the discounted set of expectations. 

In fact, if some decision rules become so popular that they push the price in a certain direction it can become better to do the opposite.

So, it’s very important to know why the algorithms that make up the machine “think” the way they think and why they’re programmed the way they are.

With machine learning there’s greater potential to do more and more since it can do a lot of the work in making the decision rules for you.

It’s great if the data is reflective of what you’re going to experience within the data sample.

But it’s very difficult for that to work reliably in markets.

Even if you have thousands of years of interest rate data and hundreds of years of equity, bond, commodity, and exchange rate data, you can’t be sure that that data is representative of what will transpire going forward.

For example, in 5,000 years of interest rate data, you’ve never seen negative nominal interest rates. This is reflective of the fact that central banks are buying short-term and some long-term securities to keep interest rates repressed for the sake of improving their economies. 

And what happened in the past is just one iteration of what could have happened when many different things could have been possible. 

Nothing is certain in markets. Looking at over 200 years of financial data, there hasn’t been a single decade that there was at least a 50 to 80 percent (or more) drop in at least one asset class (stocks, bonds, gold, commodities, and even cash). What you don’t know is always greater than whatever you do know and can be relatively sure about (which is little).

Everything in trading is about probabilities, distributions, and expected values. There’s never one outcome that’s certain and trades and portfolios have to be structured in a way that recognizes this. 

 

Other ways of finding value from machine learning

Machine learning doesn’t have to be just related to the trading or investment side of things. 

There are other parts of the trading business that are more of a “closed system” where it can be useful. 

For example, you can potentially make more of your hiring with AI tools.

Transaction costs is an under-talked about aspect of the trading business.

Due to spreads, commissions, interest costs, execution, and so on, transaction costs can add up to a lot. Even if they seem ostensibly cheap, they add up to quite a bit. And accordingly they matter a lot, especially for HFTs and other traders who are getting in and out of markets frequently. 

Machine learning can be used to potentially spot some patterns in your transaction costs that you might not otherwise be able to find. 

It can also be used to potentially change the weights on different things as part of your criteria. So, it can be a feed-in for potential process enhancement even if it’s not responsible for your outputs because it doesn’t make sense or you’re not yet comfortable. 

In these cases – e.g., trends in transaction costs – you know previous data can do a good job of being representative of something that machine learning can potentially be of use for.

For now, especially in trading and investing, both humans and machines are very important given the complex, open system nature of the financial markets. 

But naturally, machines are becoming increasingly important and influential each year. And everybody is using it in a way that’s largely unique to them.

This is good in some ways if the cause-effect relationships are well-known behind what’s being done. It can help make capital allocation faster and more efficient. That’s a positive for the economy and society as a whole.

But it can be bad in other ways if the limits to it aren’t well understood and the underlying process or basis behind it is suboptimal. 

Initially this was one of the criticisms of the idea of artificial intelligence in trading and investing, starting long ago when it first began gaining more steam and popular adoption (i.e., 1990s).

Because the world changes so much, it’s a much more complex problem than designing a computer that could beat any human at the game of chess, which was achieved later in the decade. Now computers teach humans and no human is a match for the best computer chess engines. And, of course, they now come in app form, not bulky supercomputers.

Ultimately, if you’re a trader or investor looking to use AI and machine learning for algorithmic decision-making or already do and are looking to improve, you ultimately have to do it in a way where you deeply understand the logic behind what you’re doing. 

Just like if you’re hiring traders to work for you, you’re going to want them to prove it before you give them more leash. Algorithms need to be held to the same standard and not be blindly trusted.

There are machine learning techniques that can allow traders to pull out the logic for them and understand whether it’s something that they’re comfortable with. 

 

Two process improvements that can be helpful to traders

Many traders and investors still do a lot of their analysis on spreadsheets. This is good for some things, but limiting when trying to do things at scale. 

However, as mentioned earlier in the article, if you go to traditional programming languages, you take the risk of the people coming up with the logic being too far removed from it if they don’t understand the underlying code. 

Trading/investing and coding are two different skill sets.

Traders can come up with logic they believe to be true, but if they can’t understand the code that can be a problem. 

So:

1) Ideally have everything in code that is fast and efficient and can even execute the trades in real-time, but also have it be available to non-coders so it can be immediately understood. 

Can a non-technologist have the ability to adjust the inputs and change the logic and be able to understand how the outputs would be affected? 

And another aspect comes with approach.

2) Can processes be reconciled?

For example, if you have a top-down understanding of the world, such as trends and levels of growth, inflation, interest rates, these will also have impacts that flow down to the entity level – each country, government, company, and individual or household. 

Can you also build that back up from bottom to top so that the two approaches reconcile?

Can the decisions of each household (e.g., deciles, quintiles), company, and government be measured to build the units back up to the whole?

What are their decisions at the more micro level and how does that influence growth, inflation, and the overall macro picture? 

 

Types of skills/people needed to adopt AI and algorithmic decision-making

Within the context of the skills or people you need to build an effective system, you need two or three main groups of people. 

1) investment people who focus on how economies and markets work

2) coders who can put those ideas into action

3) liaisons who can help tie the two together (e.g., project managers) 

The investment people strive to put their thoughts on the table of what is true about the world, economies, and markets and debate it and think about how to put that into actionable ideas.

Coders can help build out the platform. 

Then there’s a group in the middle that can be useful to help bridge the gap between the two. 

For example, among the investment side, you can have people who specialize in how governments function, or economics, and more big picture thinkers who are not technical. 

In the middle, you have those are more technical – math, physics, computer science – but not necessarily hardcore coders.

And then you have those who can turn ideas into algorithms that can be stress-tested and potentially integrated into your system to trade with. They’re the ones who take data and logic, and can help with the visualization aspect to help make it broadly accessible. 

How to find each type

Investment people don’t necessarily need to be business or economics majors, or math, engineering, and other technical disciplines that are looked at favorably. No matter what someone studied, if they have raw talent and aptitude even an English or humanities major can bring something to the table.

However, on the technology side, that probably isn’t going to work as well.

Having those who can come in and turn those ideas into specific code, tying data with logic, and making it broadly available is something that’s difficult to simply have raw talent figure out. 

 

Implications of AI and algorithmic decision-making more broadly

AI has big implications in a variety of ways.

Traditionally, when you build out most things, there’s a variable cost to it. For example, if you build housing, there’s the cost associated with land, building materials, and labor.

With AI and machine learning, the variable costs can be very low. The marginal cost of code is effectively zero. And for organizations that employ AI and algorithmic decision-making, that means the marginal cost of making decisions also goes down to around zero. 

And decision-making is largely what many people get paid for. A lot of the execution is already automated in various respects. 

Automating away more of the decision-making itself is a big deal and is the next phase. Because these machines can out-compete humans on a lot of things. 

And when some labor costs are removed and machines are put in and the cost of operating those machines is very low relative to a human worker, that has big implications for profit margins and winner-take-all types of businesses. 

And human workers are not just wages, but also require benefits and additional workers are needed to support them. They also can’t work 24 hours a day like some machines can.

What this means for individual companies also has implications for things like inflation and monetary policy. Traditionally, central bankers think in terms of an unemployment and inflation trade-off. 

When unemployment gets low they expect inflation to move higher. But that relationship isn’t what it was. The economy isn’t just labor and people like it use to be; it’s also technology and increasingly becoming more that way. 

And technology has a different dynamic than people. Technology tends to get better over time and it has a fixed cost but not necessarily much in the way of variable costs. As mentioned, the marginal cost of code is essentially zero. It can also work more and do more, both faster and more accurately. 

For people and companies that use AI and machine learning well, they’ll be able to have a big competitive advantage over those that don’t. The investment management business is becoming more technologically intensive, as are many other industries. 

It also has impacts socially. There’s a feed-through into issues like the wealth gap and opportunity gaps that’s driving more social tension. These types of things have happened throughout history.

These changes can help drive better productivity outcomes for the whole. As a whole, societies become more productive as more learning is gained than lost. But there are distributional effects.

Lower-skilled labor can be easily displaced while the demand for other types of labor increases – i.e., the demand for those who can design the platform and provide valuable inputs. 

Entire companies are examples.

Uber, for instance, makes transport and ride-hailing easier. People who have spare capacity in their cars can rent it out and make extra income.

It’s good for customers because they get convenience and cheaper rides. It’s good for investors who commercialize the idea. As an innovative business idea, the equity becomes valuable based on the discounted expectations. It can ultimately turn out very well in the long term if it turns out to be economically viable. 

But it’s bad for other types of companies (traditional taxi services) and other types of labor.

It also ties into other policy issues like where wage floors should be.

Traditionally, about two percent of workers in the US work at minimum wage. And whether that minimum hourly wage should be $10, $15, or a different figure isn’t so much important, as it all boils down to productivity.

By and large, if debts never exceeded incomes and incomes never exceeded productivity the classic economic problems and cycles we have would not occur.

In general, there needs to be a certain amount of output otherwise the relationship isn’t sustainable. Higher wage floors can encourage actions that don’t necessarily benefit labor.

Certain tasks can be replaced with technology, offshoring, and/or outsourcing. In 2013, McKinsey estimated that $9 trillion in global wage costs can be eliminated this way. And 2013 was a long time ago, so that estimation based on the same methodology would be well north of $10 trillion today given how quickly AI and machine learning are advancing.

It is not legislatively effective to pay $X if the productivity/value isn’t commensurate with that level of compensation.

The basic issue is that there are these forces displacing certain kinds of people without retraining and retooling them to participate in other types of employment.

This also won’t show up in traditional unemployment statistics. Because of the rapid pace of technology and the offshoring that’s already occurred, it’s generally a bad economy for the low-skilled worker and this is driving social tensions and the big splits politically and the type of people that get elected reflect this.

From a policy standpoint, the question is how do you help fix that? 

Do you give regulatory/tax breaks to companies that retool and retrain workers? 

Does it come in some form of a universal basic income (UBI) for displaced workers?

 

Did the pandemic change anything associated with the adoption of AI and machine learning?

On the investment side, not much has changed. 

As mentioned before, if you’re using AI and machine learning but you’re encountering a new type of problem you haven’t encountered before and you’re expecting the machine to handle it well based on historical data, you will probably have an issue.

But you already knew that before.

The pandemic has accelerated some trends that were already in place. Those that have been using AI and machine learning have been able to scale, so the winners have become increasingly centralized. 

And there’s also been an acceleration of the government’s response to it and how this impacts individual firms and the overall macro environment if you’re an investor. 

Because of the lesser effectiveness of monetary policy, with short-term and long-term interest rates around zero at all parts of the sovereign yield curves of developed countries, that’s put more of the burden of stimulating the economy on the fiscal government. 

If you’re using AI and machine learning to help you navigate this, it won’t be in the data unless you’ve studied periods like this before (e.g., war periods like World War I and World War II) where similar constraints were also a factor. 

Fiscal policy took more of a role in these situations and are comparable to today relative to recent history. 

Recent history doesn’t have the precedent needed to deal with the potential market outcomes when politicians take over more of the role for the economy relative to central bankers moving interest rates to change the economics of borrowing and lending. 

 

Conclusion

AI, machine learning, and algorithmic decision-making will have a bigger role to play in the markets going forward, and it will be used in different ways.

AI and machine learning do a good job when the past is a good representation of the future such that you can have a strong belief that your machine can do a good job of matching inputs with appropriate outputs. 

But when what’s happening is different from the past and the past is what the machine is based on, that can be dangerous and it should be approached with caution.

by