Roboadvisor (part 2) : Benjamin Graham is still in the place

In the last article, we started to study a simple process used in the wealth management industry to construct a portfolio adapted to the risk / return profile of and investor. We demonstrate how to build a CAL (Capital Allocation Line) to visualize all the possible risk-return combination of a portfolio containing a risk-free asset and "the" risky portfolio. We also discussed how to construct an investor indifference curve, to select on this CAL the optimal portfolio adapted to a specific investor risk profile.
Until now, we have always talked about "the" risky portfolio, and used it's two main characteristics : expected return (mean) and risk (standard deviation). We are now going to study "the" risky portfolio construction. Once again, we will review the important concepts before going into the detail of the mathematical formulas.
The difference between investment and speculation

In his book "The clever investor", published in 1949, Benjamin Graham advises us not to mix the concept of investment and speculation. To help us make the difference, he defines investment as :
"An operation which, upon thorough analysis, promises safety of principal and an adequate return. Operations not meeting these requirements are speculative"
In the comments of the re-edition of this book, published in 2003, Jason Zweig elaborates :
- You must never delude yourself into thinking that you're investing when you're speculating.
- Speculating becomes mortally dangerous the moment you begin to take it seriously
- You must put strict limits on the amount you are willing to wager.
Besides this, Benjamin Graham's advise gives us a first insight of what our algorithm may do without external input and what it may not be able to do alone. It seems clear that doing "a thorough analysis" seems too ambitious for our simple use case. As for our first example, we want our roboadvisor to provide investment advise, we will have to find an alternative.
The difference between active and passive management
The second concept we need to review is the difference between active and passive management.
Passive management is a strategy that aims at tracking an index or a given portfolio. The investor does not try to beat the market but instead tries to replicate it by closely following an index, like the S&P500 or the Russel 5000. This strategy limits the turnover, keeps the fees low (transaction, management) and make sure the portfolio is sufficiently diversified.
The investor believes that market are efficient and that it is not possible to consistently beat it, or he doesn't want to invest the time and money necessary to try to do it. He believes that on the long run, he will benefit from a performance similar to his portfolio's index.
On the contrary, active management is a strategy where an investor tries to exploit market inefficiencies. To be successful this strategy usually requires extensive knowledge in accounting, finance and a lot of investment in time. The investor tries to leverage on the timing (buy and sell at the right moment) or on the pricing (buy and sell at the right price).
This strategy is also more expensive in terms of internal costs (fees, etc.) as frequent operations will be necessary and that the cost to finance the research is not negligible.
It is still unclear whether it is possible to consistently beat the market. Although the big investment firms keep marketing it (e.g UBS ) many studies based on data from recent decades demonstrate that the majority of actively managed large and mid-cap us stock funds failed to consistently outperform their benchmark.
Let's opt to follow a passive management strategy : although accounting standards like GAAP and IFRS have made it much more easier to compare firm's financial reports and that more and more information are available online, either on firms (e.g. edgar) or on macroeconomics (e.g. on quandl), the analysis process still requires human interpretation that an algorithm, in my opinion, is not yet able to produce in order to invest an not to speculate.
Products
Although many products are available for a modern investor, not all of them should be included in our passive portfolio. To start, let's begin once again with Benjamin Graham definition of an investment decision.
"The basic policy decision to be made is how to divide the fund between high-grade bonds (or other so called "cash equivalents") and leading DJIA-type stocks"
Two broad classes of passive management strategies exists for bonds : the first one simply attempts to replicate the performance of a given bond index (e.g Vanguard Total Bond Market Index - BND or Barclays Aggregate Bond Fund iShare - AGG). The second option, called immunization, try to shield the investor from the exposure to interest rate fluctuation by aligning the duration of the obligation and the investor's horizon.
The broad consensus is that for securities the most adapted tool for a passive management strategy is to invest in a ETF. It is cheap, diversified and trades continuously. ETFs like Vanguard Total Stock Market Index Fund - VTI or SPDR S&P 500 ETF - SPY tracks broad indexes like CRSP US Total Market Index and the S&P500.
Let's recap
Until now, we have opted for an algorithm that should produce investment advices : therefore we are not going to use technical indicators or such elements to decide of the timing and pricing of our investments. We'll keep that for another serie.
As we don't want to spend too much time on securities and bond selection, our algorithm will use a passive investment strategy and make sure to allocate and maintain a given allocation of our funds between an ETF following a stock index (SPY), and a second ETF following a bond index (BND).
Finally, we have now to decide on the investment horizon, the frequency at which we want to rebalance our portfolio (to maintain our allocation) and the modalities of our cash contribution.
We are going to start with a 20 years investment horizon and biannual rebalancing. We will bring 400 USD every month during the whole period, for a total of 96'000 USD. This strategy is called dollar-cost averaging.
Risk and return in a portfolio of two risky asset
With two (or more) risky assets, the expected return of the risky portfolio simply the weighted sum off all individual assets expected returns.

Unlike the expected return, the variance is not a simple weighted sum. It is a weighted sum of covariances.

Remembering the covariance of a variable with itself is the variance of this variable, the equation can be simplified :

To have a better understanding of what is the impact of this last formula (a.k.a. diversification effect) on the portfolio risk, let's plot the two assets in the risky portfolio and use as a variable the correlation between both.

When the correlation between the two assets is perfect (p = 1), the portfolio opportunity set (all combination of portfolio expected return and standard deviation that can be constructed from the two assets) is a straight line between a portfolio containing 100% percent of asset D (point D) and a portfolio containing 100% of asset E (point E).
When there is a perfect negative correlation between the two asset (p = -1), the diversification effect is maximum, with both assets risk offsetting each other.
Finally, in between, the portfolio opportunity set is pushed northwest depending on the correlation.
Allocation of our risky portfolio
Once the opportunity set is computed, the optimal risky portfolio can be easily calculated. It is the portfolio at the point of tengency between the CAL (with y-intercept at the risk-free rate) and our opportunity set

With an optimal portfolio composed of two risky assets, the weights of both assets are computed with the formula :


The final step is to draw the indifference curve to compute the optimal complete portfolio for a given investor risk profile

As this was already discussed in the last article, I will not elaborate on the function to use :

Et voilà ! We have now all the info and formulas we need to start the implementation. Next article, we will talk about the technical architecture and tools we will use to build our roboadivsor.
