Hi guys, I wish to know if it exist any built in solution to reply market data with kdb+.
Thanks in advance for your help.
Mathieu
Hi guys, I wish to know if it exist any built in solution to reply market data with kdb+.
Thanks in advance for your help.
Mathieu
Hi Mathieu,
exactly what format is your market data in??
If it is already in kdb tickerplant log format then you can replay using -11!
Terry
Hi Terry
I have checked -11! usage. it is neat, thanks
correct me if I am wrong - it seems to replay all entries of the log file at “equal speed” - basically, as fast as the cpu can read and value the lines of the log file.
it is more desirable to replay the ticks observing the intervals in between successive ticks - e.g. if first event happens at 9:00:00.000, second at 9:00:00.100 and third at 9:00:01, then interval between the third and second events should be 900ms, and the interval between the second and first events should be 100ms (or you can accelerate the replay, but still observe the relative event intervals)
does KDB offer a standard way to do that ?
Thanks
That would be quite hard to do in kdb land because you’d need to have tight control over time intervals. There’s no out of the box way to do that.
I guess it depends on what accuracy you require but you’d need to use the q’s timer and elicit the inserts in .z.ts or use a system sleep command. Either way you’d need to read the log file into memory first.
I would recommend writing a small c program loaded into kdb that can read the file in and do the timing itself, calling a q function whenever an insert needs to happen.