# To boldly go to the efficient frontier: portfolio rebalancing and optimization.

## Diversification and Balance in Financial Planning.

Diversification is used to manage risk by spreading it around: essentially not putting all your eggs in one basket. In financial planning, we consider your entire lifespan, so we’ll first set up the baskets like this:

- Cash (or equivalents). This is money readily available to spend or to put into the following 2 baskets.
- Financial capital. Money and assets that you have now that are set aside to grow as investments with earning potential.
- Personal capital. Money that you don’t have now but may be able to have in the future.

Risk is reduced over your lifespan by lowering your allocation to cash (spending) and increasing investments and personal capital. When you are young, your allocation to personal capital, such as education and increasing your marketable skills, is important. You may not have much cash, but consider that time is money, so you have more than you think. As you get older, and you are earning money, then an allocation to investments is important as you are putting that money to work for you. When you are retired and are no longer making money, then spending becomes the focus.

This definition of baskets is only helpful for seeing the big picture and is maybe helpful in guiding your life decisions. I think it is useful for investors to keep that in mind, but they require more actionable baskets to direct their investment choices. Financial capital is usually broken up into the following general asset classes:

- Cash or equivalents: money ready to be invested in any of the following:
- Equities
- Fixed income
- Real estate
- Commodities
- Foreign and alternative currencies

On top of that you can also diversify your investments for most of these classes geographically, by dividing the world into baskets using countries, or continents, or regions of similar economic development.

These baskets can be arbitrary. Investments themselves may contain several of these asset classes. Each class can be subdivided into subclasses in different ways, so it is not always clear-cut. Additionally, investors are often drawn to one asset class or another due to personal experience with the asset class (real estate for example), and market trends (crypto currencies for example). For individual investors, some asset classes are only available through mutual funds or ETFs.

## Risk and Return

Remember that we are dividing up the baskets to minimize risk. So, the important thing is to know what the risk of each basket is. But what is risk? It’s a fuzzy concept, as risk is highly subjective and people have different tolerances for risk. The risk is that the basket will fall, and any eggs in that basket may break. But what are the chances of the basket falling, and how hard? What proportion of the eggs will break? Because we cannot know the future and want an objective measure of risk, we will need to enter the world of probability and statistics to measure risk, based on past behaviour.

A concept that is not as fuzzy is return on investment. But again, we do not know the future returns; we can only set an expectation of return based on past returns as well as current market conditions and subjective outlook.

To summarize so far, for an investor to be diversified means that they must decide on what proportion of their eggs to put into each basket which has an unknown risk for an unknown return. That sets their target asset allocation. Focusing on the first three most liquid assets (Cash/Equities/Fixed-Income), most advisors will help you decide your target asset allocation based on their perceived return and risk expectation of each asset class, and their perceived view of your risk tolerance. DIY investors can also use robo-advisors or DIY couch-potato type portfolios to find the right mix of ETFs for them. Often rules-of-thumb are applied, such as you should have (100% - age) in fixed-income and the rest in equities, just for example.

## Rebalancing

Then, the baskets have to be monitored as they rise and fall, such that to keep the same proportion in each as originally desired, some assets must be moved by selling them from one basket and buying them in another. This is called rebalancing. The investor’s risk tolerance may also change with time. A younger investor has more time to recover from market downturns, while someone close to retirement may want to keep savings in less risky investments, and a rich retiree may want to maximize their legacy. This can change the target asset allocation over time.

There are many balanced funds and ETFs that rebalance for you. Robo-advisor accounts may also include automatic rebalancing as part of their service. There are also target-date funds that not only rebalance but change the target allocation as you age to reduce risk as you near that target date. These accounts, funds and ETFs do tend to have higher fees for that privilege. But if you hold just one of these you're all set. If not, the MoneyReady App has a rebalancing tool to help you rebalance your portfolio following your current target asset allocation. If you hold several funds, it can can be tricky due to these balanced funds that combine multiple allocations, so we developed an algorithm to handle that. It also considers fees, expected taxes, and expected returns to help you determine what assets to buy or sell to get the portfolio rebalanced. To minimize fees, rebalancing is best done once per year, or when depositing or withdrawing funds from an account. The MoneyReady App TIME MACHINE uses this rebalancing tool to rebalance every year. You can also set your target allocation to change over time. For today, although the rebalancing calculation is done on a per-account basis, you can combine accounts into a mock account to get a rebalancing recommendation over several accounts. If you have just a few stocks, ETFs or funds in your portfolio that are consistent with your set asset allocation, this rebalancing tool is probably all you need.

## Modern Portfolio Theory

