Real-time trade 'recorder'? | Traders Hideout - futures trading strategies, market news, trading charts and platforms

Traders Hideout

Discuss day trading practices and futures trading strategies on this forum for all markets. This forum is also for discussing and reviews for brokers, data feeds, and commercial or third party add-ons


Real-time trade 'recorder'?

  #3 (permalink)

New York, NY
Trading Experience: Beginner
Platform: Vanguard 401k
Broker/Data: Yahoo Finance
Favorite Futures: Mutual funds
Posts: 1,039 since Jul 2012
Thanks: 713 given, 2,129 received

The results need to be server-rendered if you want a real-time streaming dashboard. I think the simplest setup is to do this with basic Apache/HTTP. The backend that computes your statistics could be anything, really. Something like Go, Ruby, Python should sit well with a HTML/AngularJS frontend; if you need plots, for these type of statistics, you don't really have to write your own fancy UI code, you can use existing libraries. Aside from how you do threading, I think the number of strategies has very little to do with how well your solution handles this. You can communicate over JSON which will be one of the slower parts of the entire stack, but it will probably still be seamlessly fast to the naked eye if you do it right.

I've coded up something similar to what I've described above in a couple of days that produced real-time analytics down to every trade but also fetched historical summaries. Here's a screenshot of it computing summary statistics on an entire day across multiple data centers. I uncensored 1 data center where the strategies sent out about 1 million orders and canceled about 880k orders in just one data center, which notwithstanding fills would probably be around 0.1% to 0.3% of the CME's order activity across every symbol nowadays.

Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

And I could drill down on the positions and individual orders of individual strategies like this seamlessly as well:

Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

As for how you collect the data, the simplest way to do this is to store this after you serialize the outgoing messages or deserialize the incoming messages. Unfortunately, a third party vendor like NT most definitely uses some kind of binary format behind the scenes that you won't be able to decode easily. So the easiest way you might be able to do this while relying on them is to write a custom strategy or indicator that runs in the background and uses their API to access the incoming fills, and have your trading strategy serialize the data associated with outgoing orders.

You'll want to store only the lowest level information like that and then compute whatever's higher level like strategy PnL in the server backend.

Reply With Quote
The following 3 users say Thank You to artemiso for this post: