From Trump to Profit

I am sure that every single trader gets nervous whenever Trump speaks.  If he says “wall” they have to go short the Mexican Peso, if he talks about Obamacare or the “Unaffordable Care Act”, they have to short Healthcare stocks.  During his first news conference on Thursday, January 11th, 2017, he went a step further and said he wants bidding and competition for Government purchases of Pharmaceutical drugs.  So not only did the Mexican Peso suffer, but so did Pharmaceutical companies such as GlaxoSmithKline, Merck and Pfizer, among others!

His news conference was from 11:00 am to 12:15 pm.

Here is a chart of the Mexican Peso during this time:

USDMXN – 1/11/2017 from 11:00am to 12:15pm

and a chart showing Pfizer:

PFE US Equity – 1/11/2017 from 11:00am to 12:15pm

and GlaxoSmithKline:

GSK US Equity – 1/11/2017 from 11:00am to 12:15pm

See the CNN timeline of Trump’s first news conference here:

http://www.cnn.com/2017/01/11/politics/donald-trump-press-conference-as-it-happened/

Now how do you use your custom trading algorithm to make money during such an event as a Trump News Conference?  Simple, use FPGAs!

You have your algorithm, which may be as simple as “If PFE drops by x percent in y seconds” then “sell z amount of PFE”.  Then after PFE drops a further amount, you may choose to buy it all back.  The algorithm is up to you of course, and my job is to tell you how to use an FPGA to speed it up, because the first to sell at the top make the most profit.  Let’s take a closer look at the chart for GlaxoSmithKline:

GSK US Equity – 1/11/2017 from 11:22am to 11:25am – right before Trump said that he wants bidding on Pharmaceuticals

The major premise is that at the left of this chart trading volume is very high, both for GlaxoSmithKline, other Pharmaceuticals and the markets in general, and that the few trading firms that are able to send sell orders first will make the most money, with those that follow making less and less at an accelerated pace.  Here is a chart of the volume for GSK during the entire trading day:

GSK US Equity – Volume and Price Jan 11, 2017 11:21-11:26am

On January 11th, 2017, the average trading volume for the entire day for GSK was 13,003 shares per minute, and here is a table of the volume for the chart above:

Minute Volume Price
11:20 8,145 39.1599
11:21 7,266 39.16
11:22 147,329 38.97
11:23 64,563 38.95
11:24 60,768 38.821
11:25 38,823 38.8554
11:26 23,603 38.8368
11:27 34,205 38.8001

Look at the spike in volume at 11:22, and look at the price difference!

So a trader or algorithm looking to exploit this opportunity faces some challenges.

  • More Market Data for security of interest
    • Your algorithm is now being bombarded with thousands, if not hundreds of thousands of messages about the price of the security which you want to trade.
  • More Market Data in General
    • Your market data feeds are being overloaded and the time it takes to process each message increases.
    • The amount of time that it takes to process a message with respect to the amount of messages coming in is never linear.
  • Slower response time from your algo
    • Your algo is slower at generating messages because your system is overloaded.

An FPGA can help in all 3 areas.

1 – Filter out all securities and keep only those of interest

2 – Do the analysis portion to detect whether or not to sell GSK in the FPGA

3 – Generate the orders directly in the fpga

 

The advantages of an FPGA, especially when in a Network Card configuration is that all of the above happens inside hardware,  and is completely outside of your host computer.  So imagine that your host computer gets only Market Data from a list of securities instead of all Market Data from all securities.  Your host now no longer needs to filter market data before sending the information to your algo.

Now the FPGA can also pre-process the data and send the data in a easier format to the host computer.  Imagine your host computer no longer has to perform simple calculations that it uses to determine whether or not trade because that has been done inside the FPGA.

And finally, why generate and send orders to buy or sell a security inside the host computer when the FPGA can do that for you as well? Instead of sending an entire order down your operating system stack, just send a bunch of parameters to the FPGA and let it handle creating the appropriate messages, calculating CRCs and checksums, and of putting them on the wire.

Leave a Comment