{"id":40,"date":"2017-01-16T21:41:44","date_gmt":"2017-01-16T21:41:44","guid":{"rendered":"http:\/\/fpganow.com\/?p=40"},"modified":"2017-01-16T21:42:49","modified_gmt":"2017-01-16T21:42:49","slug":"from-trump-to-profit","status":"publish","type":"post","link":"https:\/\/fpganow.com\/index.php\/2017\/01\/16\/from-trump-to-profit\/","title":{"rendered":"From Trump to Profit"},"content":{"rendered":"<p>I am sure that every single trader gets nervous whenever Trump speaks. \u00a0If he says &#8220;wall&#8221; they have to go short the Mexican Peso, if he talks about Obamacare or the &#8220;Unaffordable Care Act&#8221;, they have to short Healthcare stocks. \u00a0During 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. \u00a0So not only did the Mexican Peso suffer, but so did Pharmaceutical companies such as GlaxoSmithKline, Merck and Pfizer, among others!<\/p>\n<p>His news conference was from 11:00 am to 12:15 pm.<\/p>\n<p><em><span style=\"text-decoration: underline;\">Here is a chart of the Mexican Peso during this time:<\/span><\/em><\/p>\n<figure id=\"attachment_41\" aria-describedby=\"caption-attachment-41\" style=\"width: 590px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/USDMSX_1100_1215.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-41 size-full\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/USDMSX_1100_1215.png\" width=\"600\" height=\"223\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/USDMSX_1100_1215.png 600w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/USDMSX_1100_1215-300x112.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-41\" class=\"wp-caption-text\">USDMXN &#8211; 1\/11\/2017 from 11:00am to 12:15pm<\/figcaption><\/figure>\n<p>and a chart showing Pfizer:<\/p>\n<figure id=\"attachment_42\" aria-describedby=\"caption-attachment-42\" style=\"width: 590px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/PFE_US_Equity_1100_1215.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-42 size-full\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/PFE_US_Equity_1100_1215.png\" width=\"600\" height=\"223\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/PFE_US_Equity_1100_1215.png 600w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/PFE_US_Equity_1100_1215-300x112.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-42\" class=\"wp-caption-text\">PFE US Equity &#8211; 1\/11\/2017 from 11:00am to 12:15pm<\/figcaption><\/figure>\n<p>and GlaxoSmithKline:<\/p>\n<figure id=\"attachment_43\" aria-describedby=\"caption-attachment-43\" style=\"width: 590px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1100_1215.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-43 size-full\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1100_1215.png\" width=\"600\" height=\"223\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1100_1215.png 600w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1100_1215-300x112.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-43\" class=\"wp-caption-text\">GSK US Equity &#8211; 1\/11\/2017 from 11:00am to 12:15pm<\/figcaption><\/figure>\n<p><span style=\"text-decoration: underline;\">See the CNN timeline of Trump&#8217;s first news conference here:<\/span><\/p>\n<p><a href=\"http:\/\/www.cnn.com\/2017\/01\/11\/politics\/donald-trump-press-conference-as-it-happened\/\">http:\/\/www.cnn.com\/2017\/01\/11\/politics\/donald-trump-press-conference-as-it-happened\/<\/a><\/p>\n<p>Now how do you use your custom trading algorithm to make money during such an event as a Trump News Conference? \u00a0Simple, use FPGAs!<\/p>\n<p>You have your algorithm, which may be as simple as &#8220;If PFE drops by x percent in y seconds&#8221; then &#8220;sell z amount of PFE&#8221;. \u00a0Then after PFE drops a further amount, you may choose to buy it all back. \u00a0The 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\u00a0first to sell at the top make the most profit. \u00a0Let&#8217;s take a closer look at the chart for GlaxoSmithKline:<\/p>\n<figure id=\"attachment_45\" aria-describedby=\"caption-attachment-45\" style=\"width: 590px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1122_1125.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-45 size-full\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1122_1125.png\" width=\"600\" height=\"223\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1122_1125.png 600w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1122_1125-300x112.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-45\" class=\"wp-caption-text\">GSK US Equity &#8211; 1\/11\/2017 from 11:22am to 11:25am &#8211; right before Trump said that he wants bidding on Pharmaceuticals<\/figcaption><\/figure>\n<p>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. \u00a0Here is a chart of the volume for GSK during the entire trading day:<\/p>\n<figure id=\"attachment_49\" aria-describedby=\"caption-attachment-49\" style=\"width: 515px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-49 size-large\" src=\"http:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol-1024x396.png\" width=\"525\" height=\"203\" srcset=\"https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol-1024x396.png 1024w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol-300x116.png 300w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol-768x297.png 768w, https:\/\/fpganow.com\/wp-content\/uploads\/2017\/01\/GSK_US_Equity_1121_1126_Vol.png 1166w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><figcaption id=\"caption-attachment-49\" class=\"wp-caption-text\">GSK US Equity &#8211; Volume and Price Jan 11, 2017 11:21-11:26am<\/figcaption><\/figure>\n<p>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:<\/p>\n<table style=\"width: 233px;\">\n<tbody>\n<tr>\n<td style=\"width: 98px;\"><span style=\"text-decoration: underline;\"><strong>Minute<\/strong><\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"text-decoration: underline;\"><strong>Volume<\/strong><\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"text-decoration: underline;\"><strong>Price<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:20<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">8,145<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">39.1599<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:21<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">7,266<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">39.16<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:22<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt; color: #ff0000;\">147,329<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt; color: #ff0000;\">38.97<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:23<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">64,563<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">38.95<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:24<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">60,768<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">38.821<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:25<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">38,823<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">38.8554<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:26<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">23,603<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">38.8368<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 98px;\"><span style=\"font-size: 10pt;\">11:27<\/span><\/td>\n<td style=\"width: 99px;\"><span style=\"font-size: 10pt;\">34,205<\/span><\/td>\n<td style=\"width: 123px;\"><span style=\"font-size: 10pt;\">38.8001<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Look at the spike in volume at 11:22, and look at the price difference!<\/p>\n<p>So a trader or algorithm looking to exploit this opportunity faces some challenges.<\/p>\n<ul>\n<li>More Market Data for security of interest\n<ul>\n<li>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.<\/li>\n<\/ul>\n<\/li>\n<li>More Market Data in General\n<ul>\n<li>Your market data feeds are being overloaded and the time it takes to process each message increases.<\/li>\n<li>The amount of time that it takes to process a message with respect to the amount of messages coming in is never linear.<\/li>\n<\/ul>\n<\/li>\n<li>Slower response time from your algo\n<ul>\n<li>Your algo is slower at generating messages because your system is overloaded.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>An FPGA can help in all 3 areas.<\/strong><\/span><\/p>\n<p>1 &#8211; Filter out all securities and keep only those of interest<\/p>\n<p>2 &#8211; Do the analysis portion to detect whether or not to sell GSK in the FPGA<\/p>\n<p>3 &#8211; Generate the orders directly in the fpga<\/p>\n<p>&nbsp;<\/p>\n<p>The advantages of an FPGA, especially when in a Network Card configuration is that all of the above happens inside hardware, \u00a0and is completely outside of your host computer. \u00a0So imagine that your host computer gets only Market Data from a list of securities instead of all Market Data from all securities. \u00a0Your host now no longer needs to filter market data before sending the information to your algo.<\/p>\n<p>Now the FPGA can also pre-process the data and send the data in a easier format to the host computer. \u00a0Imagine 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.<\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am sure that every single trader gets nervous whenever Trump speaks. \u00a0If he says &#8220;wall&#8221; they have to go short the Mexican Peso, if he talks about Obamacare or the &#8220;Unaffordable Care Act&#8221;, they have to short Healthcare stocks. \u00a0During his first news conference on Thursday, January 11th, 2017, he went a step further &#8230; <a title=\"From Trump to Profit\" class=\"read-more\" href=\"https:\/\/fpganow.com\/index.php\/2017\/01\/16\/from-trump-to-profit\/\" aria-label=\"Read more about From Trump to Profit\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-hft","masonry-post","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":14,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/posts\/40\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fpganow.com\/index.php\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}