Portfolio Trading

The ability to efficiently trade a portfolio of multiple strategies and/or markets is one of the biggest advantages of algorithmic trading.

Portfolio composition does not seem to have received much attention in the trading literature, possibly due to its open-ended and complex nature. You could be trading a single strategy on multiple markets, multiple strategies on a single market, or multiple strategies on multiple markets.

You are likely to encounter the following challenges when building your portfolio:

  • Evaluating strategy correlations
  • Selecting the top-performing strategies
  • Implementing position sizing

Practical solutions to each of these challenges will be discussed. Hopefully this article will give you a head start in composing a portfolio that meets your own trading goals and preferences.

But first, let’s talk about the advantages of portfolio trading.

Benefits of Portfolio Trading

Portfolio trading usually requires a variety of strategies that have been backtested over different markets. Developing these additional strategies, and subsequently monitoring them in live trading, certainly requires effort.

In return for this, you will enjoy the following benefits:

Improved Risk-adjusted Returns

A diverse portfolio consisting of largely uncorrelated strategies will produce higher risk-adjusted returns. Let’s illustrate this using the return/maximum drawdown ratio (Ret/DD) for the portfolio. 

Below is the equity curve of a portfolio that will henceforth be used to demonstrate the portfolio composition process.

This portfolio consists of 9 strategies, across 2 markets and 4 timeframes. The performance of each constituent strategy is also overlaid on the chart.

The portfolio Ret/DD is over double the average Ret/DD across the 9 strategies. Why is that?

Your portfolio return is simply the sum of each individual strategy’s returns. On the other hand, because each strategy’s drawdowns will occur at different points in time, the portfolio drawdown is less than the sum of the drawdowns from each individual strategy. The net effect is a higher Ret/DD. Your portfolio equity curve is also likely to be smoother, with fewer deep drawdowns.

These benefits of diversification are only possible if your individual strategies are sufficiently uncorrelated. Later on in this article, we will discuss how to measure these correlations, and how to develop uncorrelated strategies.

Less Reliance on a Single Strategy

The sad reality is that very few strategies can retain their trading edge indefinitely. Even the most robust strategy will periodically struggle when market conditions change.

If you trade a single trend strategy, you will struggle if the markets go flat. Likewise, a purely countertrend approach will not work in times of economic turmoil. If you trade both trend and countertrend strategies, it is likely that your trend strategies will perform well when your countertrend ones struggle, and vice versa.

Trading a diverse portfolio of strategies, and keeping a number of ‘backup’ strategies on the sidelines, makes you more adaptable to changing market conditions.

Faster Strategy Development

Due to the increased risk-adjusted returns that portfolio trading offers, you can afford to lower your performance goals for your individual strategies.

Developing a decent strategy takes far less time than iterating through countless ideas in hopes of discovering a great strategy. Time is money, and a well-constructed portfolio of decent strategies will likely help you reach your trading goals much faster.

Looking at the equity curves above, none of the 9 strategies that make up the portfolio are particularly outstanding, but combining them produces good portfolio performance.

Broadly speaking, there are 3 factors that I consider when selecting strategies for a portfolio: Correlations, performance, and position sizing. All these factors need to be considered when altering the strategy makeup of your portfolio. Portfolio composition is a dynamic and ongoing process; you will likely make periodic changes to the portfolio as you trade it live.

Strategy Correlations

What Are Correlations, and How Do You Measure Them?

Correlation is the extent to which two data sets move in the same direction at the same time, and is commonly measured using the Pearson correlation coefficient.

If two data sets are perfectly correlated, they rise and fall at the same time, and the correlation coefficient equals 1. If they are perfectly negatively correlated, one rises while the other falls, and the coefficient equals -1. Data sets moving independently of each other produce a coefficient of 0.

Correlations between market prices are commonly available online, but it is more relevant to evaluate the correlations between the equity changes of each strategy. In other words, we want to determine whether the strategies tend to win or lose at the same time.

Your trading timeframe will dictate whether daily, weekly or even monthly equity changes will be most appropriate. If you are a day trader, daily equity changes will make sense. If you are a long-term trend follower, monthly changes might be a better choice.

When you calculate the correlations between the strategies in your portfolio, you will get a correlation matrix like the one below. Both StrategyQuant and QuantAnalyzer can do this easily.

The correlation matrix above is from the 9-strategy portfolio described earlier. Ideally, I want all the correlation coefficients to be as close to 0 as possible. I consider coefficients in the 0.4-0.7 range to be significant. Anything above 0.7 indicates very strong correlation. Such occurrences are best minimized unless the strategies exhibit great performance. For the matrix above, the single 0.68 coefficient (between CT5 and CT6) across the 9 strategies is acceptable.

An indirect way to measure correlations between your strategies is to calculate your portfolio’s risk-adjusted returns. A portfolio consisting of lowly correlated strategies typically exhibits higher risk-adjusted returns than any of its individual strategies.

