Introduction

This article features the same system as that described in the prior article titled ‘Predicting SP Futures with the K-Nearest Neighbor Algorithm’ with one minor difference. The SP futures data was detrended by building an index based on accumulating the percentage movement from day to day (arithmetic returns). The WaveOsc2 indicator was applied to the detrended data rather than the raw price data. Detrending the price series using this simple approach had a significant impact on the results.  A few ‘detrend methods’ are being incorporated into all scripts and this was a test of the those changes plus another test run of the CPredictor v2.

Settings

The system settings are identical to those described in the prior article other than the Detrend Method being set to 3. Previously the Detrend Method parameter was labeled as the Price Transform. Please refer to the prior article titled ‘Predicting SP Futures with the K-Nearest Neighbor Algorithm’ for a detailed description of the system settings. Note that reverse adjusted futures data was used. Ratio adjusted data should have been used given that the detrend method is based on arithmetic returns.

Dakota Bot Parameters

Dakota Bot Parameters

The Min/Max Convergence Factors and Performance Threshold. When setting the performance lookback period to approximately 4 years I set the Performance Threshold to 0.15. This is equivalent to 15% of perfect trading. If the best trade bot in a given sub-swarm is performing at this level or better then the maximum convergence factor of 0.7 is applied. The default setting of 0.25 for the Performance Threshold is more appropriate for shorter performance lookback periods, for example, one year.

Trading Simulation Results

The screen images that follow describe the results of running the trading simulation using the detrended SP price history.

Dakota Price Signal and Equity Chart

Dakota Price Signal and Equity Chart

The consistency of the equity curve has improved across the entire trade simulation period. The improvement is likely to be due to the detrending / unlikely to be due to chance.

Dakota Trades Report

Dakota Trades Report

The trade statistics are looking pretty good in this report. This is definitely a trading signal that I would be taking notice of. I will be coding up a (final) modification to the CPredictor algorithm this weekend that I am confident will improve performance. I will report on the results of the first test run after the modification is made. More extensive testing on other markets will then follow.

Regards,

James