Today we will follow up on the previous article, where we created the first portfolio of selected strategies. This time, we will focus on money management – how to effectively allocate capital between individual strategies.
Allocation of capital between strategies
Let’s say that we have, for example, 10,000 USD and shares intended for trading. Our portfolio contains 6 strategies with minimal correlation.
So how do you allocate capital between these strategies to maximize portfolio performance with minimal drawdown?
We used the tool in the previous article Portfolio Master, which is part of the StrategyQuant program, where we simulated the optimal composition of the portfolio from source strategies based on genetics. By this we said: “WHAT” we will trade.
Portfolio Composer
Today we have to ask ourselves another important question: “HOW” we will trade that.
Some strategies will trade more often, others may trade with a higher percentage of success, etc.
Today we will use another tool for this Portfolio Composer, which is also part of StrateqyQuant as of version 141. It should also be part of AlgoCloud in the future.
In this module, you can simulate different options for setting the percentage of capital allocated to individual strategies, as well as setting the total capital and possible leverage. And we can do this either manually or automatically.
Manual adjustment of scales
First we need to load strategies into the module in Portfolio composition tab.
You see a column next to each strategy Weight%, where for each strategy we set how much money we allocate to it from the total capital – i.e. we will give it some weight. The more weight, the more capital it will have.
Weight = 100% – the strategy trades with the original money management (in our case 10% of the account)
Weight = 200% – the strategy trades with twice the original money management (i.e. 20%)
Weight = 50% – the strategy trades with half of the original money management (i.e. 5%)
If we wanted to assign an equal share of the total capital to each strategy, we set the weight of each strategy to 150. This means that each strategy will have 15% of the account available, and we will keep the remaining 10% as a free reserve.
In the tab Configuration – account, MM we set:
1. Period from 1.1.1990 – 31.12.2024
2. Initial capital of 10,000 USD
3. Leverage to 1:1 (max. 1:2)
I would generally recommend leaving the leverage at 1:1, maximum at 1:2. Alpaca also offers a 1:4 leverage option, but that’s for advanced traders.
Below in the tab under the green line you can see the original money management strategy.
Then click the button Recalculate portfolio and after a while we will see the results on the right side.
In the tab Overview you can see the overall statistics of the portfolio. With this portfolio setup, we would earn a little over 86 thousand USD in total with a maximum %DD of 3.81%. Profit factor 1.45, Ret/DD 16.52, success rate almost 60% and average annual return 2.5%. It’s a decent base for such a small portfolio.
Now let’s try to enter the leverage 1:2. You can see how much of a difference it makes. The profit is 10x greater with a DrawDown of 15% and an annual return of 25%. This is the power of leverage. Warning: never adjust a larger leverage!
In the other tabs you can see a list of all trades, an Equity curve and a log file where individual trades are detailed. Here, also at the end of the log file, other portfolio statistics are listed.
Of course, you can experiment and try giving different weights to individual strategies and see how the portfolio’s performance changes.
Automatic adjustment of scales
If we have a few strategy units in the portfolio, you can try assigning weights manually. However, if there are more strategies, this approach could be very time consuming.
Fortunately, for these cases, Portfolio Composer offers an automatic calculation of weights based on the model Markowitz Efficient Frontier. This model maximizes return for a given level of risk.
How about that?
- In the tab Automatic Computation select a model Markowitz Efficient Frontier
- Choose as the fitness measure Sharpe ratio
- Set up 1000 simulations (according to PC performance) a Risk-Free Rate let’s leave it to 0,7
Then click the green button Automatic computation.
After generating 1000 simulations, a new tab is created Automatic computation simulations, where individual simulations are displayed (blue dots). Next, we see a portfolio with minimal risk displayed here (green dot) and the optimal portfolio (yellow dot). Optimal weights are loaded into the Portfolio composition tab.
Since 100% means our original risk, which is 10% of the account, we need to rewrite the table so that the percentage setting is correct. Just multiply the newly obtained weights by the number 10.
At a 1:1 leverage setting we get these results. It can be seen that with the optimal setting of the weights according to the Markowitz algorithm, we have an annual yield almost twice that of the manual assignment of the weights. That’s a decent result.
We will try a manual recalculation with optimal weights and a 1:2 leverage. A huge difference can be seen here as well. In particular, look at the average trade, which is almost 2.5 times larger than when manually setting the scales.
With this, we have set up money management for individual strategies and the entire portfolio. Of course, there can be thousands of combinations of optimal weights; all you have to do is experiment.
Try to calculate the optimal weights yourself, both manually and with the help of the Markowitz algorithm. I personally like the results, and I believe that this module will help you save a lot of time and nerves.
So we have completed the overall setup of the portfolio, and next time we will finally deploy this portfolio on a test account.
Good luck building your first portfolio.
Libor Štěpán
- How Much Money Do You Really Need to Start Real Trading?
- How AlgoCloud helped me with profitable trading
- A simple breakout strategy: detailed analysis
- Breakout Limit Strategy: Detailed study
- Rusell 1000 index: Buying dips strategy
- Trader’s view: One year with AlgoCloud & 50% profit
- Building the first portfolio