Again using the return/maximum drawdown (Ret/DD) ratio as an example, the individual strategies in the portfolio above have Ret/DD values ranging from 4.2 to 10.6, while the portfolio Ret/DD is 11.3. If your strategies are highly correlated, they will experience drawdowns at the same time, and the improvement in Ret/DD will be far less.

It should be noted that correlations tend to shift over time, perhaps due to underlying economic conditions.

The matrix above was constructed using 12-year backtests from each of the strategies; recomputing the matrix using only the last 2 years of trading results would have produced different correlation values.

How often you recompute your portfolio correlations depends on your trading timeframe. If you are a day trader, you may wish to recheck your correlations every few months.

Correlations also tend to break down during times of crises, when there will be a widespread exodus towards safe-haven assets. Staying out of the market may be the most prudent option during such times.

How Can You Create Uncorrelated Strategies?

Building a diverse portfolio containing uncorrelated strategies is not as daunting as it sounds. The idea is to reduce the likelihood of being in the same market, in the same direction, at the same time.

A great way to reduce correlations is to incorporate both trend following and countertrend strategies in your portfolio. You could have a trend strategy that trades breakouts at the London open, complemented by a night scalper that only trades after the New York close. Such strategies are less likely to be in the markets at the same time.

Even if you adopt a pure trend following approach, you may develop strategies using conceptually different entries. One strategy could use time-based averages for entry, such as a moving average crossover strategy, while another could use a volatility-based indicator such as the Bollinger bands.

Having different exits creates diversification too. Strategies using trailing stops tend to remain in the market for longer periods, and are thus great at capturing outsized gains. The opposite is true for profit targets.

If you only trade one strategy, you will have fewer options when diversifying your portfolio. Your best bet would be to trade that strategy across multiple markets and timeframes.

Performance Ranking

Hopefully your development efforts have yielded a basket of profitable strategies, from which you will select the best performers to form your portfolio.

Deciding how to rank your strategies’ performance is largely a matter of personal preference. If you’re using MT4’s Strategy Tester report, you can use the profit factor or the net profit/maximum drawdown ratio. Those metrics complement each other well.

The table below shows an example of a ranking list I created when building the 9-strategy portfolio above.

I used the annualized return divided by the Ulcer index (AR/UI) as my ranking metric. The annualized return is the total return divided by the number of years in the backtest, while the Ulcer Index is the root-mean-square drawdown experienced over the backtest.

The Ulcer Index essentially measures the average drawdown, although larger drawdown values are given a higher weightage in the computation. I consider it a more reliable estimate of risk than the single-value maximum drawdown.

In the list above, I selected 3 trend strategies (T1-T3), and 6 countertrend strategies (CT1-CT6). Strategies T4, T5 and T6 were not selected due to high correlations, although they had strong AR/UI values.

If you trade futures, the numerous markets are conveniently grouped into categories such as the financials, energies and metals. The markets within the same group tend to be highly correlated. Picking a number of high-performing strategies from each group is a good way to maximize performance without sacrificing diversification.

Position Sizing

My preference is to backtest with a fixed lot size during the development process. This makes it easier to evaluate the strategy’s consistency over the course of the backtest. I only implement position sizing during portfolio composition.

As long as your capital allows it, some form of position sizing should be used in actual trading. Position sizing allows you to compound your equity returns during profitable periods, and to preserve your capital during drawdowns.

Like any other strategy element, your sizing method can be optimized; there will always be a particular method that maximizes your strategy or portfolio performance. This is effectively another form of curve fitting, and relies on the dangerous assumption that the sequence of trades in your backtest will be somewhat repeated in future.

There are numerous position sizing methods available, with varying levels of risk. Probably the most popular method is the fixed fractional approach, whereby a fixed fraction (usually 1-3%) of your account balance is risked per trade.

To convert this dollar amount to your lot size, you need to know the price difference between your trade’s entry and exit points. While this method is robust and time-proven, sometimes you do not know your exit price when entering a trade. This is usually the case if you use an indicator-based exit.

To circumvent the above limitation, each strategy in my portfolio is configured to trade a certain lot size for every unit of account equity.

For example, if the strategy is configured to trade 1 lot for every $500 of equity, it will trade 2 lots if I have $1000, and 0.5 lots if I have $250. This method allows me to scale my position sizes in relation to my account equity, while being universally applicable to any type of strategy.

There are two variables that need to be determined:

  • Unit size of your account equity, i.e. how many ‘chunks’ you split your equity into
  • Lot size for every unit of equity

If you want to trade 1 lot for every $500 of equity, your unit size is $500, and your lot size is 1.

Implementing Position Sizing in Your Portfolio

Determining the lot size and account equity unit for each portfolio strategy is often an iterative process, which is illustrated below. The 9-strategy portfolio will be used to demonstrate the application of this sizing method.

