# How to combine different strategies in a backtest (and IRL)

I am trying to combine long and short strategies into an L/S strategy in my backtesting program.

The way I have my backtester set up is it takes a signals object (either from a short, or a long strategy). That signals object tells the backtesting program the desired allocation for each ticker in my universe on each turn. Based on the target allocations, current positions, and account value, the backtesting program generates orders and simulates them.

To get a combined backtest, I don't think simply averaging, or adding the signals from different strategies is a good idea in my case. The signals are not standardized between strategies and act as more of a rank indicator (within a strategy).

I think one path forward is for me to create a virtual account for each strategy, so the backtester handles them separately and then pools the emitted orders and returns. However, I am not sure if I should share the cash position between these virtual accounts. It is also not clear how to manage exposure (on each strategy and overall). For example, if the orders from the two strategies start to cancel each other out, I think my exposure would be lower than the target. Plus, one strategy might start overweighing another. I am also not sure this approach would generalize well to more than two strategies / virtual accounts.

Another thing I can do is train another model that combines the signals. But I would rather hold off on that, as I would need additional data. Plus, I would prefer to get a working flat model first (to have as a baseline) before I try stacking.

I feel there should be an established preferred way of achieving what I am trying to do but I couldn't find much info on the topic. If you have some experience with this, please share your thoughts. Any advice would be helpful.

Thanks!

There are quite a few different possible approaches to assigning weights for different strategies in a portfolio.

Probably the first most important differentiating question is, do you have equal confidence in all of the strategies. I.e. is the expected Information Ratio (or just expected return, if they all have a similar level of volatility) equal for all of the strategies. If yes, then you should concentrate only on efficient diversification (as the expected return of your portfolio does not change via weighting, but the risk does). If no, then you should also incorporate your views about the expected returns.

Theoretically Mean-Variance Optimization is always the way to go in order to maximize your portfolio's Sharpe ratio. In practice, however, due to measurement errors in covariances and especially excessive variance in expected returns between different assets/strategies often lead into unsatisfying MVO portfolios. Thus in practice usually different simplifications are used to arrive at a palatable portfolio. Some of the common methods include:

1. Equal Weighting: each strategy/asset is assigned the same weight. This portfolio is mean-variance efficient if all the strategies/assets have uniform correlations and same expected Information Ratios.

2. Minimum Variance: weights are assigned so as to minimize the total portfolio variance. This portfolio is mean-variance efficient, if all the strategies or assets have the same expected return.

3. Maximum Diversification: weights are assigned so as to maximize the diversification ratio of the portfolio (i.e. the ratio between the weighted sum of the expected variance of the components against the expected portfolio variance). This portfolio is mean-variance efficient if all the strategies or assets have the same expected Information Ratio.

4. Equal Risk Contribution (ERC): weights are assigned so that each strategy/asset contributes the same amount to total portfolio variance. This portfolio is not mean-variance efficient under any generalized set of assumptions. The method is still quite widely used as a diversification method for long-short portfolios, as the portfolios tend to be "well balanced" and are not that sensitive to errors in covariance estimates.

5. Mean-Variance Optimization: weights are assigned so as to maximize the expected Information Ratio, given the explicit expected covariances and expected returns. This is theoretically always the best method (and the only one mentioned here, which allows for explicit modelling of expected returns), but is really sensitive to errors in expected covariances and expected returns. Here usually some form of more advanced modelling of expected covariances is required, as opposed to just using the historical sample covariance, to get anything sensible out.

Especially, in case of long-short strategies, the techniques used for estimating covariance matrices (and especially expected returns, if applicable) are an area of active research themselves, and are often as important as the method itself.