Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stress Testing

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

    Stress Testing

    This question is more for NT users like myself, although I am happy to hear any input from the NT_Group.


    I am stress-testing a new strategy.

    Currently, it uses a custom list of 70 individual securities, but in theory I could use it for as many names as would seem to work well with the strat.

    On a daily basis, I am running two separate SIM accounts (SIM 101 and SIM 102) to optimize parameters of the strat. This equates to 140 simultaneously running scripts on 70 names. I had started with 210 (70x3), but it chewed through my CPU/Memory too quickly and caused frequent crashing so i dialed it back by one third.

    My question(s): How hard can you push your NT strategies (if you do this), and what type of hardware specs/settings have made any difference for you?

    I run:

    Vista 64 Premium
    8GB RAM
    Intel quad core processor 3.0GHZ

    and running the 140 scripts can use between 40-60% of my resources.

    Again for those to whom this applies, what kind of hardware do you use, and how hard can you push your application performance.

    Thanks in advance,

    Andrew

    #2
    Andrew,

    I think I'll let others comment here. However, note that you might be able to make your script more efficient just by changing some operations around.

    For example, say we are iterating through i on the following :

    Code:
    for ( i = 0 ; i < P ; i++ )
    {
         Sum = Sum + (i * A) / P + ((i+1) * B )/ P  ;
    }
    Simply changing the algebra around a little actually will reduce the number of operations we have to do here per for-loop iteration.

    The former expression is equal to :

    Code:
    = ( i * A + i * B + B ) / P
    
    = ( i * (A+B) + B ) / P
    Which is already a reduced expression, however we can go a step further here.

    Code:
    = i * (A+B)/P   + B/P
    Notice B/P is never changing, so we can actually pre-calculate this and add it at a separate time.

    A reduced expression of the above would then be :

    Code:
    for ( int i = 0 ; i<P ; i++ )
    {
    
    Sum = Sum +  i * (A+B)/P;
    
    }
    Sum = Sum + P*(B/P);
    Also notice what P*(B/P) is.....

    This example is contrived, but it happens a lot when you are coding things. For each for loop we reduced it from 3 additions, 2 multiplications and 2 divisions to 2 additions, 1 multiplication and 1 division. Processors can perform only a set number of operations per cycle, so actually we will have sped up our algorithm here.

    To a mathematician both methods are equivalent, but from an engineering perspective it's not the same. One is more computationally efficient than the other.
    Last edited by NinjaTrader_AdamP; 10-02-2012, 07:23 AM.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Adam, I will take a look at some of my calcs and see if I am asking the code to do things that could be simplified.

      That said, I would like to hear about people's thoughts as well if possible.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DanielTynera, Today, 01:14 AM
      0 responses
      2 views
      0 likes
      Last Post DanielTynera  
      Started by yertle, 04-18-2024, 08:38 AM
      9 responses
      41 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by techgetgame, Yesterday, 11:42 PM
      0 responses
      12 views
      0 likes
      Last Post techgetgame  
      Started by sephichapdson, Yesterday, 11:36 PM
      0 responses
      2 views
      0 likes
      Last Post sephichapdson  
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,615 views
      0 likes
      Last Post aligator  
      Working...
      X