Advice on best way to backtest past trades

Discussion in 'Strategy Development' started by InTheZone, Sep 24, 2003.

  1. Hello,

    I am interested in backtesting my past day trades on the e-mini SP futures contract.

    What I'd like to do is see the effect of different time frames, trade management and position sizing combinations on the trade entries I had taken.

    I have my entry price, entry date, and exact entry time of all of my past trades (over 300 individual trades, over the past year). I'd like to be able to use my actual entry price info to determine the entries in the backtesting.

    Almost all of my trades were day trades, that opened and closed during the regular trading hours. A few trades took place outside of regular trading hours in the overnight sessions.

    The actual time frame traded is as small as the 2 minute chart. I would like to vary the time frame to see it's effect (ie, manage the trade on the 15 minute chart, instead of the 2 minute chart).

    Some other ideas I'd like to test would be:

    + Vary size of the intial stop.

    + Varying the trailing stop management

    + Experiment with trading multiple units and partial profit taking

    Any suggestions as the best way to implement this?

    I am open to learning a new programming language (EasyLanguage, WealthLab, Visual Basic, C++, etc.), but of course prefer to spend less time programming, and more time on testing.

    Thanks for your advice.

    -- ITZ
  2. what you have is a time series with entries, of types 'long' and short'.

    You might have to do this by hand (or try some boolean logic in an excel spreadsheet), and code each buy and sell as "1" and "-1" respectively, so that you end up with two columns 'time/date' and 'entry' or whatever you want to call it.

    Import this however you need to into your backtesting software (as 'other instrument data' from a .csv file or whatever).

    Now create a new trading system to test, that buys when your new signal is '1', and sells when it's '-1', and program your stops/exits whatever exactly how you like on that platform.

    Hope this helps.


    PS. Hopefully your analysis package can handle the datetime field correctly when you change timeframes-- this may change the assigned price significantly (on something like ES). If not, get creative with the functions in excel, and create a copy for each timeframe you need to use. For systems analysis, I use Neuroshell + an MTF addon; I don't know how to do it with other platforms. Trying to code it in C++ would be a nightmare, but smartquant (or or whatever) is now available for cheap if you're a non-professional.
  3. Thanks for your suggestion. It is helpful.