Guest Post by DV34

Here is the 4th post in guest blogger DV 34's series of practical articles on how to go about back-testing

As per my original back- testing article part 1 the next phase of manual back-testing involves recording the results,

The basic outline of what we are trying to extract (although not exhaustive) are listed below

C) RECORDING RESULTS

  • Capture raw data, namely:

  1. Security/ Item
  2. Buy/Long or Sell/Short?
  3. Date (Entry)
  4. Time (Entry)
  5. Lots/ Units
  6. Stop Loss Price
  7. Entry Price
  8. Target Price
  9. Exit Date
  10. Exit Time
  11. Exit Price
  12. Risk in $ from entry to stop loss (or pips)
  13. Reward in $ from entry to target (or pips)
  14. Reward to Risk Ratio ‘R’ Multiple of each trade
  15. Potential Reward to Risk in $ (or pips)
  16. No. Wins
  17. No. Losses
  18. Total Trades
  19. No. Days in Trade

Seeing I use Forex Tester, a trading simulator it makes this process a little easier, however there is still a little work to be done before we can pull out the useful statistics we need

As a recap the raw results from the 1 hour test are shown below:

Click to Enlarge Click to Enlarge

I will briefly reiterate a couple of notes on the results data above, namely:

i)                    A fixed spread is already included of 3 pips which is reasonable in this pair

ii)                  Each setup has two orders entered as I am scaling out at 2x targets.

iii)                 Also note that the position size is the same for all trades at 0.1x lots, this is deliberate

I personally use Microsoft Excel spreadsheets to analyse my results, but in order to do this effectively there are a couple of things we need to do first to clean the results into a format that are usable and accurate in excel.

The items we need to address are:

1)                  You need to sort the results by the order number if you scaled out of positions to make sure the trades are in the correct sequence

2)                  Converting all date/ time values into valid date/ time formats so that the spreadsheet can recognize them, unfortunately Forex Tester enters a date and time together as a text string (which is not that useful)

The way to do this is to create additional columns and split the individual parts out (day, month, year, hour, minute etc, This can be done using= left(), =mid(), =right() formulas in excel and then rejoin them back together using =date() and =time() in separate columns

3)                  If you trailed stop losses you need to correct your data to show the original stop loss, this is crucial as it defines your original risk.

This is main reason my testing rules were to only trail stop losses after my first target was hit, was to ensure that my original stop loss was always captured in the data – otherwise you will have to review all trades and re-enter the original stop losses manually

If you scale out of positions both trade legs should have the same initial stop loss,

4)                  Delete any trades that do not fit within the minimum risk parameters, (in this case it was <10pips risk)

As you can see I have done steps 1-4 below

Click to Enlarge Click to Enlarge

The next step is to determine the number of pips/ dollars risk, closed pips won or lost, potential pips profit and number of days in the trade for each line, also marking if the trade was a win or loss etc and the total number of trades.

Click to Enlarge Click to Enlarge

From this point, if you have a simple entry, stop, target strategy with one line per trade then it is quite easy to work out your reward to risk/ trade and statistics; however if like me you use scaling techniques it can become a little more difficult.

This is because there is a possibility that one leg may win and the other leg of a trade may lose or hit a trailing stop loss, you can see an example of this on orders 10-11 above

This can affect the win% as it shows a loss in one leg of a winning trade, whereas if you considered the entire trade as a whole – it was still a profit.

For example:

With a simple 1 entry, 1 exit, 1 target approach the reward to risk is very easy to measure

e.g.       $1.00 risk, $2.00 reward to target

= 2:1 Reward to Risk Ratio

However with a scaled approach at 50% each leg it becomes slightly more complicated

e.g.       $0.50 risk, $0.75 reward to target 1 (1.5:1 1st leg)

$0.50 risk, $1.50 reward to target 2 (3:1 2nd leg)

= $1.00 risk, $2.25 reward (combined)

= 2.25:1 Reward to Risk Ratio Overall

What can now also happen with a scaled approach is:

e.g.       $0.50 risk, $0.75 reward to target 1 (1.5:1 1st leg)

$0.50 risk, -$0.50 loss to target 2 (-1:1 2nd leg)

= $1.00 risk, $0.25 reward (combined)

= 0.25:1 Reward to Risk Ratio (Overall)

To counter this effect I grouped the scaled trades together to show the “overall” trade results, I believe this is slightly better for me as it shows the true setup results, but if you do not know how to do this then it is not absolutely critical

What is important to note is that scaling in or out and trailing stops etc can complicate how you measure results.

Below is a table of my grouped trades, I hid some columns and I included some additional fields including:

a)      The closed reward to risk ratios for each trade

b)      The potential reward to risk based on my initial targets (including the effect of scaling)

c)      The % of total potential profit that was taken based on my targets

d)      The cumulative Reward to Risk Ratios

e)      The cumulative “R” Multiple  drawdown

f)        The series of losses in a row

This is where we start to pull out the strategies statistics... and you can see the combined trades as all lot sizes are now 0.2 lots for each date and time

Click to Enlarge Click to Enlarge

The resulting Reward to Risk (‘R’ Multiple) distribution charts for this test were:

Click to Enlarge Click to Enlarge

Click to Enlarge Click to Enlarge

Click to Enlarge Click to Enlarge

This strategy does not trade very often averaging 18 trades/ year on a 1 hour chart, but was clearly more active during the bear markets of 2001-2002 and 2008-2011.

In the next article I will look at the statistics for this test in a bit more detail...

Hope this helps,

DV34