@userque
anyway you could PM me an example?
Hi, how is your system laid out?
When it generates a signal, what row/data is it working on?
Here is an example of what I was talking about:
Original OHLC data:
Code:
01/30/99 1 2 3 4
01/29/99 5 6 7 8
01/28/99 9 0 1 2
01/27/99 1 2 3 4
01/26/99 5 6 7 8
01/25/99 9 0 1 2
Now suppose a system that uses the last three days of data. Here's how I would rearrange the data:
Code:
01/30/99 1 2 3 4 5 6 7 8 9 0 1 2
01/29/99 5 6 7 8 9 0 1 2 1 2 3 4
01/28/99 9 0 1 2 1 2 3 4 5 6 7 8
01/27/99 1 2 3 4 5 6 7 8 9 0 1 2
01/26/99 5 6 7 8 9 0 1 2
01/25/99 9 0 1 2
The last (oldest) two rows are ignored as they are incomplete. The sheet/system does its calculations on the top row only in order to generate a signal. So, how do we manually backtest this?
Insert two new rows. In A1, type 2.
In A2, enter:
Drag copy that so it is above every column that has data (=offset(b1,$a$1,0,1,1)...=offset(c1,$a$1,0,1,1)...etc.). Your data should look like this:
Code:
2
01/30/99 1 2 3 4 5 6 7 8 9 0 1 2
01/30/99 1 2 3 4 5 6 7 8 9 0 1 2
01/29/99 5 6 7 8 9 0 1 2 1 2 3 4
01/28/99 9 0 1 2 1 2 3 4 5 6 7 8
01/27/99 1 2 3 4 5 6 7 8 9 0 1 2
01/26/99 5 6 7 8 9 0 1 2
01/25/99 9 0 1 2
Now, insure the sheet still does the calculations on the new top row. (Instead of inserting the rows initially, maybe sliding the values down via a copy-by-values would keep your formulas pointing to the 'new' row without modifications.)
Now, change A1 to 3. You should then see this:
Code:
3
01/29/99 5 6 7 8 9 0 1 2 1 2 3 4
01/30/99 1 2 3 4 5 6 7 8 9 0 1 2
01/29/99 5 6 7 8 9 0 1 2 1 2 3 4
01/28/99 9 0 1 2 1 2 3 4 5 6 7 8
01/27/99 1 2 3 4 5 6 7 8 9 0 1 2
01/26/99 5 6 7 8 9 0 1 2
01/25/99 9 0 1 2
Notice that the top row has changed. Your sheet should now be doing calculations on this 'new' data. You can add a spin button to make it easier/quicker to go back in time. You have to manually log the results of each calculation.
But, you can make a macro to log the calculations for you. Then, you can decide to automate the whole process...at that point, you would have completed your simple backtesting system. You would have gone from manual to automated. But manual may be sufficient...depending upon how much testing you plan to do.