OpenQuant can backtest on Level II / Market Depth / Order book data... since 1997 


Quote from mhtrader:
I remember years ago removing for example couple of x86 32bits floating point instructions from loops that goes around 1 symbol( some intraday 10 years back data, or something like that ).. And having a speed improvement of +20%. I'm backing what I'm saying with facts and personal experience.
I'm gonna post couple of dis-assemble examples soon in IL( and then jittered version in x86 32bits ) and also same version in C++ optimized code... something like: c=a+b; or something at that level of complexity: If that doesn't convince people.. and they want "to believe" in a non-faith related, pulverized-by-facts idea, then thats their choice![]()
Quote from jedwards:
My point is, you wanted to ask people for advice on your trading platform, and this has devolved into a 9+ page argument over which is the better language. You might be enjoying the arguing, but the thread has been completely overtaken by a topic that has nothing to do with your original intent.

Do you mean backtesting aggregates like % of winners and profit factor? Or historical values of unnamed proprietary indicators?Quote from mhtrader:
A question I have for mostly traders: how do you guys feel about the idea of sharing with other users the result of your calculations (not your trading strategies, but thats a possibility too) as an option?
Well, there are some things (like entry and exit points) that people consider proprietary as there is a potential of "bootstrapping" a trading strategy from these... but lots of aggregate data like above only become sensityve when actual financial data is involved. For example, if you say "on a backtest my strategy produces 150% retrun" no one will blink, but if you say "I started managing a 100mln portfolio 3 years ago and produced annualised 150% returns since then" this may raise a few eyebrows.Quote from mhtrader:
This kind of goes against the current paradigm where everybody wants to encrypt everything and secure everything... isn't is time for a "paradigm shift"?![]()
Quote from OpenQuant:
OpenQuant can backtest on Level II / Market Depth / Order book data... since 1997![]()
Quote from Swarm:
C# comes in substantially slower than C, Java and even Haskell.
Whether C# is slower or not, there is no way it's 40x300=12,000 times slower. It must be the platform doing lots of background processing (like creating "order" objects), which you don't need in a backtester written with a specific strategy in mind.Quote from Swarm:
It can but it is excrutiatingly slow. When I backtested my forex strategy on OpenQuant it took 40 seconds against 10 years of hourly data (~ 60,000 bars).
My C code, can do 300 backtests per second with the same strategy and data. Must be another example how C# and .net is faster than native C code on a Windows platform (not).
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static int func( int param1 )
{
int x = 0;
int nTicks = System.Environment.TickCount;
for( int i=0;i< 30000000; i++)
{
x = x + param1;
}
for (int i = 0; i < 30000000; i++)
{
x = x - param1;
}
int nTimePassed = System.Environment.TickCount - nTicks;
Console.WriteLine( "Milliseconds: " + nTimePassed.ToString() );
return x;
}
static int Main(string[] args)
{
int x = func(1) + func(2) + func(3) + func(4) + func(5) + func(6) + func(7) + func(8) + func(9);
while (true);
return x;
}
}
}
#include "stdafx.h"
#include <windows.h>
int func( int param1 )
{
int x = 0;
unsigned int uTicks = timeGetTime();
for( int i=0;i< 30000000; i++)
{
x = x + param1;
}
for( int i=0;i< 30000000; i++)
{
x = x - param1;
}
unsigned int uTimePassed = timeGetTime() - uTicks;
std::cout << "Milliseconds: " << uTimePassed << "\n";
return x;
}
int _tmain(int argc, _TCHAR* argv[])
{
int x = func(1) + func(2) + func(3) + func(4) + func(5) + func(6) + func(7) + func(8) + func(9);
while(true);
return x;
}
Quote from Swarm:
It can but it is excrutiatingly slow. When I backtested my forex strategy on OpenQuant it took 40 seconds against 10 years of hourly data (~ 60,000 bars).
My C code, can do 300 backtests per second with the same strategy and data. Must be another example how C# and .net is faster than native C code on a Windows platform (not).
Have a look at the great computer language shootout :-
http://shootout.alioth.debian.org/u32q/which-programming-languages-are-fastest.php
C# comes in substantially slower than C, Java and even Haskell.