This article describes the construction of a neural network system for trading the SP futures contract. The neural network modeling software used to construct the system is BioComp Profit 8. Profit 8 is based on BioComp Systems’ commercial Intellect 3.0 architecture. To be accurate, Intellect builds mesh models rather than neural network models. Mesh models are proprietary models that outperform both neural networks and state vector machines. The Profit 8 system described in Part 1 of Modeling with Profit 8 and the SIP Indicators stopped working due to a bug fix related to the R Squared Performance Metric that was used by the system.
The inputs to our models are the SIP indicators. The SIP indicators are published by Adaptive Trading Systems on a daily basis and are used for modeling the 3 to 15 trading day price trends of the SP futures contract. The SIP indicators include Buy Pressure, Sell Pressure, Net Pressure, High Buy Pressure, High Sell Pressure, Advancing Pressure and Declining Pressure. You can download the indicators by installing the ATS Mercury application that is available toward the bottom of the Trading Signals page. The indicator values are delayed by 1 trading day for non-subscribers.
Step 1. Adding the SIP Indicators to the Securities List
This step assumes that you have downloaded the SIP indicators to your computer. For further information on downloading the SIP indicators go to the Trading Signals page at AdaptiveTradingSystems.com.
Start Profit 8 and click on the Add Text File toolbar button to open the file selection dialog. Browse to the location of the SIP indicator text files and open the first file. The File Definition Dialog will then appear.
Click on the SIP indicator column name (in the example it is SIPAP) and click on the Close radio button in the Settings section. Click on Ok to finish adding the SIP indicator to the Securities list in Profit 8. Repeat this step for each of the SIP indicators.
Step 2. Adding the Data Series for Modeling
On the Data tab in Profit 8, double click on the security name of the data series that you are modeling. This example models the continuously linked non-adjusted SP futures contract data from Pinnacle Data Corp. Scroll down the list of securities until you see the the SIP indicators. Double click on each SIP indicator until they have all been added to the list of ‘Data to Use’.
Step 3. Setting the Data Import Dates
The most recent 2.5 years of data will held back for validating the models. This is referred to as the out-of-sample (OOS) period. To ensure that the last 2.5 years of data is not used, the end date for importing data is set to 07/15/2009.
The modeling end date of 07/15/2009 was chosen so that the modeling period overlaps the start of the ‘GFC period’ whilst providing for a reasonable amount of OOS data.
Step 4. Importing the Data
Click on the ‘Import Data’ toolbar button to import data from 07/01/1997 to 07/15/2009.
Step 5. Equity Engine Parameters
No transaction costs are applied in this example. Change the Slippage and Commission values to zero on the Equity Calculations tab.
Step 6. Setting the Trading Delay
Change the ‘Project the signal by’ to 1 to apply a trading delay of 1 bar. Signals generated on any given day are executed on the close of the next trading day when using a trading delay of 1 bar.
Step 7. Building the Predicted Series
The available inputs and predicted series used to build mesh models are defined on the Indicators tab in Profit 8. In this case, there is no need to modify the dates that optimizations are applied to because no optimizations will be run. Go to the Indicators tab and delete series SP.NON_VOLUME from the list of indicators. Apply the Ln() transform to series SP.NON_CLOSE, the transformed series will then appear at the bottom of the list of indicators.
Select the Ln(SP.NON_Close) series at the bottom of the list and apply the 1 period Chg transform. Making sure the same series is still selected, apply the 2 period Shift transform. This completes the construction of the target / predicted series. The target series represents an ideal trading signal. Profit 8 will attempt to predict this series using the SIP indicators as the model inputs.
Step 8. Nominating the Predicted Series
Select the Model Building tab and then select the newly constructed target series in the Indicators list. Click on the drop down menu above the Indicators list and select ‘Predicted’.
Step 9. Data Handling Settings
Change the modeling start date to 7/15/1997 and the modeling end date to 7/15/2009. Set the Modeling, Optimization and Selection percentages to 60, 20 and 20. Change the modeling parameters so that Random data points are used.
Step 10. Model Settings
The default Model Settings are used as pictured below.
Step 11. Performance Settings
The default Performance Settings are used as pictured below. Note that the Optimization Metric is set to Relative Accuracy. Use of the Relative Accuracy tends to result in systems with lower profit margins over the modeling period. However, use of the Relative Accuracy metric has a strong tendency to produce systems that are more robust post the modeling period. I spent a considerable amount of time comparing Profit 8 to other similar neural network and state vector machine software solutions and Profit 8 using the Relative Accuracy optimization metric was the clear winner.
Step 12. Start Modeling
Click on the Start Modeling button to begin the modeling process.
Check the Profit 8 status bar at the bottom left of the application window to see when model construction has completed.
Step 13. Change Import End Date
To view the performance of the system over the out-of-sample period the data importation dates need to be modified. Change the end date to the last date that you have SP data for.
After updating the end date, click on the Import Data toolbar button to import the data. The system will process the new data automatically.
Step 14. View the Results
Click on the Results tab to see the in-sample and out-of-sample performance. Finally, save the system if you haven’t done so already.
As a market timing model developer I like to see the shape of the equity curve and the percent of perfect trading statistic. The majority of people reading this article are probably wondering how many points the system hypothetically made over the OOS period. A total of 71 positions were taken over the OOS period. The first trade post the modeling end date was opened on 7/17/2009 and the last trade in the OOS period was closed on 1/17/2012. The net points made was 667.8. This equates to $33,390 if trading the ES contract and $166,950 if trading the SP contract. Note that these figures are not net of trading costs. To calculate the total hypothetical trading cost multiply your estimate of the cost per completed trade by 71 or the cost per side by 142.
What I like about this system is:
- The SIP indicators have been published daily with no in hind-sight adjustments for years.
- Absolutely no optimization of inputs is done.
- Absolutely no model ‘pruning’ post construction is required or done.
- The OOS period spans one of the most difficult trading periods to date.
What I don’t like about the system is:
- The percent of perfect over the in-sample and out-of-sample periods is a little on the low side.
Developer of Trading Systems that Adapt