Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting futures

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

    Backtesting futures

    Hi

    I'm looking for the best way to backtest a strategy on futures. The strategy trades intraday (1min) around monthly HLOC. Data provider is KinetickRT.

    I tried to backtest on 3-13 and merge backadjusted, which gives completely differnt results from ##-## contracts. Unfortunately I couold not find out how KinetickRT constructs ##-## charts.

    My intuition is to rely on backadjusted single contracts, mainly because this avoids the gaps. However I don't know wheter the montly data called from within the strategy is calculated with the the same offset values then minute data. Since backadjusting shifts contracts to unrealistic prices I would need to have the same adjustments in montly and minute data.

    Thanks,

    Marco

    #2
    Hello,

    Go to tools -> Account Connections -> choose your kinetick connection and click change

    Click next until you get to the Login/password page. Here you can choose to check or uncheck use back adjusted data. By default it does not back adjust.

    Please let me know if this does not make your results match in the testing.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi Lance,

      Thank you for your response. Can you tell me what is the proper way of backtesting multiple contracts.

      So far I used continuous contracts (##-##) to backtest, but I read here that continuous contracts are useless for backtesting.

      I'm particularly worried because I use intraday and monthly data, which as I understand come from a differnent database. If daily (that generates monthly bars) data has differnt rollover dates my backtests become worthless.

      Is there any "best practice" note or someone who has experience with backtesting on futures?

      Marco

      Comment


        #4
        Hello,

        When using Kinetick with daily bars (monthly) and minute bars you may see differences in the Closing price as the daily bars use the settlement and the minute bars will use the last traded price.

        With the Continuous contract you're note able to individually set offset amounts when back adjusting but otherwise it should come down to preference. Many other data providers do not support the ##-## contract.

        There is not a "best" method and it will come down to personal preference and you're data goals. If you need the values from the minute closes you could always generate monthly bars from minute data (i dont know off the top of my head how many minutes that would be). Just keep in mind this would take longer to build.

        This post you linked to be more in terms of whether or not you use backadjusted or non-backadjusted data and not whether you use the ##-## or 03-13 etc
        Last edited by NinjaTrader_Lance; 02-18-2013, 12:05 PM.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Lance,

          First of all, my personal preference is to be as close to market conditions as possible. But your suggestion to simulate monthly bars with minute data does not seem straightforward to me. simply because a month can have between 27 and 31 days. Can you think of any other solution to assure that both data have equal values?

          I remember that when downloading data you can set "generate daily bars from minute data'' to true. But I'm not sure if this would overrwrite my existing daily data.

          The post I referred to earlier provides details about "perpetual" or "continuous" contracts and back-adjusted contracts. Continuous are the ##-## contracts in NT and are calcualted by the data provider (Kinetick) through a weightened average of two contracts. Back-adjusted contracts can be obtained in NT when testing the front month (3-13) and setting tools>options>data to "merge backadjusted". It further shows that strategies using previous high/lows cannot be backtested in perpetual/continuous/##-## contracts.

          Yours,

          Marco

          Comment


            #6
            Originally posted by marcoheimann View Post
            Lance,

            First of all, my personal preference is to be as close to market conditions as possible. But your suggestion to simulate monthly bars with minute data does not seem straightforward to me. simply because a month can have between 27 and 31 days. Can you think of any other solution to assure that both data have equal values?
            You could create a time filter that allowed you to store the values that fall within a month into a custom DataSeries however this might be more work than it's worth.

            because your working with multi series you would have to initialize the series differently
            Note: In NinjaTrader 8 It is no longer needed to use an indicator to sync a secondary series. This can be done directly from the Series<T> (https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?seriest.htm) constructor. This post is left for historical purposes. Series objects are useful for

            More on using DataSeries: http://www.ninjatrader.com/support/f...ead.php?t=7299

            I remember that when downloading data you can set "generate daily bars from minute data'' to true. But I'm not sure if this would overrwrite my existing daily data.
            Go to tools -> Historical data manager -> Edit -> select all daily data for the desired instrument by expanding with the + box (or just delete all the data for it if you intend to re-download all of it) -> right click -> delete

            then re-download as you mentioned and check mark generate daily bars from minute data.


            The post I referred to earlier provides details about "perpetual" or "continuous" contracts and back-adjusted contracts. Continuous are the ##-## contracts in NT and are calcualted by the data provider (Kinetick) through a weightened average of two contracts. Back-adjusted contracts can be obtained in NT when testing the front month (3-13) and setting tools>options>data to "merge backadjusted". It further shows that strategies using previous high/lows cannot be backtested in perpetual/continuous/##-## contracts.
            Kinetick data feed will use the offset for its continuous contracts

            The only way you're going to get non adjusted market prices is if you do not merge contracts and were to test one at a time. If you're testing a large chunk of time you're going to have to decide which method of adjustment is most suitable for you.

            Please let me know if I can be of further assistance.
            LanceNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cmtjoancolmenero, Yesterday, 03:58 PM
            5 responses
            26 views
            0 likes
            Last Post cmtjoancolmenero  
            Started by gbourque, Today, 06:39 AM
            2 responses
            14 views
            0 likes
            Last Post gbourque  
            Started by rexsole, Today, 08:39 AM
            0 responses
            4 views
            0 likes
            Last Post rexsole
            by rexsole
             
            Started by trilliantrader, Yesterday, 03:01 PM
            3 responses
            31 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by Brevo, Today, 01:45 AM
            1 response
            14 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X