Skip to content
Dave Mabe
Close menu

Using Setup Columns in a Backtest

By Dave Mabe

Here's a question from long-time list member Rohit A. (name used with permission) about something I said in the Line Your Own Pockets episode called How To Use Candle Patterns in Your Strategy:


Rohit A:

In the candlestick pattern episode, you mentioned that you capture not just the candle pattern for the signal bar, but recent bars as well. I thought this was a great idea, and I’m curious how far back you tend to go when capturing those recent-bar columns. I’m also curious how you think about this across different timeframes. For example, for a 5-minute strategy, I could imagine it being useful to know whether we’re coming off a hammer candle on the 30-minute timeframe. Is that something you’ve found useful to explore?


Dave:

When using a candle pattern for the signal in a strategy (or for any signal, for that matter), I have the backtest collect two types of columns.

One set is from my main column library.

This is the standard library of columns that gets applied to every backtest I run.

The second set of columns is much smaller and specific to the strategy/signal.

I call these Setup Columns to differentiate them from the main column library.

These are columns that apply to the signal.

Because they're so specific to the strategy, it doesn't make sense to put them in the main column library.

For example, let's say your entry signal for a strategy is a hammer candle after a downtrend, and your backtest enters on the open of the candle following the hammer.

Some setup columns might be:

  • The height of the hammer bar in ATR

  • The volume of the hammer bar as a ratio of daily average volume

  • The range of the downtrend in ATR

  • The change of the downtrend in ATR

  • The ratio of the height of the hammer candle relative to the downtrend

These only make sense in the context of this particular strategy and entry tactic.

Now, there is some grey area here - some overlap in what the column library and the setup columns capture.

But that's ok because the Strategy Cruncher will tell me the most predictive columns and rules to apply to the strategy.

So how do you know what setup columns to apply?

This comes from doing a chart review of the setup and asking yourself:

What are the properties of this setup that might make it more or less predictive?

Look for patterns that make the matching trades in the setup differ from each other.

Do you have "coverage" of that property in your column library?

If not, think about the best way to add it to your backtest to give the Cruncher another lever to pull to make your strategy more profitable.

Great question, Rohit, and thanks for sharing with the list.

-Dave

P.S. Do you wish you had a column library that would tell YOU how to make your strategy profitable? My column library is now included with MabeKit Get Instant Access