{"id":24363,"date":"2013-06-17T20:29:00","date_gmt":"2013-06-18T01:29:00","guid":{"rendered":""},"modified":"2020-09-17T10:09:08","modified_gmt":"2020-09-17T15:09:08","slug":"an-introduction-to-dynamic-hedging-wi","status":"publish","type":"post","link":"https:\/\/tradingtechnologies.com\/blog\/2013\/06\/17\/an-introduction-to-dynamic-hedging-wi\/","title":{"rendered":"An Introduction to Dynamic Hedging with Autospreader\u00ae"},"content":{"rendered":"<p>When considering what to cover in my first blog post, I kept coming back to topics related to spread trading. As a former full-time trader who made a living formulating and executing spread strategies, and as the person who leads the product management function for proprietary trading at TT, which includes automated trading, I think a lot about themes related to spreading.<\/p>\n<p>TT\u2019s <a href=\"https:\/\/tradingtechnologies.com\/autospreader\" target=\"_blank\" rel=\"noopener noreferrer\">Autospreader <\/a>is one of the most widely used spread tools largely because it delivers sophisticated functionality and extreme performance in a very user-friendly package. I decided to write about dynamic hedging because I believe it\u2019s an important concept for spread traders to understand and apply. Furthermore, I believe the way Autospreader addresses dynamic hedging with the Hedge Rule Builder tool is pretty powerful.<\/p>\n<p>In this post, I\u2019ll walk through some examples to illustrate how Hedge Rule Builder can be used to apply Pre Hedge and Post Hedge rules. But before I start on that topic, I\u2019ll back up a bit for the benefit of readers who haven\u2019t yet taken a deep dive into spread trading and hedging.<br \/>\n<a name='more'><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"spread-trading-autospreader%c2%ae-and-hedge-rule-builder\"><\/span>\nSpread Trading, Autospreader\u00ae and Hedge Rule Builder<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The basic function of any spread trading tool, including TT\u2019s Autospreader, is to execute orders to buy and sell a synthetic instrument composed of at least two exchange-listed securities, or \u201clegs\u201d. A spreader actively quotes at least one leg. When it accumulates inventory, it \u201chedges\u201d by sending orders in the other leg in an attempt to buy or sell the synthetic instrument at the desired price.<\/p>\n<p>Basically, a spreader performs two functions: it assumes risk, then reduces it as the spread order gets closer to completion. It provides liquidity, then seeks liquidity.<\/p>\n<p>When trading a spread, hedging entails sending orders in legs as a reaction to an execution in an actively quoted leg. This is liquidity-seeking behavior, and therefore has a cost, which is mostly the price of crossing the bid-ask spread. While the main point of hedging is to reduce risk, a close second is to minimize the costs of reducing that risk.<\/p>\n<p>How can we try to reduce our costs of seeking liquidity? One possibility is to vary our aggressiveness based on market conditions. <\/p>\n<p>Autospreader\u2019s Hedge Rule Builder offers two powerful ways to customize hedging behavior and aggressiveness: the Pre Hedge Rule and the Post Hedge Rule. The Pre Hedge Rule is evaluated after a quote fill but before any hedge orders are sent; the Post Hedge Rule is evaluated after hedge orders have been sent and acknowledged by the exchange. In other words, the Post Hedge Rule is only evaluated when there are \u201cresting\u201d hedge orders. Used together, these rules give us the opportunity to reduce liquidity costs, boosting bottom-line results.<\/p>\n<p>Let\u2019s walk through a few specific liquidity-seeking techniques to illustrate the concept.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"pre-hedge-rule\"><\/span>\nPre Hedge Rule<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We\u2019ll use the soybean crush for our examples. This is a common strategy where a position in soybean futures is offset by equivalent positions in soybean meal and soybean oil. We\u2019ll define our spread as follows (using the soon-to-be-released X_TRADER\u00ae 7.17), with Hedge Round enabled to round hedging quantities rather than truncate them:<\/p>\n<div>\n<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/2.bp.blogspot.com\/-TvjhwGzPVnc\/Ub9cbhSInWI\/AAAAAAAAAjY\/bZivEVXTwLs\/s1600\/haag1.png\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag1.png\" width=\"400\" \/><\/a><\/div>\n<div>\n<\/div>\n<div>\nWhen we get a small fill on our quoting leg, we may decide to be less aggressive (where \u201caggressive\u201d is defined as being less willing to cross the market) in pricing our hedge orders and making one-lots and two-lots \u201cwork for better\u201d by applying a negative payup tick. Note that in this context, HedgeWorkingQty is the quantity Autospreader is about to submit:<\/div>\n<div>\n<\/div>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/4.bp.blogspot.com\/-OfBEjh5Bu1o\/Ub9lMXIyEoI\/AAAAAAAAAjo\/ao155dsYHts\/s1600\/haag2.png\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag2.png\" width=\"400\" \/><\/a><\/div>\n<div>\n<\/div>\n<div>\nEven if our hedge need is relatively large, we can be less aggressive if the opposite side bid\/offer is strong:<\/div>\n<div>\n<\/div>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/2.bp.blogspot.com\/-Szx1En6zVLQ\/Ub9lac1KRXI\/AAAAAAAAAjw\/T_NCOchwcKQ\/s1600\/haag3.png\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag3.png\" width=\"400\" \/><\/a><\/div>\n<div>\n<\/div>\n<div>\nIn other cases, by detecting that the market has moved away from us, we can be more aggressive. Note that at the time of the Pre Hedge Rule\u2019s evaluation, HedgePrc is the price Autospreader will submit before including payup ticks:<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/4.bp.blogspot.com\/-r032EGFQFqk\/Ub9vl5EYNVI\/AAAAAAAAAkA\/StCk1aJdRAM\/s1600\/haag4.png\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag4.png\" width=\"400\" \/><\/a><\/div>\n<p><\/p>\n<h3><span class=\"ez-toc-section\" id=\"post-hedge-rule\"><\/span>\nPost Hedge Rule<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>After hedge orders have been sent, Autospreader can monitor market conditions and react based on user-defined logic. This allows us to continue to adjust our aggressiveness in seeking liquidity based on new information. Remember that when configuring a Post Hedge Rule, we need to provide a \u201crepeat value\u201d if we want the behavior to be dynamic\u2014that is, performed more than once as conditions change.<\/p>\n<p>One way to keep a hedge order \u201ccompetitive\u201d is to track its price against the best price in the market. It\u2019s easy to write a rule such that if a hedge order \u201cfalls out\u201d of the first five price levels, we get more aggressive by attempting to cross an assumed one-tick-wide market at the new level:<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/2.bp.blogspot.com\/-xYz4xgJbwZY\/Ub9vs7YoBDI\/AAAAAAAAAkI\/GN13Uw84lyQ\/s1600\/haag5.png\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag5.png\" width=\"400\" \/><\/a><\/div>\n<p>\nWe can also base our behavior on time. We can improve our price one level once a second for the first minute of being \u201chung\u201d:<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\">\n<a href=\"https:\/\/3.bp.blogspot.com\/-ogqiuNVG3zA\/Ub9vv78fJ6I\/AAAAAAAAAkQ\/Mf4OlXo0Y50\/s1600\/haag6.png\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/tradingtechnologies.com\/wp-content\/uploads\/2013\/06\/haag6.png\" width=\"400\" \/><\/a><\/div>\n<p><\/p>\n<h3><span class=\"ez-toc-section\" id=\"conclusion\"><\/span>\nConclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>As someone who still dabbles in trading, I really appreciate the fact that the Pre Hedge and Post Hedge rules allow the user to tweak Autospreader functionality. These logic \u201chooks\u201d give the trader the needed flexibility to maximize opportunity and minimize costs. <\/p>\n<p>These techniques are just a few examples of what is possible, and they can even be combined into more complex behaviors.<\/p>\n<p>If you\u2019d like to explore some of the more sophisticated applications of Pre Hedge and Post Hedge rules, feel free to submit a comment on this blog post. Or, you can consult the <a href=\"https:\/\/tradingtechnologies.com\/en\/help\/autospreader\/hedge-rule-builder-overview\/\" target=\"_blank\" rel=\"noopener noreferrer\">Online Help<\/a> module on our website.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When considering what to cover in my first blog post, I kept coming back to topics related to spread trading. As a former full-time trader who made a living formulating and executing spread strategies, and as the person who leads the product management function for proprietary trading at TT, which includes automated trading, I think [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":24586,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[19],"class_list":["post-24363","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-algos-and-spread-trading"],"acf":[],"_links":{"self":[{"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/posts\/24363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/comments?post=24363"}],"version-history":[{"count":0,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/posts\/24363\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/media\/24586"}],"wp:attachment":[{"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/media?parent=24363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/categories?post=24363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tradingtechnologies.com\/wp-json\/wp\/v2\/tags?post=24363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}