Algorithmic Investing Guide for Beginners (Includes Free Excel)

An Example of Various Algorithmic Investment Portfolios Using an Algorithmic Forecast.

In this article I want to break down various investment strategies.  The I Know First Algorithm generates a forecast table with three bits of information, the ticker, the signal, and the predictability.  For simplification, let us assume the signal is the prospective profit indicator, while the predictability is the risk indicator.  Our goal (as the goal of any investor should be) is to create a portfolio with the maximum potential return (larger signal) and minimum risk (larger predictability). For more information on how to read the ticker, signal, and predictability please view this page.  Different investors follow various strategies, as their objectives and incentives slightly vary. This analysis includes four strategies:

  1. Simple allocation according signal strength.
    1. Top Stock
    2. Top Three
    3. Top Ten
  2. Weighted allocation according to signal strength.
  3. Weighted allocation according to signal predictability.
  4. Weighted allocation according to signal strength and predictability.

In order to calculate possible returns according to different strategies let us create a theoretical investment amount of 10,000$. Now we only need an algorithmic forecast table, in this case we will use the 1 Year Tech Stock forecast from October 18, 2013.

Algorithmic Trading

And below are the respective returns of each stock one year later (October 18th, 2014) which can be found at online sources such as Yahoo Finance or Google Finance.

Algorithmic Trading

Now that we have the forecast data and actual results data, we can see what different investments would have yielded using the various investment strategies.

Strategy 1: Simple allocation according signal strength. (Basic)

This strategy is divided into three alternatives. The first is investing only in the highest predictability stock (in this case HPQ). While this strategy can yield the highest returns, it also has the highest risk. Most investors would divide their investment into a few promising stocks to mitigate risk in case one of their forecasts being wrong. For this reason the excel also includes a 3 and 10 stock calculation as well.  The investment is divided evenly by the number of stocks in the portfolio. Below are the results of strategy 1.

Algorithmic Trading

Strategy 2: Weighted allocation according to signal strength. (Intermediate)

This strategy uses the weight variable “Signal Strength”.  In order to create the weight we sum all of the signal strength values to create an allocation base “Signal Sum”, and each stock is bought according to the percentage of its signal to the total allocation base (Stock Signal Strength)/(Signal Sum).  Thus the first stock would have the highest investment; the second stock the second highest, and so on.  The table below incorporates this strategy.

Algorithmic Trading

Strategy 3: Weighted allocation according to Predictability. (Intermediate)

This approach uses the predictability variable and is the most risk conscious of all strategies.  In order to create the weight we sum all of the predictability values to create an allocation base “Pred. Sum”, and each stock is bought according to the percentage of its predictability to the total allocation base (Stocks Predictability)/(Pred. Sum).  In this case the investor does not factor in signal strength, forfeiting returns for mitigated risk (in most cases).

Algorithmic Trading

Strategy 4: Weighted allocation according to signal strength and predictability. (Advanced)

This scheme uses the signal strength and predictability variables and is more complex, but much more adjustable than the previous strategies.  The table below assigns an allocation to Signal and Predictability according to their respective sums (“Signal Sum” and Pred. Sum”); it then computes the total allocation by assigning a weight of importance, in this case Sig. Base and Pred. Base, which can be adjusted to satisfy investor preference. Our example uses the signal base 3 and predictability base 1, meaning that when funds are allocated signal holds 3 times the importance of predictability.

Algorithmic Trading


Final Remarks

Yield Table

As expected, approach 1A, produced the highest yields (while being the most risky). Surprisingly, strategy 1B and 1C had lower yields than other strategies, even though 1B is a comparatively high risk strategy. Strategy 2, which uses a weighted distribution and ignores predictability entirely – much higher risk – did not return as high yields as expected. Strategy 3, by means of predictability alone, made high returns, and would be a very viable option for a cautious investor. Strategy 4, via both signal and predictability, can create an adjustable distribution which can fit almost any investment restraints, and has shown to be as profitable as using just one base variable. We hope this example will shed some light to what algorithmic investing can do when an intelligent algorithm is matched with an equivalently intelligent investor.

Download the Excel here.

Note: The excel sheet is available for download here. Edit or modify the numbers to test different portfolio strategies.  If you are not a member of I Know First – and do not receive future forecasts – we provide you with some past forecasts here so that you can test different portfolio possibilities.

Algorithmic Trading

I Know First Research is the analytic branch of I Know First, a financial start up company that specializes in quantitatively predicting the stock market. This article was written by Daniel Hai one of our interns. We did not receive compensation for this article, and we have no business relationship with any company whose stock is mentioned in this article.