Announcement

Collapse
No announcement yet.

Back Testing - Replay Mode - Real Time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Back Testing - Replay Mode - Real Time

    Hi,
    Back Testing is a nice function, but between back testing and realtime trading is a big difference.
    When I run Back Testing with e.g. the MACD, it shows me a nice profit. But when I run the MACD with automated trading in realtime, my profit is nearly zero.

    - Is it possible to get the realtime data for YM at the end of the day, maybe in a file for download?
    - Is there a function to save the realtime data on my own?
    - Could I take this data also for back testing?

    regards
    sams

  • #2
    sams

    - Is it possible to get the realtime data for YM at the end of the day, maybe in a file for download?

    You can download up to 10 days of tick data to use with the Tick Replay tool.
    For instructions on how to use Tick Replay see the Tick Playback.doc Word document that is available here

    - Is there a function to save the realtime data on my own?

    You would need to use some third party application to do that in real time. Alternatively you can use the Data Export tool (right click chart, select Tools->Data Export)

    - Could I take this data also for back testing?

    No eSignal does not plot external data

    With regards to the Back Testing results being very different to those in real time you may also want to check that the strategy behaves in the same way under both conditions. That said there will still be differences in the results (slippage, trades not executed, etc)
    Alex

    Comment


    • #3
      Alexis,

      thanks for your fast answer.

      Could you or someone else please a little more explain, why are differences between back testing and automated-efs-realtime trading?

      One problem is, that the automated trading will buy or sell a few times more, because sometimes you have an alert "two" times on a one minute chart.

      I have the MACD as signal.

      Is it possible to get nearly the same results in back testing as in automated-efs-realtime trading or is it better to work with the Tick Replay Tool?

      Regards
      sams

      Comment


      • #4
        sams

        Is it possible to get nearly the same results in back testing as in automated-efs-realtime trading...?

        Excluding any issues related to the market being traded (liquidity, etc) it is theoretically possible to get real time results that are similar - albeit never identical - to those of back testing. However to do this you need to ensure that the signals are triggered under the same conditions which may require separate sets of code for use in real time and in back testing.
        Alex

        Comment


        • #5
          Tick Replay Tool

          I tested the automated-efs-trading with the Tick Replay Tool. I run it several times with the same efs, but I got always another summary of realized P/L (50% difference). Only the number of trades was always the same.
          What do I make wrong?

          regards
          sams

          Comment


          • #6
            sams
            Are you saying that Back Testing is returning results that are different from those you get when running the same efs in real time?
            If that is the case then you need to ensure that the real time signals are triggered under the same conditions as in Back Testing.
            For example the Back Tester uses only completed bars to trigger the signals. If you are using the same efs in real time you may find that multiple signals are generated during the same bar or that conditions that are true intrabar may no longer be true at the close of that bar.
            Without seeing the efs you are using it is virtually impossible to determine what may be the cause of these differences
            Alex

            Comment


            • #7
              Alexis,

              I have attached two efs-files, one for backtesting (bt-ema3_9-040906.efs - next post) and one for automated trading (at-ema3_9-040906.efs). The signal is always the same, exponential MA3 and eMA9 crossover.
              With Backtesting I am getting nice results, but in real time with automated trading I am getting a big loss. Why is the automated-efs study totally wrong?
              I tried also to change eMA3 with eMA9, then the loss is not so big. But I can´t understand this, it´s not logic.

              The other thing is when I am working with the "Tick Replay Tool" I am getting never the same result, when I am running the Tick Replay Tool several times with the same study.

              regards
              sams
              Attached Files

              Comment


              • #8
                missing file
                Attached Files

                Comment


                • #9
                  sams
                  The main reason you are getting some nice results with the back testing version of the efs is that you are buying and selling at the Open of the bar that triggers the signal which is unrealistic since the signal is generated at the completion of the bar.
                  In that efs replace either Strategy.MARKET with Strategy.CLOSE or (preferably) Strategy.THISBAR with Strategy.NEXTBAR.
                  You will very likely see the results become a lot less "nice".

                  As to the efs for use in real time it will inevitably give you very different results when compared to the back testing version because it is generating a lot of false trades. By false trades I mean trades that are triggered intrabar by a signal that no longer exists once the same bar is completed. While that may be what you want - and I do not know that - you need to realize that the two efs are generating signals under different conditions which is what I have been saying all along in this thread.
                  A quick comparison using Tick Replay yields the following results.



                  In the top chart is your real time efs and in the bottom one a modified version of the back testing efs that generates signals only at the close of the bar.
                  As you can see in the course of barely an hour of Tick Replay your efs has triggered 4 trades (indicated in the chart with an arrow) that do not exist in the back testing version.
                  If you want the real time and back testing efs to provide similar results my suggestion is that you modify your real time version to trigger signals only at the completion of the bar.
                  Alex

                  Comment

                  Working...
                  X