Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Replay Questions

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

    Market Replay Questions

    Hello,

    I am working to test a strategy using market replay. I have been using backtesting and optimization to develop the strategy further, but now I would like to see if it works in real time. So I have been trying to use market replay data I have been collecting for SPY to do this, but I have quickly learned it is not so easy to match the real time with backtesting. I've been reading some of the prior posts on this to familiarize myself with some of the issues, but I still have some questions as I am having difficulties getting reasonable agreement between the two.

    1. Does replay have issues if you fast forward (I'm not talking about using the slide bar) using the 1x to 500x options? It almost seems as if it loses itself if you fast forward using too high of a rate (like 50x or 500x). Is using the slide bar to skip forward and using the fast forward button the same thing? I know that as soon as you slide the bar backwards or forwards, it resets itself.

    2. How does the session template effect the market replay? I have tried the "use instruments settings" and "Default_24/7" options, and get significantly different results at times...

    3. During my testing, using very short duration parameters (like a few days) with only a weeks worth of data loaded, the replay seemed to work perfect and match the backtesting. But as I go to longer periods, most of the time I only get the first day of replay to match backtesting then the remaining days do not agree. Not sure if this sounds familiar or not.

    As a little background, I am using COBC for the strategy to try and better match the backtesting results. I also am using Yahoo finance saved data as my replay data... So how does the quality of this data effect replay performance? For longer term periods, I have historical data exceeding the parameter requirements I am using. That leads me to another question regarding the min bars required. As long as I have the min bars required set to the max bars used in the strategy, I should have better correlation??


    I realize its not easy to help troubleshoot these issues as there are many variables including the strategy and indicators themselves. But any suggestions or insight would be greatly appreciated.

    Thanks,

    Lee

    #2
    1) no.
    2) it depends on off your strategy takes trades after hours or not.
    3) it also depends on what you are doing.

    Comment


      #3
      Hi sledge,

      Thanks for the info. Regarding item 1, then it must be the data I'm using or the strategy I've developed. If you use the slider bar to move backwards or forwards, doesn't it reset itself and cancel all orders?

      For item 2, I only want to trade during market hours (I'm using SPY) as I am using only market orders at this time. Should I be using "use instrument settings" and that will prevent after hours trades?

      For # 3, you said it depends on what I am doing. In what situation would it agree with the first day, but then not agree with the remaining days and still be correct (correlate with the backtest results)? I would think that even if the first day agrees with the backtesting results, it is not working correctly because I have something incorrect in the strategy or settings. Maybe I just got lucky the first day...

      Thanks again for the all the help,

      BTW, you were correct about the Filling of the order in market replay. I was using SP500 and it would not ever fill the order. I switched to using SPY now and it correctly fills the order once the order is executed. Thanks for that solution!


      Lee

      Comment


        #4
        Originally posted by lee612801 View Post
        Hi sledge,

        Thanks for the info. Regarding item 1, then it must be the data I'm using or the strategy I've developed. If you use the slider bar to move backwards or forwards, doesn't it reset itself and cancel all orders?
        Sorry, I was on a bus earlier when responding.

        Yes - moving the slider around resets everything. Orders cancelled, ?strategies disabled? Only do that or use the go to date/time (right click) when starting out.

        After that point, 1x or 500x is the same. Sometimes you might test months,so put it on 500x and come back later. Sometimes you need to see what is happening intraday, so 5x might be the ticket for you.



        Originally posted by lee612801 View Post
        For item 2, I only want to trade during market hours (I'm using SPY) as I am using only market orders at this time. Should I be using "use instrument settings" and that will prevent after hours trades?
        It should - although I haven't done tested that. I always put into the code a time check.

        Code:
        [B]OnBarUpdate
        [/B]...
        
        if (   ToTime(Time[0]) >= ToTime( 09, 30, 00)
        	&& ToTime(Time[0]) <= ToTime( 16, 00, 00))
        {
        	//Logic goes in here
        	
        }



        Originally posted by lee612801 View Post
        For # 3, you said it depends on what I am doing. In what situation would it agree with the first day, but then not agree with the remaining days and still be correct (correlate with the backtest results)? I would think that even if the first day agrees with the backtesting results, it is not working correctly because I have something incorrect in the strategy or settings. Maybe I just got lucky the first day...
        Not familiar with your strategy or testing, so I really can't guess. I haven't used strategy analyzer, so I have nothing market replay results to compare with. But if your COBC=True it should be really close.

        Originally posted by lee612801 View Post

        BTW, you were correct about the Filling of the order in market replay. I was using SP500 and it would not ever fill the order. I switched to using SPY now and it correctly fills the order once the order is executed. Thanks for that solution!

        Lee
        Is this a buy and hold type strategy or an intraday strategy? Are you just testing a few things out to see if they would work? The tax implications of buying/selling SPY intraday would result in a lot of wash sales, no? I haven't paid attention to wash sale rules since moving over to the ES market a few years ago. I got tired of wash sale rules.

        Comment


          #5
          Originally posted by lee612801 View Post
          ...
          For item 2, I only want to trade during market hours (I'm using SPY) as I am using only market orders at this time. Should I be using "use instrument settings" and that will prevent after hours trades?
          Use the appropriate template or use time filters. SPY trades 24/5, so if you want to trade only market hours, then use the correct Market Hours Session Template.

          Comment


            #6
            Hi guys,

            sledge,

            Right now I'm just testing things out to see how they perform. I'm not working a buy and hold strategy, but I also would not say that its necessarily a intraday strategy. But I will certainly consider your point on the wash sales.

            koganam,

            Considering my less than prolific understanding of the trading session, can you provide a little more explanation on the session templates? I did a little searching but I couldn't find just some basic description of what it is or differences. What does it mean to trade 24/5? If I just want to trade during the market hours, should I just implement the time filter the way sledge suggested? If I implement the time filter, does it matter then what template I use?

            Thanks,

            Lee

            Comment


              #7
              Originally posted by lee612801 View Post
              Hi guys,

              sledge,

              Right now I'm just testing things out to see how they perform. I'm not working a buy and hold strategy, but I also would not say that its necessarily a intraday strategy. But I will certainly consider your point on the wash sales.

              koganam,

              Considering my less than prolific understanding of the trading session, can you provide a little more explanation on the session templates? I did a little searching but I couldn't find just some basic description of what it is or differences. What does it mean to trade 24/5? If I just want to trade during the market hours, should I just implement the time filter the way sledge suggested? If I implement the time filter, does it matter then what template I use?

              Thanks,

              Lee
              I'm not sure SPY trades 24 hours 5 days a week... At least with TDA.. might be 5 or 6 am to 8pm...

              But you should check a 9:30 to 4:00pm SPY.... but then again we don't know what 'indicators' you are using and if you want any of the night session to be taken into consideration.

              but kogo does suggest to set up a session template ...tools->session manager... well you could at least find one in there, like RTH (real time hours) or ETH (extended time hours)... and apply that to your strategy/chart..and it should take effect.

              Comment


                #8
                Hi guys,

                I look for Market Replay Data ES 06-10...

                Can you help me?

                Thanks

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Waxavi, 04-19-2024, 02:10 AM
                3 responses
                41 views
                0 likes
                Last Post gaz0001
                by gaz0001
                 
                Started by Max238, Today, 01:28 AM
                2 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by Shansen, 08-30-2019, 10:18 PM
                25 responses
                949 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by JonesJoker, 04-22-2024, 12:23 PM
                8 responses
                42 views
                0 likes
                Last Post JonesJoker  
                Started by timko, Today, 06:45 AM
                0 responses
                5 views
                0 likes
                Last Post timko
                by timko
                 
                Working...
                X