Overcoming the lack of tick by tick data with simulation.

Forums ProRealTime English forum ProOrder support Overcoming the lack of tick by tick data with simulation.

Viewing 5 posts - 1 through 5 (of 5 total)
  • #86566

    I wrote a long only daily strategy that bought at calculated support prices and sold at resistance prices and that required the use of tick by tick data as it used LIMIT and STOP pending orders. It looked great but using tick by tick limited the data sample to starting from just August 2010. The strategy never bought and sold on the same day so I decided to write an indicator that simulated the strategy so that I could test further back – this way I could have a much bigger data sample to test on. Obviously this will only work if your strategy has no zero bar trades – that is ones that open and close in the same bar.

    As well as graphing my simulated equity curve I graphed my ‘onmark’ variable multiplied by the equity to show when the simulated strategy was on market.

    Screenshot_10

    Here is the simulated bit of code – I have removed the actual main parts of the strategy:

    Obviously my strategies entry and exit points are very simple to simulate and so if your strategy is very complicated then simulating it might not be quite so easy – but I post this here just in case someone else might find the concept useful for their own back testing of any strategy with STOP and LIMIT pending orders and no zero bar entry and exits.

    Technically this is an indicator but as it is really a strategy equity curve I post it here rather than in the indicator section.

    1 user thanked author for this post.
    #86570

    I made some slight improvements by adding a buy and hold line and also calculating the win rate and average gain per trade. In fact this is better than the PRT results as you can see historically how the win rate and average return has been rather than just the final totals.

    Screenshot_11

     

    #86575

    I’ve just realised that if your strategy has no zero bar issues of trades opening and closing on the same bar then by just turning off the tick by tick you will get an accurate equity graph – so my above code is a waste of time! I suppose at least with it you can see a running win rate and average gain per trade.

    I won’t delete the posts so that someone might read it and use my experience/stupidity and not waste their own time.

    #86576

    I modified it to just show the win rate and average gain. Maybe it is not all wasted time.

    Interesting to note the win rate dropping but the average gain increasing.

    Screenshot_12

     

    #86940

    Great Vanosi very interisting Thing.

     

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login