Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

this is really bad. ¿how is slippage supposed to work?

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

    this is really bad. ¿how is slippage supposed to work?





    people with nt,



    i have been having a pretty bad time trying to figure out how is slippage supposed to work in nt, and how it really works in real life.


    i have read the section that mentions slippage on nt8's guide and it is of no use.



    for starters, i understand that slippage must be defined as an input as a number of ticks, but, ¿after the platform has run an optimization how is slippage reported in the tables with results? i have concluded that it is reported as the number of points for the instruments, not ticks, which would be far more consistent and better. ¿is this correct?



    and then, from all the testing and evaluations i have been performing, i have concluded that nt duplicates the actual effect that slippage would have in a strategy.


    what i mean is that when a strategy is carrying an open position and it then generates orders to close or reverse that position, slippage would only be incurred once in either of those cases (slippage occurs when a strategy has to jump across the bid -ask spread to ensure an instantaneous execution). however, the nt platform seemingly duplicates the cost of slippage as it first adds the number of ticks to the first order that would close a position and then adds the slippage again to the order that would open an opposite position.


    the people with nt can easily verify this situation by creating a simple strategy where a long position is opened if price is above an sma and a short position opened if price is below that same sma on any 1 minute chart. the orders to close one position and open the opposite one would always be simultaneous, so slippage would only be incurred once as the spread is only jumped over once, but the nt platform counts it twice.


    ¿can the people with nt take a look at this? this is pretty bad and it's urgent for me to rectify this malfunction. thanks.


    #2
    Hello rtwave,

    Thanks for your post.

    From the help guide: Slippage - Set the amount of slippage to apply to market / stop market / Market-if-touched order executions (default is 0)
    Reference, " Understanding backtest properties": https://ninjatrader.com/support/help...a_strategy.htm

    Slippage is reported in points.

    Slippage is applied when there is room in the bar for your market order entry/exit +/- the specified slippage. so it is not applied on every order but on every order where this is room. From the help guide:
    Slippage - Slippage can be added to your order fills to help mimic real market conditions. The value is expressed in "ticks", the minimum value of fluctuation for an instrument, and is only applied to market, stop-market and Market-if-touched orders. NinjaTrader will add the slippage to each order however you cannot have more slippage then the high/low price of the next bar.
    Reference: https://ninjatrader.com/support/help...ical_fill_.htm

    Each market order will apply slippage if there is room for it when you specify slippage in the settings.
    Last edited by NinjaTrader_PaulH; 02-27-2020, 01:22 PM. Reason: Changed slippage reported in currency to slippage reported in points.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post

      Slippage is applied when there is room in the bar for your market order entry/exit +/- the specified slippage. so it is not applied on every order but on every order where this is room. From the help guide:
      Slippage - Slippage can be added to your order fills to help mimic real market conditions. The value is expressed in "ticks", the minimum value of fluctuation for an instrument, and is only applied to market, stop-market and Market-if-touched orders. NinjaTrader will add the slippage to each order however you cannot have more slippage then the high/low price of the next bar.
      Reference: https://ninjatrader.com/support/help...ical_fill_.htm

      Each market order will apply slippage if there is room for it when you specify slippage in the settings.


      thanks.



      the fact that slippage is reported as currency is not mentioned anywhere in the help documentation. now that i know this information this is very positive.



      i use non minute bars and market orders always so i would like the value for slippage to be applied to every single order uniformly. when one uses a market order one will always have to jump the spread and will always incur slippage.


      now, the most important issue is the double counting of the cost for slippage. i have noticed this when running optimization and backtesting processes.


      i will try to create a strategy to alternate between a long and a short position at every bar as a way to prove the points i made in my first post. but this should be evident to anyone using the strategy analyzer and calculating how many reversals there are in a backtest and what it the value that nt should then calculate for slippage.

      Comment


        #4


        ok.


        fortunately i already had an alternating strategy ready so i have run some experiments.


        i attach the strategy for anyone who could find it useful.


        the results from my experiments are the following:


        Click image for larger version

Name:	20200226 nt slippage estimations 001.JPG
Views:	493
Size:	163.9 KB
ID:	1088577


        Click image for larger version

Name:	20200226 nt slippage estimations 002.JPG
Views:	472
Size:	143.3 KB
ID:	1088578


        there are 6 instances where an rty contract is bought or sold. i set the slippage to 1 tick, which is 5 usd, so the reported slippage should be 30 usd in currency. this is clearly not the case. if slippage is reported in points as i have concluded from experience, it should be .6, which is much closer to what the platform reports.


        if the platform was applying slippage twice to reversals, i estimate that the total would be 40 usd or .8 points, so it is possible that this issue is not taking place contrary to my perception.


        if the people with nt and other users can take a look at this situation and corroborate whether their results are the same if they perform similar experiments that would be great.




        Comment


          #5


          i have repeated this experiment with stocks, which are the instruments with the which i first noticed this malfunction.


          take a look at this mess. the reported cost for commissions seems to be ok, but ¿what do the numbers for slippage even mean? ¿and how do they translate to the observed net loss?


          Click image for larger version

