46. Capital Optimization on Multi-Algorithms System

Published at 1662395150.13342

Optimization is a common topic to improve investment results. But how can traders optimize capital allocation among different real-time trading algorithms in real-time? This article explains an approach to optimize that in real time.

Basic Approach

A simple way is to allocate a separate account for each algorithm. So that the account balance reflects each algorithm’s performance. This method is straightforward and suitable for traders who use only one single algorithm. The need for multi-algorithm optimization arises when running multiple algorithms at the same time.

To illustrate this point, let’s look at an example from the Vietnamese derivatives market:

 

Using the basic approach, we would need three separate accounts with a minimum of 40 contracts each, for a total of 120 contracts.

Integrated Approach

Another way is to merge all three algorithms into one single account. This way after integration will hold 10 short contracts (20 long contracts and 30 short contracts) instead of 50 contracts. In addition, the minimum capital will be reduced from 120 to 80 contracts. The calculation is as follows:

Minimal capital = Current portfolio + Capital balance = 10 + (20 + 10 + 40) = 80  

Comparison Between the Basic and Integrated Approach

The integrated approach can achieve the same performance as the simple approach while lowering the initial investment by 33.33%. This is a significant advantage in algorithmic trading.

 

What if all three algorithms at the same time have long positions? How does the integrated approach handle this situation?

Optimization

To answer this question, we need to consider the following factors.

 

In this context, 99% of the operational capacity means we are willing to miss one trade out of every 100 trades.

To get the right answers to the questions above, we need to check all the past trades. The trick here is to trust the law of large numbers and not stress too much about missed trades. A system that has a 20% expected return at 100% capacity will yield a 19.8% expected return at 99% capacity.

For instance, if an algorithmic trader gives these answers,

We can estimate the system’s expected return as follows:

This indicates that capital optimization has a major impact on the overall account performance.

ALGOTRADE currently opts to operate at 99% capacity. This decision ensures that the system benefits from the concurrent operation of multiple algorithms while reducing the performance loss due to missed trades. The key message is to accept missing 1-5% of trades for the greater good of the entire system.

Implementation

  • Accounting feature. We need an internal accounting system to separate the trade records and the algorithms’ performance since they all run on the same account.

  • Risk management feature. A multi-algorithm account can face a domino effect that can stop the entire system or cause huge losses. We need proper risk management to ensure the safe operation of the whole system. Also, we need to prepare for the scenario of zero capital balance, in case the system sends continuous requests and accidentally causes a DDoS attack on the broker’s server.

  • Queuing feature. Sort signals by priority queue where delayed signals are listed in the 1% - 5% rare and never executed. In Vietnam’s algorithmic trading environment, we can limit latency to 100 milliseconds.

Optimizing the capital for multi-algorithm trading will be a big challenge in the beginning, but the rewards will be well worth it. Professional algorithmic traders should seriously consider this optimization to scale the system exponentially.