Entering the Price Zone

Original article by Walid Khalil and David Steckler in Stocks & Commodities
AIQ Code by Richard Denning

The AIQ code for Walid Khalil and David Steckler’s article,
“Entering The Price Zone”, is shown below. I coded both the Price Zone
Oscillator (PZO) and Volume Zone Oscillator Indicator (VZO) (from the
prior month’s article by the same authors) along with the system that
uses the PZO or VZO indicator. There is an input at the top of the code
called “usePZO”. When this input is set equal to “1” then the indicator
and system use the PZO. If set to any other value, then the indicator
and system use the VZO oscillator. I had to use my own interpretation of
what the divergence sell/cover rules of their system mean since the
exact code for this part of the system is not given in the article. Also
note that the non-trending case is provided with this code but tests of
the rule “BuyNoTrnd” showed that trading only when the market is
trending was the better choice. As a result, my tests below were of only
the trending portion of the system as I had done in last month’s tests.
I ran a back test using the Portfolio Manager module from 1/1/98
to 4/8/11 using the NASDAQ 100 list of stocks. In Figure 1, I show the
test results of simulating trading the NASDAQ 100 list of stocks, using
the following parameters for capitalization:

1) Maximum positions per day = 3
2) Maximum total positions allowed = 10
3) Choose candidates using ADX values in descending order
4) Size each position at 10% of total account equity recomputed every day

For the test period, the average annual return was 11.3% with a maximum drawdown of 67.7% on 02/07/03.

In last month’s issue, I ran a similar test using the VZO
indicator and the results were slightly better than using the PZO
indicator with this system.

The short side test was unsuccessful as the system lost all
its capital during the early years of the test. These results are not
shown in any figures. I tried adding an index trend filter but this did
not save the short side from total loss.

Figure 1
– PZO system equity curve trading longs only using the NASDAQ 100 list
of stocks compared to the SPX index for the test period 1/1/98 to

EDS Code for Entering the Price Zone:

(right click and choose Save As) 

Leave a Reply