Name:	20200227 nt slippage estimations 001.JPG
Views:	520
Size:	153.9 KB
ID:	1088687


          Click image for larger version

Name:	20200227 nt slippage estimations 002.JPG
Views:	502
Size:	237.2 KB
ID:	1088688



          as i initially stated, this is really bad, people with nt: please advise.




          and also, ¿why can't the strategy place trades before 11:30 hours? ¿is that another error in the platform? i attach the latest version of the strategy i'm using.

          Comment


            #6
            Hello rtwave,

            Thanks for your posts.

            Regarding slippage, I can confirm the same slippage as what you have shown.

            After further review, slippage it is indeed in points so please accept my apology for incorrect information. I will update my earlier post to show that change

            Regarding the question of "why can't the strategy place trades before 11:30 hours?" the default trading hours for a stock are the US Equities RTH which are 9:30 AM EST to 4:00 PM EST Monday through Friday. You are using Hourly bars. The strategy will run with Calculate.OnBarClose which means that the strategy will calculate once at the end of the bar. If the strategy determines the conditions to place an order, the order would be filled on the subsequent bar, so 1st bar is ignored, 2nd bar places order, order is filled on the 3rd hourly bar. On the second day, the strategy is flat dues to exit on close and when the first bar closes, it places an order on the 2nd bar of the session. You may want to look at the Chart of the display. I've attached a view of the trades on the chart in the strategy analyzer using your strategy and settings. Please note that I am on Mountain time so 2 hours behind EST.

            Click image for larger version

Name:	rtwave-4.PNG
Views:	623
Size:	97.6 KB
ID:	1088703
            Paul H.NinjaTrader Customer Service

            Comment


              #7


              Paul,



              thanks.



              you have confirmed that the nt platform reports slippage in points, which is the same conclusion i had to arrive to by myself some time ago. this is really far from ideal. the user initially has to define the slippage per execution in ticks and then on the reports there are results both in currency and in points. i think the platform should have a consistent output and report all results in currency.


              it would also be positive to present results with a structure like the following:


              Total Net Profit
              Gross Profit
              Gross Loss
              Profit Factor
              ...

              ...

              ...
              Total Slippage
              Total Commission


              even a murderously crappy platform like tradestation gets that right. gross profit and loss already include costs in slippage and commissions and those two components are presented separately further down on the report.



              your explanation for the behavior of the alternating strategy is brilliant and makes perfect sense. it also mentions something that i have given thought to, and that is that the nt platform correctly processes all orders at the open of the following bar which is the most credible and logical way to proceed (other crappy platforms have two options: generate order on the next bar at open or on this same bar at close which leads to nonsense and delusion after gaps in price, but anyway).


              now, in the case of the experiment regarding slippage on stocks, the numbers still don't make any sense. the platform reports a loss of 228 usd, which is more or less credible for a symbol as immobile as ge. however, nothing that relates the slippage makes any sense.


              the platform reports 22 executions in this backtest, which carrying 100 shares of ge and with a value of 100 ticks for slippage should result in a total of 2200 usd for slippage. in contrast, the number that the platform reports for slippage is 20, and i have no idea how to interpret it. i also have no idea how this value of 20 relates to the reported net loss of 228 usd when trading a position of 100 shares. it would be really important if the people with nt could take a look at this.


              i will repeat this experiment with a value of 0 for slippage to use those results to contrast with this backtest that the platform didn't like so much. however, all in all these messy results are in line with my experience so far: slippage in nt is erratic, inconsistent and unreliable. nt should fix this urgently.

              Comment


                #8
                Hello rtwave,

                Thanks for your reply.

                Based on our previous posts, I have already requested a change to the documentation to clarify the units.

                Based on our previous posts, I have already submitted a feature request to allow slippage to be reported according to the units selected. Once I have this feature request i will update this thread.

                Thanks in advance for your patience.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Hello rtwave,

                  The feature request to provide slippage in selectable units is identified as SFT-4683.

                  If implemented, it would be specified in the release notes of the version it is first released in.
                  Paul H.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by GLFX005, Today, 03:23 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post GLFX005
                  by GLFX005
                   
                  Started by XXtrader, Yesterday, 11:30 PM
                  2 responses
                  11 views
                  0 likes
                  Last Post XXtrader  
                  Started by Waxavi, Today, 02:10 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by TradeForge, Today, 02:09 AM
                  0 responses
                  14 views
                  0 likes
                  Last Post TradeForge  
                  Started by Waxavi, Today, 02:00 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Working...
                  X