TradersEdgeSystems.com

Consulting | Custom Trading Systems
Built-In Indicators | Custom Indicators

November 2009 Stocks and Commodities Traders Tips


A Seasonal System for Soybean Futures:

Original article by Markos Katsanos
AIQ Code by Richard Denning

AIQ Version:

The AIQ code for the Soybean Seasonal Channel Breakout System from the article, “A Seasonal System for Soybean Futures” by Markos Katsanos, is shown below. All three systems that the author uses for in the article are included in one EDS file called SoySeas.eds. Since the author supplied us with all three of the data files used by the systems, I imported the files into the AIQ database using the Data Transfer Utility or DTU. These data files in the AIQ format will be available at my web site for download. Also I put just the one ticker that is traded, ZS_KAT.dta on a list by itself. The list can also be downloaded with the EDS file. All of these files are zipped for download into one file. Once the zip file is downloaded to a temporary directory and unzipped to a second temporary directory, copy the files to the following locations:

1) *.dta files to c:\Wintes32\Tdata\
2) *.eds file to c:\Wintes32\EDS Strategies\
3) *.lis file to c:\Wintes32\

After copying the files to these directories, run the “rebuild master ticker list” from the “utilities” drop down menu within the data manager. Now you are ready to open and run the EDS file.

EDS Code and Special Data for Seasonal Soybean Futures System:
SoySeasKatsanos.zip




Traders Studio Version :

Original article by Markos Katsanos
Traders Studio Code by Richard Denning

The TradersStudio code for the Soybean Seasonal Channel Breakout System from the article, “A Seasonal System for Soybean Futures” by Markos Katsanos, is shown below together with the code for the Simple Seasonal and the Simple Moving Average Crossover systems. In reviewing the author’s system, I was stuck by the extraordinarily high returns. In reviewing how the seasonal was developed I noticed that the seasonal was developed with the same data over which the system was tested which appears to me to create a strong look-ahead bias. To avoid this issue we should develop the seasonal on data that comes before the first date that we want to test the system. In order to do this we need to use all of the soybean cash index data that goes back to June 1969 (data from Pinnacle). We can use several methods to get a seasonal analysis and then we need to decide whether we will use a rolling window or an anchored window. If there is seasonal drift it would be better to use the rolling window approach as the anchored window will be slow to react to changes in the seasonal due to fundamental changes in the markets such as a shift to higher production in the southern hemisphere which has the opposite growing season for the U.S and would tend to nullify the effect of the seasonal.

TradersStudio has an add-in module called the Universal Seasonal that does extensive seasonal analysis and allows you to calculate a walk forward seasonal on any market. It does not require using the related cash indexes as the seasonal does not use the raw price data but rather looks at normalized rates of change. The Universal Seasonal add-in module includes 12 indicators, 20 functions, and one example trading system which allows extensive seasonal research to be done without any look-ahead bias. Two of the most useful indicators and functions are shown on a chart of the soybean futures (data from Pinnacle, symbol S_REV) in Figure 1. The first panel of Figure 1 below the soybean futures chart is the RuggieroBarna seasonal index which is calculated as follows:

1) For each trading day of the year, record the “next n-day” returns and the percentage of time the market moved up (for positive returns) and down (for negative returns).
2) Multiply this n-day return by the proper percentage.
3) Scale the numbers calculated in step 2) between 1 and -1 over the trading year.

In the second panel of Figure 1 is the SeasonalCorrel indicator which shows the current market correlations to the seasonal historical correlations. It uses the spearman rank correlation function. In developing a seasonal trading system we may want to reverse the trade logic when the current conditions are negatively correlated to the seasonality or in any case to filter out signals when correlation is low. For both indicators, the “n-day return” and “n-day correlation”, n was set to 20 and a rolling window of 12 years of data was used to develop the seasonal for each day of the year.

Traders Studio Code and Special Data for Seasonal Soybean Futures System:
Data.zip
SoySeasCBO_Sys_TSZ.zip

 

 

 

 

 

 

 

 

 

 

 

 

 

Disclaimer | Privacy Policy | Contact Us | Spam Blocker | ©2009 Traders Edge Systems