The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Synopsis

Trading Venues either stream data (sending updates as they occur) or batch changes into a single update, sent at regular time intervals. A batch update may require one or more messages from the Trading Venue. Several Markets may change in the original batch update but not all Market updates are guaranteed to arrive at the same time if they are split over multiple messages. This can cause the appearance of a false arbitrage opportunity. 

Info
titleExample
(EUR/USD, USD/JPY, EUR/JPY) price updates for the following markets originate from the Trading Venue
(USD/JPY, EUR/JPY) prices arrive first with no update to (EUR/USD); BUY signal is registered
(EUR/USD) then arrives; Although BUY Signal is no longer valid.


Use Cases

Batched market data updates are only available on Feeds with Trading Venues that provide them, typically time-sliced feeds provided by venues such as EBS. Streaming feeds (such as HotspotFX via ITCH, or CME) don't have any batched messages, so MD messages always consist of a single batch.

...

Info
titleNote

onBatchComplete() is meant to be used only for strategies which have an interest in multiple currency pairs simultaneously; for example, if you implemented some arbitrage strategy between currencies A and B, you may want to hold off triggering sending orders if you got an AB batched update but you've only received A so far (the strategy would see an updated A book and an outdated B book; -It is known an update for B is coming but it has not been received yet).

When the corresponding MD update for B arrives, if the instance has registered an interest for AB batches, onBatchComplete() should be called after
onMarketData(B) is called.


Sequence Diagram 

Note
titleTODO
To be continued...