TradersEdgeSystems.com

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

September 2012 Stocks and Commodities Traders Tips


Developing a Multi-Level Strategy

AIQ Version:

Original article by Vladimir Voznjuk
AIQ Code by Richard Denning

The AIQ code for Vladimir Voznjuk’s article , “Developing A Multi-Level Strategy”, is provided at the web site noted below. Although AIQ software can chart and test forex data, testing stocks is more interesting. Using the author’s concept of trading using multi-instruments to generate signals, I designed a system that uses both the group index for a stock and the SPX index. The multi-instrument indicator that I designed uses the 20-day rate of change in price for the stock and its related group which is then smoothed by a simple average over 20 days. I then take a ratio of the stock’s smoothed rate of change to its related group’s smoothed rate of change. Lastly I take a stochastic of this ratio (“StoMSG”). The system goes long when the stock, group and SPX index are in up-trends as measured by the direction of their 50-day simple moving average (higher than it was 10 days ago) and in addition, for the stock and group, the 20-day rate of change is greater than zero. Buy when the trend is up (as defined above) and the StoMSG is less than or equal to 10. Exit longs when either the position has been held for 20 days or the StoMSG greater than or equal to 90 or the simple average of the SPX close is less than its value 10 days ago.

To test the Multi-market, group, stock system using the Portfolio Manager for the period 1/1/1999 to 7/18/2012 a trading simulation was run with the following capitalization settings:

  • 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 (long only system)
In Figure 1, I show the resulting statistics and equity curve compared to the SPX index. The test was run using the S&P 500 group/section structure that can be downloaded from the AIQ web site for the period 1/1/1999 to 7/18/2012. AIQ allows for the creation of custom group and sector structures and also has two structures, the S&P 500 and the AIQALL. The S&P 500 groups contain just the stocks in the S&P 500 while the AIQLL groups have most of the stocks that can be traded.

Captions:
Figure 1 – Equity curve for my test system that uses the multi-instrument concept for the period 1/1/1999 to 7/18/2012. S&P 500 group/sector structure was used for the secondary instruments and the S&P 500 stocks were traded.

EDS Code:
MultiLevel.EDS
(right click and choose Save As)


 

Traders Studio Version :

Original article by Vladimir Voznjuk
Traders Studio Code by Richard Denning

The TradersStudio code for Vladimir Voznjuk’s article , “Developing A Multi-Level Strategy”, is provided at the web sites noted below. The following code files are provided in the download from the websites:

  • Function: “multiRangeDiff” for computing the author’s multi-level indicator values
  • System: “MULTI_JPY” a system for trading the USDJPY using EURUSD as secondary data stream
  • Indicator plot: “MULTI_JPY_IND” an indicator for plotting the multi-level indicator for the USDJPY/EURUSD
  • System: “MULTI_EUR” a system for trading the EURUSD using USDJPY as secondary data stream
  • Indicator plot: “MULTI_EUR_IND” an indicator for plotting the multi-level indicator for the EURUSD/USDJPY

I added an exit to the author’s suggested trading system that uses the multi-level indicator to exit. I then optimized the four parameters of the system and ran the back-test on both of the systems. The equity and underwater curves are shown in Figure 1 and Figure 2. I used daily forex data for the tests from Pinnacle Data Systems. TradersStudio software is particularly well suited for testing forex since it takes into account both the leverage of the account and the interest earned and charged on the overnight positions. In the back-test of the USDJPY, there was net interest paid of $2,307 ($5,490 earned on the longs, $7,797 paid on the shorts). In the back-test of the EURUSD, there was net interest $6,072 ($5,583 earned on the longs, $489 earned on the shorts). Both tests were run over the period 2/2/2001 to 7/13/2012 with leverage set to 25.

Captions:
Figure 1 – Equity & underwater curves for optimized combination trading USDJPY from 2001 to 2012
Figure 2 – Equity & underwater curves for optimized combination trading EURUSD from 2001 to 2012

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

 

 

 

 

 

 

 

 

 

 

 

 

 

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