Evolutionary Trading Algorithms

Image © Yurchanka-Siarhei , Shutterstock.

Picture a tiny living algorithm… a cell within a digital realm… Imagine cells forming tissue, organs, and a whole organism resulting from a hierarchy of all sorts of algos. Now, visualize such AI trading at the markets.

By Luis Molina & Julian Molina

In artificial intelligence, evolutionary algorithms are inspired by biological evolution, a notion encompassing reproduction, mutation, recombination and selection.

How would evolutionary trading algorithms look like?

That’s the question that has kept me awake for the last couple of years.

This article is the first leg of a journey that will take us deep into the fascinating world of artificial life, where we will discover a financial biosphere inhabited by autonomous agents who live or die depending on their ability to perform in the markets.

Evolutionary Model

Attempting to envision such biosphere abundant with beings specialized in trading requires certain prior abstractions.

The first thing we need is an Evolutionary Model, coupled with an evolutionary goal so as to drive advancement in a certain direction.

Nature’s biological model is based on evolution by natural selection, with three main characteristics:

  1. Traits vary among individuals.
  2. Different traits confer different rates of survival and reproduction.
  3. Desirable traits can be passed on through generations.

Arguably, the goal of biological evolution is to ensure species’ survival by adaptation to the environment. The fact that individuals become more intelligent in successive generations is a consequence of the primary goal, rather than a goal in itself.

Our model for evolutionary trading algorithms sets a similar goal: the survival of species. However, in our model, survival is the means to a higher end, which is intelligence. We do expect individuals to become more intelligent over time.

The Smallest Unit of Life

“A cell is the basic structural, functional, and biological unit of all known living organisms. It is the smallest unit of life, often called the building blocks of life. ”

In our digital realm, the equivalent to a cell is an algorithm implementing a single elementary trading strategy.

Let’s call those algobots.

So, what does an algobot do?

In a nutshell, it decides when to buy or sell the assets under management based on the information available to it.

Thus, an algobot needs to have access to data on which it applies a certain logic. As a result, it makes a decision, which most times comes down to doing nothing, while occasionally may involve buying or selling assets.

To be successful in its trade, pun intended, an algobot also needs to have memory, so as to remember at least what assets it has at the time it needs to make a decision.

Like cells, algobots are the smallest units of life and the smallest building blocks in the universe we are imagining.

Main properties of algobots

In our algorithmic universe there is no biological life. Instead, living organisms such as algobots have a financial life.

Now, what may that mean?

Financial Life

The field of research in which systems related to biological life are examined in an attempt to recreate some of its aspects is called artificial life. Artificial life, therefore, happens in artificial environments, many times through simulations, either in the realm of software, hardware and even biochemistry.

We define financial life as a type of artificial life in which agents are alive as long as they have enough money to pay for their expenses.

This means that agents need to have an income for a job they do and use that income to pay for the expenses they incur while doing their jobs.

The most important property of financial life is that agents who run out of money, die.

This property implies that agents need to start off with some money. Actually, they need to start off with enough money to go by until they are able to get a stable income.

The way agents get an income is by creating something of value and finding an entity willing to pay for the value created.

In the case of algobots, they produce value by trading at the markets.

The aforementioned property raises a question: who finances algobots until they manage to get a stable income?

An intuitive answer would be the human who wrote the algobot’s code.

That may be true in some cases. But… what if the agent was created by another algorithm? A higher order entity to which the algobot responds to?

Or what if the agent accumulated enough money to divide itself in two different entities, like cells do?

May algobots be created within more complex entities? May algobots have a function adjacent to their main mission trading at the markets? May they have a higher level purpose that becomes apparent only when looking at the bigger picture?

In nature, multi-cellular organisms feature highly complex structures that allow them to develop incredible capacities, way beyond the reach of unicellular organisms, the most intriguing of which may be intelligence.

Remember intelligence is the ultimate goal of our evolutionary model, thus, the above is a clear hint to one of the fundamental requirements for trading intelligence: multicellularity.

The next question raised by the earn-money-or-die property is: who pays for algobots services?

Again, the simple, intuitive answer would be humans with investable assets. After all, it’s only natural that savvy investors would want to make a profit out of these little creatures, right?

In fact, a marketplace of algobots might constitute a first layer of natural selection in the evolutionary model, since investors would naturally hire the best algobots and let the less proficient ones die.

It surely makes sense.

But there’s more to it!

What if other algorithms could benefit from algobots’ work?

What if higher order entities could use different algobots to develop a higher order intelligence than the sum of the parts?

“In philosophy, systems theory, science, and art, emergence is the condition of an entity having properties its parts do not have, due to interactions among the parts.”

In advanced forms of biological life, intelligence may as well be an emergent property of other phenomena like evolution, development and learning.

Systems theory borrows countless concepts and ideas originating in biology. One other such notion is that of autopoiesis, a system’s capacity of reproducing and maintaining itself. It would be extremely interesting if we could devise a system with such a property.

In our next article we will explore all of these questions, along with ideas about combining multiple instances of the same algobot with different genes, as well as the properties that emerge in such arrangements.

We will discover how a higher order trading organism would benefit from being capable to learn by deploying a swarm of algobots.

Those are the next steps into devising increasingly complex trading organisms with the capacity to evolve into a superalgos.

So far, we’ve met only the unicellular beings — the bacteria — of our imaginary financial biosphere.

I have the feeling that we are barely scratching the surface…

To get a notification as soon as the next article in the series comes out, you may want to follow me on Medium or Twitter.

If you liked this piece, you might also like these other pieces about related topics:

Superalgos & The Trading Singularity

“One day in the future, a trading intelligence capable of outperforming every other entity at the markets will emerge. Both humans and current algorithms will be surpassed by Superalgos.”

Superalgos: Building a Trading Supermind

“A supermind of humans and machines thinking and working together, doing everything required to maximize the group’s collective intelligence so as to minimize the time needed for superalgos to emerge is being built right now.”

How to Monetize Your Algorithmic Trading Experience

“It costed you blood, sweat and tears to become an algo trader… how did that play out for you? If the answer is anything other than “I don’t ever need to work again”, then you need to read this.”

A bit about me: I am an entrepreneur who started his career long time ago designing and building banking systems. After developing many interesting ideas through the years, I started Superalgos in 2017. Finally, the project of a lifetime.

Follow Superalgos on Twitter or Facebook; or visit us on Telegram or at our web site.