[erlang-questions] trading systems

Jayson Vantuyl kagato@REDACTED
Thu Oct 1 21:04:13 CEST 2009

In trading systems, timing is everything.

Basically, you are writing code that eventually figures into executing  
trades (sometimes automatically).  In the automatic systems, you are  
literally racing other systems.  This particular race is so  
competitive (and lucrative) that companies build datacenters closer to  
the trading house just so that they have less latency.  It is not  
unheard of to even tweak the communications timing on their uplinks,  
use fibre just to shave off a few ms, or even embed assembly code.

In extreme cases, people have systems that watch for large buys /  
sells, predict the follow-on effect it will have on the market, and  
try to wedge in their own order to capitalize on the inevitable (but  
lagging) price shifts.  In any other industry, this level of  
optimization would be well into the "diminishing returns" area.   
However, financial markets operate at a big enough scale this sort of  
thing is still quite profitable.

On Oct 1, 2009, at 11:43 AM, Kenneth Lundin wrote:

> Joel
> Please explain more.
> I have also heard about the latency requirements for trading systems
> but they are still very diffuse
> to me. I got the impression that latency is a big selling point for
> trading systems but in reality there might be
> other factors that are more limiting and makes the hunting for latency
> under a certain level unnecessary.
> Please explain more.
> A backtest system is not run in real time and there should be no
> absolute requirements on latency?
> Correct me if I am wrong.
> On Thu, Oct 1, 2009 at 6:04 PM, Joel Reymont <joelr1@REDACTED> wrote:
>> Kenneth,
>> On Oct 1, 2009, at 4:50 PM, Kenneth Lundin wrote:
>>> It would be nice if you could explain what the system needs to do  
>>> and
>>> after that
>>> why you think it is a problem to store prices in an ETS-table.
>>> [...]
>>> Why are you talking about mmapped files? Please explain for a novice
>>> in trading systems.
>> It's high-frequency trading systems I'm talking about. Where's Serge
>> Aleynikov [1] when you need him?
>> I'd like to process an incoming price quote, make a decision and  
>> submit a
>> trade order with minimal latency. I know that this is normally done  
>> using
>> C++ (or OCaml [1]) but I'm wondering how this can be achieved using  
>> Erlang.
> You have a server supporting some protocol (probably FIX) , the price
> quote arrives this way?
> The decision is taken at the server?
> The trade order is handled in the server or sent to another system?
> From where , to where is the latency measured?
> From your reasoning it seems that the encoding/decoding +
> communication latency is not part of
> the important latency? In that case why not?
> Anyway there must be som latency value that is just good enough and
> going below that is just unnecessary?
> /Kenneth
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org

More information about the erlang-questions mailing list