Backtest Methodology
Input Data
The backtest draws on our history of stocks in cup-with-handle (CwH)
chart patterns back to December 2004. Although we have watchlist data
back to April 2003, the pattern detection algorithm only became stable
in late 2004. The data used in the backtest is:
- every symbol that appeared on the CwH watchlist by date including
the breakout price by date adjusted for splits
- daily open, high, low close and volume data for all symbols
adjusted for splits.
Opening a Position
The back test begins on the start date you entered and then proceeds to
evaluate potential buys on each day as follows:
- If there are portfolio positions open (as defined by your 'number
of positions') the backtest selects all watchlist symbols for that date
that meet your minimum conditions for purchase. To be considered,
the high for the day must exceed the breakout price (BoP).
- If there are no symbols meeting your conditions, the simulation
moves to the next day.
- If there are symbols meeting your conditions, a position is
opened taking the highest RS Ranked symbol first. The number of shares
purchased is a function of the number of positions open and available
portfolio cash. For example, if there are 3 positions open, the
simulation allocates 1/3 of the available cash to the purchase.
- If you specified 'Buy on Alert' the BoP is used as the basis for
the purchase.
- If you specified 'Buy on Confirmed' the purchase is made using
the next day's opening price provided the symbol closed at or above the
BoP and met the minimum volume to average volume ratio requirement.
- As the portfolio is added to, the number of available positions
is decremented.
- Each position opened is added to the transaction log.
Closing a Position
Each position in the portfolio is evaluated each day against the sale
conditions you specified:
- If you chose the 'Buy on Alert' strategy and the volume on the
buy date did not meet the minimum volume for a confirmed breakout (from
your minimum adv ratio parameter) then the position is closed at the
next session's opening price.
- For BoP stops and trailing stops, if the low of the day is lower
than the stop value the position is closed at the stop value.
- If the high on any day exceeds the target gain %, the stock is
sold at the target gain % price.
- If the maximum hold days is reached, the stock is sold at the
close on that date.
- When a position is closed the sale proceeds are added to the
available cash and the reason for the sale is logged in the transaction
log.
Daily Accounting
As the simulation proceeds day by day, the current portfolio value
(shares and cash) is logged to the transaction log.
Reporting
At the end of the simulation a comprehensive report is produced
including charts and the transaction log.
Backtest Limitations
The backtest does not take account of broker commissions or slippages.
While every effort has been made to ensure the backtest is a fair
simulation of how trading would have occurred, it does not include
discontinued symbols. Historical breakout prices and volumes have been
adjusted for splits so these are consistent with the split adjusted
OHLCV history. Consequently, the actual price at which a stock may have
traded
in the past is not necessarily reflected in the data but the percentage
gain/loss on any particular trade will be substantially accurate.
The backtest results are strongly influenced by the sequence in which
breakouts occurred. The exact sequence cannot be repeated in the future
so future results will be different from the simulated results. The
effect of this sequencing can be seen by varying the dates and length
of the simulation. The effect of sequencing is most evident when
choosing a position limit of one and least evident for a position limit
of twenty.