Chapter 1

Given a time series for some financial asset, it is impossible to predict future values with any certainty. The best you can do is to come up with probabilities based on a model. But models are fragile and parameters can change unexpectedly. There have been many attempts at developing non-static and adaptable models for financial time series. Many of them are highly complex. A simple but effective and robust model would probably be welcome by most traders. In this book we will describe some very simple models and how to create a trading system based on them.

The most important question for a trader is whether the price of an asset will go up or down over some time frame. It would be nice to know the exact size of the price movement but in most cases this is asking too much. A successful trading system can be built on a model that predicts only the direction of movement.

If only the direction of movement is important then the time series can be reduced to a simple binary string (a string composed of only two symbols, letters or numbers) that indicates up and down movements. To construct the string, start with a point in the time series, if the next point is above it then assign it the value A, if it is below then assign it the value \(B\). Continue on like this point after point and you end up with a binary string of A's and B's representing the up and down movements of the time series. On those rare occasions where there is no movement you have a choice as to whether to assign an \(A\) or \(B\). We will always assign this a \(B\) so that \(A\) is reserved for strictly upward movements.

As an example, look at the history of the SPY ETF for the month of January 2011. Table 1.1 shows the date, closing price and volume for each day of the month. The BCC and BVV columns represent the binary movement in closing prices and the volumes from day to day. On January 4 for example the close was 126.98 which was below the 127.05 on the previous day so a \(B\) is recorded. The next day the close was 127.64 which is above 126.98 so an \(A\) is recorded and so on. The same thing is done for the volumes. If the volume on a day is above the previous day then an \(A\) is recorded, otherwise a \(B\) is recorded. Another possibility that is not shown in the table is to look at the binary movement from the open to the close (BOC). If the close is above the open then assign a value of \(A\) otherwise \(B\).

Table 1.1
SPY ETF for January 2011 with daily closing price, volume, and binary differences.

We are going to start by looking at some very simple trading systems with the goal of trying to predict the movement from close to close or from open to close. For close to close prediction only BCC data is used and for open to close only BOC data is used. The final system that we look at will include volume data as well as price so that for close to close prediction both BCC and BVV data will be used.

In all cases the prediction is based on examining the properties of a binary string of \(A\)'s and \(B\)'s. The goal is to predict what the next symbol in the string will be and then bet accordingly. Random binary strings can be generated in many different ways from recording the flip of a coin to recording whether a customer supersizes his fries or not. The process of generating a random binary string is called a binary random process and we will begin by looking at some of its general properties.