TradersEdgeSystems.com

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

July 2012 Stocks and Commodities Traders Tips


Long-Term Trading Using Exchange Traded Funds:

AIQ Version:

Original article by Sylvain Vervoort
AIQ Code by Richard Denning

The AIQ code for Sylvain Vervoort’s article , “Long-Term Trading Using Exchange Traded Funds”, is provided at the web site noted below.

Due to the use of several recursive calculations, the EDS code runs slowly but if you have patience, it will finish. Using the author’s system that is described in the article, I used the Portfolio Manager module to run portfolio tests on an eighteen country list of ETFs. This list will be posted as an AIQ list file to my web site along with the EDS file. The EDS file requires that there is at least three years of data before trading can begin and the test I ran starts the trading on 1/2/2002 and ends on 5/11/2012. The following capitalization settings were used:

  • Maximum of 10 open positions
  • Size each position at 10% of mark-to-market total capital
  • Take no more than 10 new positions per day
  • Compute the mark-to-market capital each day
  • Choose signals based on a relative strength indicator for ranking in descending order for longs and ascending order for shorts
I ran separate back-tests of trading long only and trading short only and then using the consolidation feature combined the two equity curves as shown in Figure 1 which is compared to the S&P 500 index (SPX). With these settings, the internal rate of return averaged 10% with a maximum drawdown of 29.5% on 7/23/2008.

Captions:
Figure 1 – Consolidated equity curve for the HACOLT system trading a list of 18 country ETFs for the period 1/2/2002 to 5/11/2012 (blue curve) compared to the S&P 500 index (SPX - red curve).

EDS Code and Lists:
HACOLT Trading ETFs.EDS
ETF-CTRY.lis
(AIQ list file mentioned above)
(right click and choose Save As)


 

Traders Studio Version :

Original article by Sylvain Vervoort
Traders Studio Code by Richard Denning

The TradersStudio code for Sylvain Vervoort’s article , “Long-Term Trading Using Exchange Traded Funds”, is provided at the web sites noted below. The following code files are provided in the download from the website:

  • Indicator Plot: “HACOLT_IND” for displaying the weekly HACOLT indicator.
  • Function: “HAC” for computing the heikin-ashi close.
  • Function: “HAO” for computing the heikin-ashi open.
  • Function: “zLagHA” for computing the zero-lag TEMA of the heikin-ashi close.
  • Function: “zLagTP” for computing the zero-lag TEMA of the close.
  • Function: “HACOLT” for computing the author’s HACOLT value
  • System: “HACOLT_SYS” for back-testing the author’s system.

Although the author designed this system to trade ETFs, I wanted to test it on other markets since there is such limited data for ETFs and the author’s tests would all be considered “in-sample” tests. I ran a test using a portfolio of futures contracts that included the following from the Pinnacle Data service (reverse adjusted): AN,BN,CN,FN,JN,SN,EC,CL,HO,NG,RB,TA,TD,UA,CC,CT,JO,KC,LB,SB,BO,C,NR,O,S,SM,W,MD,ND,SP,FC,LC,LH,GC,HG,PA,PL,and SI.

In Figure 1, I show resulting log equity curve trading the above portfolio starting with $1,000,000 and using a percent of margin trading plan set at 20% with a 100 contract maximum. Also within this figure, I show the underwater equity curve. For each round turn trade, I deducted commission and slippage of $75.00 per contact. Although the test started in 1/2/1997, I prevented the trading from starting until 1/2/2000 to allow for the exponential averages to stabilize. For the period 1/2/2000 to 5/9/2012, the system returned $3,604,893 with a maximum drawdown of 38.7% on 10/28/2011.

Captions:
Figure 1 - equity curve with underwater equity curve for the system 38 different futures markets.

Traders Studio Code:
HACOLT.zip
(right click and choose Save As)

 

 

 

 

 

 

 

 

 

 

 

 

 

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