Chapter 1
Introduction
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\).
Date | Close | BCC | Volume | BVV |
---|---|---|---|---|
2011-01-03 | 127.05 | 138572000 | ||
2011-01-04 | 126.98 | \(B\) | 137327700 | \(B\) |
2011-01-05 | 127.64 | \(A\) | 133864500 | \(B\) |
2011-01-06 | 127.39 | \(B\) | 122415200 | \(B\) |
2011-01-07 | 127.14 | \(B\) | 155968300 | \(A\) |
2011-01-10 | 126.98 | \(B\) | 122198300 | \(B\) |
2011-01-11 | 127.43 | \(A\) | 110183900 | \(B\) |
2011-01-12 | 128.58 | \(A\) | 107436100 | \(B\) |
2011-01-13 | 128.37 | \(B\) | 129048400 | \(A\) |
2011-01-14 | 129.30 | \(A\) | 117611100 | \(B\) |
2011-01-18 | 129.52 | \(A\) | 114249600 | \(B\) |
2011-01-19 | 128.25 | \(B\) | 151709000 | \(A\) |
2011-01-20 | 128.08 | \(B\) | 175511200 | \(A\) |
2011-01-21 | 128.37 | \(A\) | 151377200 | \(B\) |
2011-01-24 | 129.10 | \(A\) | 113647600 | \(B\) |
2011-01-25 | 129.17 | \(A\) | 167388000 | \(A\) |
2011-01-26 | 129.67 | \(A\) | 141139500 | \(B\) |
2011-01-27 | 129.99 | \(A\) | 123206300 | \(B\) |
2011-01-28 | 127.72 | \(B\) | 295569200 | \(A\) |
2011-01-31 | 128.68 | \(A\) | 149126600 | \(B\) |
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.