I am doing a project. I took the S&P 500 data from January 1, 1987 to January 29, 2008 from yahoo finance history. I took each day's close and calculated the percent change. Every time the day closed one point or more above I would sell and when the day closed one point or more below I would buy. So if I were to start with $1000 then I would take the money amount and subtract and add until I reached the final date which would decide whether or not I made a profit.
This is a section of my excel spreadsheet.
First 25 Days
Date Adj Close Buy or Sale if above or below 1.00
1/2/1987 246.45
1/5/1987 252.19 2.28 s
1/6/1987 252.78 0.23
1/7/1987 255.33 1.00 s
1/8/1987 257.28 0.76
1/9/1987 258.73 0.56
1/12/1987 260.3 0.60
1/13/1987 259.95 0.13
1/14/1987 262.64 1.02 s
1/15/1987 265.49 1.07 s
1/16/1987 266.28 0.30
1/19/1987 269.34 1.14 s
1/20/1987 269.04 0.11
1/21/1987 267.84 0.45
1/22/1987 273.91 2.22 s
1/23/1987 270.1 1.41 b
1/26/1987 269.61 0.18
1/27/1987 273.75 1.51 s
1/28/1987 275.4 0.60
1/29/1987 274.24 0.42
1/30/1987 274.08 0.06
2/2/1987 276.45 0.86
2/3/1987 275.99 0.17
2/4/1987 279.64 1.31 s
Last 25 Days
12/20/2007 1460.12 0.49
12/21/2007 1484.46 1.64 s
12/24/2007 1496.45 0.80
12/26/2007 1497.66 0.08
12/27/2007 1476.27 1.45 b
12/28/2007 1478.49 0.15
12/31/2007 1468.36 0.69
1/2/2008 1447.16 1.46 b
1/3/2008 1447.16 0.00
1/4/2008 1411.63 2.52 b
1/7/2008 1416.18 0.32
1/8/2008 1390.19 1.87 b
1/9/2008 1409.13 1.34 s
1/10/2008 1420.33 0.79
1/11/2008 1401.02 1.38 b
1/14/2008 1416.25 1.08 s
1/15/2008 1380.95 2.56 b
1/16/2008 1373.2 0.56
1/17/2008 1333.25 3.00 b
1/18/2008 1325.19 0.61
1/22/2008 1310.5 1.12 b
1/23/2008 1338.6 2.10 s
1/24/2008 1352.07 1.00 s
1/25/2008 1330.61 1.61 b
1/28/2008 1353.96 1.72 s
1/29/2008 1362.3 0.61
I turned in my project and it was thrown together, but I did do it. I did not figure out whether or not I made a profit. I believe that I did though because the stock increased by over 800 points over the 2 decades.