<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; trade</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=trade" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>latency arbitrage</title>
		<link>https://blog.yhuang.org/?p=1301</link>
		<comments>https://blog.yhuang.org/?p=1301#comments</comments>
		<pubDate>Mon, 07 Apr 2014 05:57:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Algorithmic trading]]></category>
		<category><![CDATA[arbitrage]]></category>
		<category><![CDATA[EECS]]></category>
		<category><![CDATA[Michael Lewis]]></category>
		<category><![CDATA[NBBO]]></category>
		<category><![CDATA[SEC]]></category>
		<category><![CDATA[trade]]></category>

		<guid isPermaLink="false">http://allegro.mit.edu/~zong/wpress/?p=1301</guid>
		<description><![CDATA[Michael Lewis has been in the news for his new book, Flash Boys, decrying the problems brought about by a system ill equipped to deal with high frequency trading. The core problem can be stylistically summarized by this picture: I place an order from the location of the red square to the green and purple [...]]]></description>
			<content:encoded><![CDATA[<p><img src="wp-content/uploads/images/latency_arbitrage.png" align="right" />Michael Lewis has been in the news for his new book, <a href="http://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393244660">Flash Boys</a>, decrying the problems brought about by a system ill equipped to deal with high frequency trading. The core problem can be stylistically summarized by this picture:</p>
<p>I place an order from the location of the red square to the green and purple exchanges on which trades occur. My communication capability on the gray &#8220;public&#8221; channel is slower than the communication capability of some competing agent on the blue &#8220;private&#8221; channel. Therefore, triangle inequality notwithstanding, the competing agent observes my actions at the green exchange and reacts at the purple exchange before my order arrives there. It appears to me exactly like I have been scooped by somebody acting anti-causally, so what happened?<br />
<span id="more-1301"></span><br />
Well, somebody (the competing agent) <em>did</em> see the future, in some sense. Simultaneity does not exist at this time scale, <a href="http://en.wikipedia.org/wiki/Relativity_of_simultaneity">just like in special relativity</a>. The competing agent is simply taking advantage of this fact.</p>
<p>This is of course old news, but it&#8217;s nevertheless interesting to hear the two perspectives &#8212; one that considers this as front-running and one that considers this as fair competition. After all, all that the competing agent had was a more capable channel, which no one is prohibited from obtaining. This &#8220;difference of opinion&#8221; is of course nothing of the sort, but rather the symptom of a much deeper problem.</p>
<p>Consider this question: Do we assume there is a single market on which all trades occur? The SEC certainly did when it promulgated <a href="http://en.wikipedia.org/wiki/Regulation_NMS">Regulation NMS</a>, which among other things blithely assumed the existence of a &#8220;National Best Bid-Offer&#8221; (NBBO), basically a market-wide best price among numerous exchanges. In the days when communication delays were short compared to the interval between market transitions (i.e. low-frequency trading), there was indeed a single market. But when communication delays are now long compared to the interval between market transitions (i.e. high-frequency trading), the assumption breaks down. The exchanges, if they are some distances apart, represent different partial markets, each with a local price. There is no way at all to pretend there is a single market with a single price, despite the frantic <em>latency arbitrages</em> that high frequency strategies employ to synchronize prices across exchanges. (Yes, they are actually performing this service.) It&#8217;s futile. There will always be this inefficiency to exploit, and it is an inherent frictional cost of this kind of market structure, to speak nothing of the information asymmetry caused merely by different locations of agents and their communication capabilities. In other words: bad system design; bad, because nobody actually &#8220;designed&#8221; it and probably nobody thinks of it as one &#8220;system.&#8221;</p>
<p>So let&#8217;s recap. It seems that there are several problems with today&#8217;s trading system. Due to the improvement in technology, many assumptions that were approximately correct, such as the existence of a law of one price and simultaneity, are no longer valid. In other words, a single NBBO is not even well defined. Instead we have point-to-point information propagation that cross at certain geographic midpoints.</p>
<p>What to do? Actually, this problem has been solved before. As logic components in computer systems became faster, propagation delay became important and if it weren&#8217;t for clocks, systems would enter ambiguous states and become unstable. The solution was <a href="http://en.wikipedia.org/wiki/Synchronous_circuit">latched clocking</a>: allow state changes only at quantized intervals of time, and in the intervening time, the changes would have the opportunity to propagate across the entire system so that the overall system state was once again consistent. The same thing works for trading markets, i.e. allow the market state (trades and incoming orders) to update only at quantized intervals of time, and allow enough time to pass between for these information to be received by all exchanges forming the same market. The goal is to get back to the regime where communication delays are short compared to the interval between market transitions.</p>
<p><a href="http://web.eecs.umich.edu/~ewah/">Elaine Wah</a> of the University of Michigan has <a href="http://web.eecs.umich.edu/srg/wp-content/uploads/2013/02/ec38-wah.pdf">a paper</a> on this, with analysis showing the actual financial benefits of removing the inefficiency inherent in continuous trading. Generally, market performance should improve when we clock at speeds relevant to the underlying information generating and decision feedback processes. Any faster and we are introducing noise and also by not allowing signals (trading interests) to fully mix into a steady state, end up introducing large transients (volatility, worse executions) into the system.</p>
<p>This besides, it is great to see EECS getting involved in solving what is essentially an information and engineering problem, using methods that have been tried in digital computer circuits.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=1301</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>liquidity</title>
		<link>https://blog.yhuang.org/?p=1311</link>
		<comments>https://blog.yhuang.org/?p=1311#comments</comments>
		<pubDate>Sun, 06 Apr 2014 06:34:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Financial markets]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[HFT]]></category>
		<category><![CDATA[liquidity]]></category>
		<category><![CDATA[market impact]]></category>
		<category><![CDATA[Monotonic function]]></category>
		<category><![CDATA[Probability theory]]></category>
		<category><![CDATA[spread]]></category>
		<category><![CDATA[Stock market]]></category>
		<category><![CDATA[trade]]></category>

		<guid isPermaLink="false">http://allegro.mit.edu/~zong/wpress/?p=1311</guid>
		<description><![CDATA[Is there a standard definition? Does it have a unit? Is it even a number? I&#8217;m going to take a stab. Without loss of generality I&#8217;ll define liquidity availability for buying (selling is analogous), as a unitless function over transaction amount and time limit . Operationally, it means to take amount of a tradable asset, [...]]]></description>
			<content:encoded><![CDATA[<p>Is there a standard definition? Does it have a unit? Is it even a number?</p>
<p>I&#8217;m going to take a stab. Without loss of generality I&#8217;ll define liquidity availability for buying (selling is analogous), as a unitless function \(L($,s)\) over transaction amount \($\) and time limit \(s\). Operationally, it means to take \($\) amount of a tradable asset, convert into number of shares \(N\) at the current price (assume it exists) and request to transact \($\) using all possible algorithms that complete in \(s\) seconds and find the one that got the most shares \(N^*\), then \(L($,s) = N^*/N\), a number between 0 and about 1 (for most cases). The larger it is, the more liquidity there is at the \(($,s)\) pair. \(L\) is monotonically decreasing in \($\) and monotonically increasing in \(s\).<br />
<span id="more-1311"></span><br />
(Note: This notion of liquidity is more general than some others out there, e.g. in <a href="http://publications.csail.mit.edu/abstracts/abstracts07/jwkim/jwkim.html">this</a>, the price impact of a market order is equivalent to \(L($,0)\), the execution time of a limit order is the solution for \(s\) to \(L($,s)=\ell\) for some \(\ell\) (*), and the execution probability of the same is the probability that (*) has a solution.)</p>
<p><strong>Example 1.</strong> Say the current bid-ask is $99-$101, so assume the price is $100. Say the ask side of an orderbook has 5 shares at $101 and 5 shares at $102. Now I place a market buy order for $1000, so 5 shares will take $101, and 4.85 shares will take $102 (we&#8217;ll allow fractional shares). We end up with 9.85 shares, for a liquidity availability of 0.985 at $1000 and 0 seconds.</p>
<p><strong>Example 2.</strong> Same setup as above, now I am willing to wait 5 seconds to transact, so assume the best strategy (which can&#8217;t be known a priori of course) is to put in a limit order for 10.10 shares at $99, which gets filled by a seller moving down to $99 within 5 seconds. Then the liquidity availability is 1.010 at $1000 and 5 seconds.</p>
<p><strong>Example 3.</strong> Same setup as above, but now an HFT market maker steps in to quote $99.99-$100.01 with 1 share on each side. (100 times smaller spread!) I&#8217;m still willing to wait 5 seconds to transact, but say the market maker has the capability to react in 100 milliseconds to any buy order by buying up the 5 shares at $101 and the 5 shares at $102, and re-offering 10 shares at $103. Then there are two regimes. If I can complete my order in under 100 milliseconds, then I get 1 share at $100.01, 5 shares at $101, and 3.87 shares at $102 for a liquidity availability of 0.987; otherwise, I get 1 share at $100.01, and 8.74 shares at $103 for a liquidity availability of only 0.974.</p>
<p>So has the market maker increased or decreased liquidity? It turns out the market maker increased liquidity only at HFT time scales, and decreased liquidity at all coarser time scales to worse than the 0-second liquidity of Example 1, distorted or at least obscured natural supply/demand, increased volatility, and cost me more money.</p>
<p>These are illustrative thought experiments, so take with a grain of salt. But I do wonder when people throw around the word liquidity and claim they&#8217;ve increased it, have they even defined it? Or when they claim they&#8217;ve reduced costs, have they done real experiments of the sort above? If neither, then what are they talking about? Why should I believe them? At the very least, it should be emphasized that liquidity or cost are <em>not</em> defined by the visible market spread, which only indicates the cost of transacting at the time scale of the most dominant market participants, in this case, HFT&#8217;s. That spread is irrelevant to investors if prices can move faster than their order completion.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=1311</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>why no damping factors?</title>
		<link>https://blog.yhuang.org/?p=131</link>
		<comments>https://blog.yhuang.org/?p=131#comments</comments>
		<pubDate>Mon, 27 Oct 2008 20:10:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cannot]]></category>
		<category><![CDATA[currency pegs]]></category>
		<category><![CDATA[dynamical system]]></category>
		<category><![CDATA[flooding]]></category>
		<category><![CDATA[kind]]></category>
		<category><![CDATA[market efficiency]]></category>
		<category><![CDATA[national economies]]></category>
		<category><![CDATA[stability]]></category>
		<category><![CDATA[trade]]></category>
		<category><![CDATA[yen carry trade]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=131</guid>
		<description><![CDATA[Stories like this about the sudden unwinding of the yen carry trade had me thinking. Financial markets are some kind of dynamical system. This system has stable and unstable modes. Clearly, the unstable modes are best not to be touched, yet there are few (or not enough) regulations or systematic constraints to keep a path [...]]]></description>
			<content:encoded><![CDATA[<p>Stories like <a href="http://biz.yahoo.com/ap/081027/world_markets.html">this</a> about the sudden unwinding of the yen carry trade had me thinking.</p>
<p>Financial markets are some kind of dynamical system. This system has stable and unstable modes. Clearly, the unstable modes are best not to be touched, yet there are few (or not enough) regulations or systematic constraints to keep a path from falling into those.</p>
<p>Common experience from systems design seems to say that you <em>have</em> to be willing to give up some efficiency in exchange for stability. That&#8217;s why there are currency pegs (or trading bands), reserves ratios, and interest rate targets. But these are too crude. <strong>There needs to be systematic tools in all markets to damp system dynamics to a time constant on the same order as that of economic reality</strong>. You cannot have capital flooding in and out of markets and currency flooding in and out of countries at rates that cannot be absorbed or sustained by the national economies. Sure, that is &#8220;efficient&#8221;, but it also makes no sense. This is the point at which free market and market efficiency fundamentalists need to take a step back and look at the big picture and see where they are so obviously wrong.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=131</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