Step 1: Determine the capital to be allocated to the entire portfolio.

This capital will be shared across all the strategies in the portfolio, although certain strategies may be given higher weightage due to the considerations listed below. Let’s start with a $5000 capital for this portfolio.

Step 2: Determine the lot size and account equity unit for each strategy in the portfolio.

A great benefit of this sizing method is the ability to directly control each strategy’s contribution to the portfolio. You can change a strategy’s weightage by changing its lot size. This is easily done for the forex markets, since the smallest denomination is 0.01 lots.

If you trade futures, however, there is less room for adjustment since mini contracts are hard to come by. The following are some potential considerations when selecting the lot size:

-Balance of Trend/Countertrend Strategies

Trading both trend following and countertrend strategies is a great way to boost diversification. The relative proportion of trend/countertrend strategies in your portfolio depends on your trading preferences and the nature of the markets you trade. 50/50 is a reasonable starting point.

-Strategy Correlations

Assigning a larger weightage to uncorrelated strategies will likely result in a smoother portfolio equity curve. From the 9-strategy correlation matrix above, I am only concerned about the correlations between CT5 and CT6 (0.68). I will keep the lot sizes for these strategies low.

-Strategy Performance

Naturally, you want the high performing strategies to trade a larger lot size. From the ranking list above, strategies T1, CT1, CT2 will be assigned more lots.

With the above considerations in mind, we can come up with a preliminary lot size allocation for the portfolio.

I usually use a 0.01 lot size as a starting point for each strategy. T1, CT1, CT2 will trade larger sizes due to their strong performance, while T3 will trade 0.02 lots for a more even balance between trend and countertrend strategies (43/57).

The account equity unit is conservatively set at $5000, equal to the initial portfolio capital. These values can be revised later if the portfolio drawdowns are unacceptable.

To speed up the process, QuantAnalyzer and StrategyQuant have a handy ‘What-If Analysis’ module that allows you to simulate your strategy’s performance with a different lot size, without running a fresh backtest. Other scenarios you can simulate include changing the date range of your backtest, changing your initial balance, or adding time filters (trade only during certain hours/days/months).

Step 3: Compute Portfolio Drawdown

With the lot sizes for each strategy determined, combine all the strategies and evaluate your portfolio performance. If your strategies were developed in MT4, you can use QuantAnalyzer to create your portfolio. If you developed them in StrategyQuant, this can be done within the software itself.

The performance of the 9-strategy portfolio is shown below.

Step 4: Is the Drawdown Acceptable?

You may have heard the saying ‘Limit your risk, and your profits will take care of themselves.’

Let’s look at the portfolio’s maximum drawdown above, $1393. Using the portfolio’s starting capital of $5000, you can compute the estimated % maximum drawdown for the portfolio, which is 28% in this case. Note that this is a conservative approach, because it assumes your maximum drawdown occurs right at the outset of trading.

Your maximum allowable % drawdown boils down to your risk appetite. 28% is acceptable to me. If your drawdowns are too high, consider reducing your lot sizes (Step 2), or increasing your portfolio capital (Step 1).

It may require several iterations before you arrive at a sizing solution which meet all the considerations above. If all else fails, consider replacing some of the strategies in your portfolio.

Wrapping Up

Trading a portfolio of uncorrelated strategies is a great way to use your capital efficiently and improve the consistency of your returns. It may be the closest thing to the Holy Grail in trading, if there ever was one.

Concurrently juggling the issues of strategy performance, correlations and position sizing can be a challenge. QuantAnalyzer’s Portfolio Master module can help you derive optimal combinations of strategies that satisfy the constraints above.

Do not be overly concerned about finding the ‘perfect’ mix of strategies that will maximize your portfolio performance. Markets are constantly evolving, and there is never any guarantee that any of your strategies will retain their edge going forward. Focus on creating a decent portfolio, and always err on the side of caution.

Eventually, some or most of your strategies will struggle, and you should have a number of backup strategies waiting in the wings, ready to take their place. You will need to adapt to stay in the game.

In the final article on Live Trading, we will talk about monitoring your portfolio’s live performance.

Strategy Development Roadmap

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS
Follow Us

Recent Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Follow Us
Have a Question?

Comments

2 Comments

  1. Michael

    Literally the best algo trading development process I have seen in a long time.
    Thanks for the effort.

    Reply
    • Wayne

      Thanks Michael, glad you liked it!

      Reply

Submit a Comment

Your email address will not be published.

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS

Recent Posts

Should You Use the Kelly Criterion for Forex Trading?

Should You Use the Kelly Criterion for Forex Trading?

The Kelly criterion is a famous mathematical formula that attempts to maximize your long-term capital growth. In this post, I’ll apply it to a EURUSD breakout strategy and explain some of its potential shortcomings when applied to forex trading.

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This