Quote from syswizard:
I would be willing to bet that DDERequest within VBA is about 10 times less CPU intensive than placing it on the spreadsheet.
Next week, I'll try to prove this.
I once compared just moving data from VBA variables to a worksheet vs. placing them into the windows registry. The latter was 5 times as fast !
Well here are our some crude results from a simulation we ran on the maximum quantity of serialized price data updates we can process using excel /dde/rtd.
By no means is this any type of a scientific in depth study... Just the maximum pieces of data we can reliably receive and process using our trading algo's. Dual core AMD Turion 3GB ram Excel 2007.
Method 1: Circular References and Iterative calculations enabled and set at 250
Over 20 minutes sample period... 1200 seconds received and processed 58172 price updates from a local test server.
48 excel cell updates per second. 1 instrument 5 levels of DOM.
Method 2: Iterative calcs disabled... DDE cell upates.
Only able to process 3324 updates... 3 cell updates per second.
Obviously the worksheet has been optimized for method 1 largely due to the lag experienced previously from method 2.
There is a noticeable stall at the end of the iterative cycle and as orders trigger. Just error checking and data validation overhead.
Considered coding portions as VBA UDF's but found the dynamically adjusting counter provided a better solution for our needs and methodology.
My point is you can receive and process data 3 x faster than you can reliably execute.
TT order processing varies from 20ms to 100 ms or more... out of our control. Just have to wait until our fills are verified.
OEC is trickier to analyze as a positional order ID is instantly generated locally and status changes to completed upon verified fill over essentially the same varying time frames as TT.
Just had to SWAG the order fill times on the safe side. Placed delays for acting on data to 100ms after placing orders so net positions and fills can be verified.
I suppose if you colocate at equinox you can get data even faster directly from the exchange but you are still time cuffed to the fill servers.