Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automated trading

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

    Automated trading

    I', new to NT and I'm developing an Automated Strategy. I have a few questions:

    1. How long should be the period of the backtest for being solid? (I'm testing since 12/23/08 to 02/25/09, I don't know way but I'm getting the data from IB and it doesn't allow me to have more data )

    2. If I had 11700$ Net PnL with just 44,19% Profitable (just 86 trades in 2 months), is it solid? or I need to test it for a longer period?

    3. If IBTradeStation closes at (for ex.) 23.30 and I have an opened position, what does the Strategy do? Closes it? or when it reconnets at 00.05 (for ex.) continues?

    Thanks, if I had more questions I'll ask here

    #2
    Hi cozar534, welcome to the NinjaTrader support forums!

    It's hard to say because 2 months of 5 min data should be ok, whereas for an End Of Day strategy it may be nothing. Most importantly you want to make sure all market 'moods' are included in the historical data and that you did not optimize to many parameters to just fit the strategy to the data. Best would be a totally new set out of sample set of data to see if it holds up there...you can also use our walk forward testing option -


    You can't trade overnight with IB as of now, so the strategy would be terminated. Our upcoming NinjaTrader 7 will offer more options in this regard.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I cannot trade overnigth with IB? Why? I didn't know that!
      I don't understand well the walk forward and how it works, can you explain it a little bit please?
      When I will be able to trade overnigth with IB?

      Thanks for the fast answer

      Comment


        #4
        You can check this post for a workaround as one user reported back - http://www.ninjatrader-support2.com/...26&postcount=7

        NinjaTrader 7 will simplify this.

        Walk Forward optimization is pretty straightforward, as it automatically optimizes your strategy on given dataset (called in sample) and then applies it to a new, unseen dataset (called out of sample) to test for stability. This process can help to judge how well your trading logic is holding up for new data the strategy has not seen in the development stage.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks, now I know how to trade overnigth with IB.

          But I still have one doubt about the walk forward tool.
          If my strategy goes from 12/23/208 to 25/02/09 (41 trading days), what should I do to know if that strategy will work from a year period?
          What values do I have to insert at the Optimizacion period (days) and Test period (days). That what I don't understand well.

          Comment


            #6
            1. Optimization period (days) - Sets the number of days used for the "in sample" optimization data set
            2. Test period (days) - Sets the number of days used for the "out of sample" real back test using the optimized input values generated from the "in sample" period


            If you want to test a year, set the Test period to 365 days.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              And how should I set the Optimization Period??
              I mean, I have already backtested from 12/23/08 to 08/25/09.
              I optimized that period and set the optimized variables at the strategy.
              and now? if I want to walk forward a year you told me to set Test period for 365 days and try it setting the Optimization period to 1. Should I set the optimization period to other quantity?
              In the results for the walk forward --> Optimization period = 1
              Test period = 365
              the column (From) its from 12/24/08 to 02/25/09

              I still don't understand well...

              Sorry for this.. and thanks

              Comment


                #8
                Let us take a step back. The way walk forward optimizations work is by taking a certain period in time and optimizing variables against that period. Then it takes the optimized value and tests it in another segment of time in the future to see how it would have performed. This helps in reducing the data fitting properties of optimizing alone.

                Say you set Optimize period to 30. That means you are optimizing your parameters for the first 30 days in your time range. Then it will take those values and walk forward with them for your walk forward period of 365 days.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  ok, It's done, if the results are positive, this means that the strategy is solid?

                  Comment


                    #10
                    Not necessarily. Any form of backtesting only provides you with one possible result from a whole list of results. Good backtesting results do not always translate to good real-time results.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by cozar534 View Post
                      I', new to NT and I'm developing an Automated Strategy. I have a few questions:

                      1. How long should be the period of the backtest for being solid? (I'm testing since 12/23/08 to 02/25/09, I don't know way but I'm getting the data from IB and it doesn't allow me to have more data )
                      Here's my experience: I have had MANY strategies that generated a positive ROI in backtests of 1 to 12 months (I also use IB and their data limitation is 1 year). However, when backtested on data back to 1998, the overall ROI is frequently negative. I suggest that you backtest on historical data of at LEAST a 5 year period to include all types of market conditions. For example, if you backtest for 1 year from today, your strategy has in reality only been tested in a bear market -- therefore, would it perform well in a bull or sideways market? You won't know until you test appropriately. Also, not sure if this applies, but don't forget to include commissions in your backtests -- they add up

                      PS. This is an excellent (and cheap) source of historical data: http://disktrading.is99.com/disktrading/

                      Comment


                        #12
                        Thanks for sharing your experiences Trevor.Richter!
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Barry Milan, Yesterday, 10:35 PM
                        5 responses
                        16 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by DanielSanMartin, Yesterday, 02:37 PM
                        2 responses
                        13 views
                        0 likes
                        Last Post DanielSanMartin  
                        Started by DJ888, 04-16-2024, 06:09 PM
                        4 responses
                        13 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Started by terofs, Today, 04:18 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post terofs
                        by terofs
                         
                        Started by nandhumca, Today, 03:41 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post nandhumca  
                        Working...
                        X