Automated Backtest #'s 1, 2, 3, and 4
NOTE TO TEAM: Tests 2 and 4 would be an example of Investing Knowledge--as opposed to the Iffy pile of data. The key is to buy as close as possible to a cross above the 10-day and/or the 20-day as possible. Another thing, human beings will have a slight advantage in being able to anticipate a cross for early entry. The computer will have an advantage because it has no fear or tentativeness about it.
============================================
TEST 1: Trading rules:
Price above 10-day ma, BUY.
Price below 10-day ma, SELL.
TEST 2: Rules:
IF angle of 10-day ma flat or turning up (or will turn up if price climbs above the 10-day)
OR
IF 10-day is pointing up
AND
Price above 10-day ma, BUY.
IF price below 10-day ma, SELL.
[NOTE to programmer. Significant technical challenges programming the 10-day ma code. Can you accomplish this easily? If not, can you perform a kludge? ]
TEST 3:
Price above 20-day ma, BUY.
Price below 20-day ma, SELL.
TEST 4:
IF angle of 20-day ma flat or turning up (or will turn up if price climbs above the 20-day)
OR
IF 20-day is pointing up
AND
Price above 20-day ma, BUY.
IF price below 20-day ma, SELL.
[NOTE to programmer. Significant technical challenges programming the 20-day ma code. Can you accomplish this easily? If not, can you perform a kludge?]
===========================================
ROOM FOR CONTINUOUS IMPROVEMENT IN THE FOLLOWING AREA ON TESTS 2 AND 4:
[NOTE to programmer: the following bit of code would be inserted when you're holding position because price is above the 20-day ma.]
IF 20-day ma is angled upward 20+ degrees
AND
IF price breaks below 20-day ma by < 2%
HOLD
OR
IF price breaks below 20-day ma by > 2%
SELL.
[NOTE to programmer: the above fragment can be written and tested on Test 2 above but changing all numbers to reflect the 10-day ma.]
[NOTE to programmer: Because this is a suggested fragment as an area for continuous improvement, the angle of the line (+20 degrees) and the percentage break of the line (< 2 percent) are variable and should be tested with a variety of numbers and combinations to discover the ideal angles and percentage breaks to maximize gains and minimize losses.]
Wanted: Traders to Perform Automated Back-testing of Trading Systems