"I know what you're thinking. I know what you're thinking. That's like ten lines of Verilog, right? Naaaah. That's not how I roll. That's more like two hundred... thousand... lines of Ocaml."
How does Jane St. use FPGAs to make money trading? My impression was that unless the application demands real speed (i.e., microseconds), write it as software that run in a general purpose processor, not in an FPGA. x86s always get the latest semiconductor processes, while FPGAs always lag.
High-frequency trading in a developed market demands response times on the order of nanoseconds, whereas anything in software is unlikely to get under a microsecond. If you're too slow, all the obvious efficiencies in the market have already been corrected by faster firms, so you miss out on a bunch of easy trades.
Where does this nanosecond number come from for HFT? 1 ns is the time light takes to travel 30 cm in a vacuum. Are these firms only trading with firms that are a few meters away? How about round trip times? I believe only 10s of microseconds are significant, not nanoseconds.
Exactly. At an investment bank for which I used to work in NYC, they moved their datacenter to be next door to the exchange's datacenter just to reduce latency.
Because in HFT, every fraction of a second can mean the difference between 10s or even 100s of millions of dollars in profit/loss.
You're right. A 100MHz clock has a period of 10nS. I can tell you exactly how many of them my data path will take (I've only ever used clocks up to about 300MHz in an FPGA - 600 for things like DDR4 memory).
What GP means is that the portion of the overall latency which you can control must respond as quickly as possible, and you do count nanoseconds. Obviously HFT has not invented superluminal communication techniques.
> Obviously HFT has not invented superluminal communication techniques.
They haven't, but they've put in tremendous resources into going above the speed of light in optical fibre, including the use of point-to-point microwave links and, when it's impossible to place towers for microwave links (for example, across the Atlantic Ocean), the use of HF/shortwave (as in 3-30MHz stuff) radio.
It's not really the fibre that slows down the signal as much as the opto-electrical repeaters that relay the signal many times as it travels vast distances.
Light can only go a few km before it needs to be boosted
The speed of light in a fiber is only about 70% of speed of light in vacuum.
Modern single mode fiber has very low attenuation (less than 0.01dB/km). But more importantly you don't have to use opto-electrical repeaters to boost the signal. What you do is using purely passive dispersion control by mixing different kinds of fiber and compensate for the rest dispersion using chirped fiber bragg gratings. To boost the signal you splice in rare earth doped fibers (Erbirum, Yttrium) which acts as optically pumped optical amplifier.
They're used in long haul communication for some 15 years or so. They're especially useful in submarine cables, for the sole reason, that new optical transmission schemes(modulation, wavelength multiplexing and so on) can be implemented by just replacing the equipment on either end, without the need to replace components down there on the seabed.
Speed of light is a universal physical constant. What you referring is that the space the light has to travel in the optic cable is way bigger then what it would be with straight line of sight between MW towers.
> x86s always get the latest semiconductor processes, while FPGAs always lag
Two issues with this:
1) You cannot compare an FPGA architecture to a general purpose CPU. FPGAs are massively parallel by design and have near zero overhead, so 100 MHz in an FPGA != a 100 MHz CPU.
2) FPGAs do not lag that far behind and are moving to 16 nm and beyond for higher end products. Besides, due to 1), there really is no real need to move to lower nodes yet.
Can anyone who watched the video summarize? I'm interested in the subject, but don't have the time/concentration for long videos when an article often suffices.
* HardCaml - DSP for FPGA/ASIC,
* embedded SW in OCaml (running on Xilinx MicroBlaze),
* HardCaml example: AXI interface, GPIO, SPI, cordic,
* FPGA: LUTs and regs, BRAM, DSP,
skip to 9:40 if you are familiar with FPGA,
skip to 17:50 if you know HDLs,
go to 37:10 for a demo
* HardCaml datatypes:
registers,
wires (can be used before they are assigned),
memory,
...
* API:
arithmetic,
logic,
`pipeline`, `reg`,
bit selects,
`width` --> useful for HW generation,
`inst` - use VHDL and Verilog in HardCaml
* signed and unsigned types: checks at compilation,
* `bits` = non-synthesizable, `signal`= synthesizable,
* `Always` ~ Verilog `always` - used mainly for FSM
actually, we don't care how jane street does this and that with ocaml. it's such hype bullshit that makes me wanna vomit. Stop giving it publicity it doesnt deserve.