The point of investing is not just to be diversified; in fact, you can be over-diversified. A smart investor will want to maximize the return for the amount of risk they are taking. Modern Portfolio Theory was developed in the 1950’s from the founding work of Nobel prize-winning economist Harry Markowitz and is still used to find optimal portfolios with the required return and risk profiles. For a portfolio of assets, we can estimate each of their expected future returns based on their past returns. We can also calculate how volatile the returns have been using their standard deviation; risk is measured by that volatility. We can also calculate how correlated the returns have been with each other. If two assets go up and down in sync you may not need to own both. You should also want to find assets that compensate for each other’s risk. Given all that, we can calculate the expected total return and expected total volatility of any portfolio given the proportion (weight) of each asset in the portfolio. Inversely, we can find the weights that maximize that return for any given volatility, or the weights that minimize the volatility for any required return. We can also find the optimum weights for the portfolio that maximize a measure of the ratio of expected return to expected volatility: the Sharpe ratio. The graph at the top is an example portfolio showing the Markowitz efficient frontier. The horizontal axis is volatility and the vertical axis is expected return. Each point is an asset in the portfolio with the size proportional to its weight, and the blue line is the efficient frontier. This line shows the maximum return expected for any level of volatility for that portfolio.

## Portfolio optimization in the MoneyReady App

With our Wealthica integration, it is very easy to quickly import portfolios in the MoneyReady App and many have imported large portfolios with many assets. You can also add the assets manually. In any case we have daily market data provided by Fundata Inc. of most Canadian and US stocks and Canadian Mutual Funds. I thought I would add a feature for users to calculate their efficient frontier and let the model recommend a rebalancing strategy.

Figure 1.

The tool first calculates the efficient frontier and shows the expected return, Sharpe ratio and Sortino ratio of the current portfolio (Figure 1). The Sortino ratio is used when you want to disregard up-side volatility since it is not really a risk, and you just want to consider down-side risk. It uses the down-side deviation instead of the standard deviation to get the down-side volatility.

We then allow 3 methods/options:

- Rebalance to the maximum Sharpe ratio
- Rebalance to the minimum volatility for a given required return
- Rebalance to the minimum down-side volatility for a given required return

The tool also allows you (it’s optional) to add constraints such that the target asset allocation of the account is also achieved (for example 30% US Equities / 70% Canadian Equities). Another option available is to enable what I call the diversity constraint. A feature of the model is that it can reduce the diversity of your assets considerably, mostly when you have highly correlated assets. Although a portfolio with far fewer assets may be more optimal according to the theory which maximizes return over risk, investors generally like to keep a variety to also spread the risk. To address that, you can impose a diversity constraint on the model, such that 10% or fewer of the assets are sold entirely (if it can do so). Lastly, given that most brokerages do not allow selling or buying part-shares for stocks, the tool also considers that, and constrains the solutions to full shares for stocks (but not units for funds). This tool does not yet consider taxes or fees (although it is possible to do so, and we may add that later).

Figure 2.

The result will display the efficient frontier graph; a red star shows where the selected rebalanced portfolio lies on the constrained frontier (Figure 2). The red star can be off from the blue line due to the full-shares constraint that may lead to a sub-optimal result, and when you use down-side deviation because the efficient frontier shown is based on the standard deviation. A table shows you the expected return, volatility (or down-side volatility), and the Sharpe (or Sortino) ratio of the rebalanced portfolio. The next table (not shown here) gives you suggestions of how many shares or units to sell or to buy of each asset so that the resulting portfolio has the optimum weights. Another table shows you the resulting asset allocation.

I urge you to take these suggestions with a grain of salt. This was a lot of fun to implement but applying Modern Portfolio Theory in real life with real money is not so easy.

The main problem is that the theory uses historical returns to predict future expected mean returns and volatility. We use up to 6 years of price history and a minimum of 3 years for the calculations (we drop assets entirely from the calculations if they have less than a 3-year history). Things change, and the next 3-6 years may not look like the last 3-6 years.

There are also different ways to estimate expected returns and expected risk, and there are many other parameters to tune. We use common, sensible approaches and parameter values to suit most situations. Although the theory allows for negative weights (i.e., shorting) of assets, and maintaining negative cash balances (i.e., borrowing on margin), the MoneyReady App is meant for long-term financial planning, so we have not implemented those short-term trading strategies.

And lastly, a solution may not be found. This usually happens due to the constraints on the asset allocation, so it can be informative in that case. You can check that there is enough variety of assets for each asset class consistent with your preferred asset allocation so that the algorithm can find a solution. You can also try to run the optimization without the asset allocation constraint.

Nevertheless, I think the theory is quite useful for investors. You can investigate each of your accounts individually or in combination. You can add investments manually to your accounts if you are considering different investments to add to your portfolio. You can add Cash and see where it would best be placed or deduct Cash (and even make it negative) to see what is best to sell, since Cash is automatically rebalanced to its allocation (which can’t be negative).

Again, you always need to use your better judgement, but it’s a powerful tool to have in your investing toolbox. The rebalancing tool and portfolio optimizer are included with a MoneyReady App subscription.