<?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>Unreal Blog &#187; quant</title>
	<atom:link href="http://www.thulasidas.com/tag/quant/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thulasidas.com</link>
	<description>Perception and Physics. Science and Spirituality. Life and Work. Money and Quantitative Finance.</description>
	<lastBuildDate>Mon, 06 Sep 2010 22:41:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Chaos and Uncertainty</title>
		<link>http://www.thulasidas.com/2008-11/chaos-and-uncertainty.htm</link>
		<comments>http://www.thulasidas.com/2008-11/chaos-and-uncertainty.htm#comments</comments>
		<pubDate>Thu, 13 Nov 2008 01:24:33 +0000</pubDate>
		<dc:creator>Manoj</dc:creator>
				<category><![CDATA[Columns]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Quantitative Finance]]></category>
		<category><![CDATA[The Wilmott Magazine]]></category>
		<category><![CDATA[chaos]]></category>
		<category><![CDATA[financial meltdown]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[non-linear dynamics]]></category>
		<category><![CDATA[quant]]></category>
		<category><![CDATA[uncertainty principle]]></category>

		<guid isPermaLink="false">http://www.thulasidas.com/?p=624</guid>
		<description><![CDATA[This article appeared in the Wilmott Magazine in Jan 2009, and talks not quite about the chaos and uncertainty of the last few months in finance industry can be summarized in two words. It is more about the physics concepts bearing the same names, and how they can be applied to the turmoil in the financial and economic world.]]></description>
			<content:encoded><![CDATA[<p>The last couple of months in finance industry can be summarized in two words &#8212; chaos and uncertainty. The aptness of this laconic description is all too evident. The sub-prime crisis where everybody lost, the dizzying commodity price movements, the pink slip syndrome, the spectacular bank busts and the gargantuan bail-outs all vouch for it.</p>
<p>The financial meltdown is such a rich topic with reasons and ramifications so overarching that all self-respecting columnists will be remiss to let it slide. After all, a columnist who keeps his opinions to himself is a columnist only in his imagination. I too will share my views on causes and effects of this turmoil that is sure to affect our lives more directly than anybody else&#8217;s, but perhaps in a future column.</p>
<p>The chaos and uncertainty I want to talk about are of different kind &#8212; the physics kind. The terms chaos and uncertainty have a different and specific meanings in physics. How those meanings apply to the world of finance is what this column is about.</p>
<h4>Symmetries and Patterns</h4>
<p>Physicists are a strange bunch. They seek and find symmetries and patterns where none exists. I remember once when our brilliant professor, Lee Smolin, described to us how the Earth could be considered a living organism. Using insightful arguments and precisely modulated articulation, Lee made a compelling case that the Earth, in fact, satisfied all the conditions of being an organism. The point in Lee&#8217;s view was not so much whether or the Earth was literally alive, but that thinking of it as an organism was a viable intellectual pattern. Once we represent the Earth in that model, we can use the patterns pertaining to organism to draw further predictions or conclusions.</p>
<p>Expanding on this pattern, I recently published a column presenting the global warming as a bout of fever caused by a virus (us humans) on this host organism. Don&#8217;t we plunder the raw material of our planet with the same abandon with which a virus usurps the genetic material of its host? In addition to fever, typical viral symptoms include sores and blisters as well. Looking at the cities and other eye sores that have replaced pristine forests and other natural landscapes, it is not hard to imagine that we are indeed inflicting fetid atrocities to our host Earth. Can&#8217;t we think of our city sewers and the polluted air as the stinking, oozing ulcers on its body?</p>
<p>While these analogies may sound farfetched, we have imported equally distant ideas from physics to mathematical finance. Why would stock prices behave anything like a random walk, unless we want to take Bush&#8217;s words (that &#8220;Wall Street got drunk&#8221;) literally? But seriously, Brownian motion has been a wildly successful model that we borrowed from physics. Again, once we accept that the pattern is similar between molecules getting bumped around and the equity price movements, the formidable mathematical machinery and physical intuitions available in one phenomenon can be brought to bear on the other.</p>
<p>Looking at the chaotic financial landscape now, I wonder if physics has other insights to offer so that we can duck and dodge as needed in the future. Of the many principles from physics, chaos seems such a natural concept to apply to the current situation. Are there lessons to be learned from chaos and nonlinear dynamics that we can make use of? May be it is Heisenberg&#8217;s uncertainty principle that holds new insights.</p>
<p>Perhaps I chose these concepts as a linguistic or emotional response to the baffling problems confronting us now, but let&#8217;s look at them any way. It is not like the powers that be have anything better to offer, is it?</p>
<h4>Chaos Everywhere</h4>
<p>In physics, chaos is generally described as our inability to predict the outcome of experiments with arbitrarily close initial conditions. For instance, try balancing your pencil on its tip. Clearly, you won&#8217;t be able to, and the pencil will land on your desktop. Now, note this line along which it falls, and repeat the experiment. Regardless of how closely you match the initial conditions (of how you hold and balance the pencil), the outcome (the line along which it falls) is pretty much random. Although this randomness may look natural to us &#8212; after all, we have been trying to balance pencils on their tips ever since we were four, if my son’s endeavours are anything to go by &#8212; it is indeed strange that we cannot bring the initial conditions close enough to be confident of the outcome.</p>
<p>Even stranger is the fact that similar randomness shows up in systems that are not quite as physical as pencils or experiments. Take, for instance, the socio-economic phenomenon of globalization, which I can describe as follows, admittedly with an incredible amount of over-simplification. Long time ago, we used to barter agricultural and dairy products with our neighbours &#8212; say, a few eggs for a litre (or was it pint?) of milk. Our self-interest ensured a certain level of honesty. We didn&#8217;t want to get beaten up for adding white paint to milk, for instance. These days, thanks to globalization, people don&#8217;t see their customers. A company buys milk from a farmer, adds god knows what, makes powder and other assorted chemicals in automated factories and ships them to New Zealand and Peru. The absence of a human face in the supply chain and in the flow of money results in increasingly unscrupulous behaviour.</p>
<p>Increasing chaos can be seen in the form of violently fluctuating concentrations of wealth and fortunes, increasing amplitudes and frequency of boom and bust cycles, exponential explosion in technological innovation and adaptation cycles, and the accelerated pace of paradigm shifts across all aspects of our lives.</p>
<p>It is one thing to say that things are getting chaotic, quite another matter to exploit that insight and do anything useful with it. I won&#8217;t pretend that I can predict the future even if (rather, especially if) I could. However, let me show you a possible approach using chaos.</p>
<p>One of the classic examples of chaos is the transition from a regular, laminar flow of a fluid to a chaotic, turbulent flow. For instance, when you open a faucet slowly, if you do it carefully, you can have a pretty nice continuous column of water, thicker near the top and stretched thinner near the bottom. The stretching force is gravity, and the cohesive forces are surface tension and inter-molecular forces. As you open the faucet still further, ripples begin to appear on the surface of the column which, at higher rates of flow, rip apart the column into complete chaos.</p>
<p>In a laminar flow, macroscopic forces tend to smooth out microscopic irregularities. Like gravity and surface tension in our faucet example, we have analogues of macroscopic forces in finance. The stretching force is probably greed, and the cohesive ones are efficient markets.</p>
<p>There is a rich mathematical framework available to describe chaos. Using this framework, I suspect one can predict the incidence and intensity of financial turmoils, though not their nature and causes. However, I am not sure such a prediction is useful. Imagine if I wrote two years ago that in 2008, there would be a financial crisis resulting in about one trillion dollar of losses. Even if people believed me, would it have helped?</p>
<p>Usefulness is one thing, but physicists and mathematicians derive pleasure also from useless titbits of knowledge. What is interesting about the faucet-flow example is this: if you follow the progress two water molecules starting off their careers pretty close to each other, in the laminar case, you will find that they end up pretty much next to each other. But once the flow turns turbulent, there is not telling where the molecules will end up. Similarly, in finance, suppose two banks start off roughly from the same position &#8212; say Bear Stearns and Lehman. Under normal, laminar conditions, their stock prices would track similar patterns. But during a financial turbulence, they end up in totally different recycle bins of history, as we have seen.</p>
<p>If whole financial institutions are tossed around into uncertain paths during chaotic times, imagine where two roughly similar employees might end up. In other words, don&#8217;t feel bad if you get a pink slip. There are forces well beyond your control at play here.</p>
<h4>Uncertainty Principle in Quantitative Finance</h4>
<p>The Heisenberg uncertainty principle is perhaps the second most popular theme from physics that has captured the public imagination. (The first one, of course, is Einstein&#8217;s E = mc2.) It says something seemingly straightforward &#8212; you can measure two complementary properties of a system only to a certain precision. For instance, if you try to figure out where an electron is (measure its position, that is) more and more precisely, its speed becomes progressively more uncertain (or, the momentum measurement becomes imprecise).</p>
<p>Quantitative finance has a natural counterpart to the uncertainty principle &#8212; risks and rewards. When you try to minimize the risks, the rewards themselves go down. If you hedge out all risks, you get only risk-free returns. Since risk is the same as the uncertainty in rewards, the risk-reward relation is not quite the same as the uncertainty principle (which, as described in the box, deals with complementary variables), but it is close enough to draw some parallels.</p>
<p>To link the quantum uncertainty principle to quantitative finance, let&#8217;s look at its interpretation as observation altering results. Does modelling affect how much money we can make out of a product? This is a trick question. The answer might look obvious at first glance. Of course, if we can understand and model a product perfectly, we can price it right and expect to reap healthy rewards. So, sure, modelling affects the risk-reward equation.</p>
<p>But, a model is only as good as its assumptions. And the most basic assumption in any model is that the market is efficient and liquid. The validity of this assumption (or lack thereof) is precisely what precipitated the current financial crisis. If our modelling effort actually changes the underlying assumptions (usually in terms of liquidity or market efficiency), we have to pay close attention to the quant equivalent of the uncertainty principle.</p>
<p>Look at it this way &#8212; a pyramid scheme is a perfectly valid money making model, but based on one unfortunate assumption on the infinite number of idiots at the bottom of the pyramid. (Coming to think of it, the underlying assumption in the sub-prime crisis, though more sophisticated, may not have been that different.) Similar pyramid assumptions can be seen in social security schemes, as well. We know that pyramid assumptions are incorrect. But at what point do they become incorrect enough for us to change the model?</p>
<p>There is an even more insidious assumption in using models &#8212; that we are the only ones who use them. In order to make a killing in a market, we always have to know a bit more than the rest of them. Once everybody starts using the same model, I think the returns will plummet to risk-free levels. Why else do you think we keep inventing more and more complex exotics?</p>
<h4>Summing up&#8230;</h4>
<p>The current financial crisis has been blamed on many things. One favourite theory has been that it was brought about by the greed in Wall Street &#8212; the so-called privatization of profits and socialization of losses. Incentive schemes skewed in such a way as to encourage risk taking and limit risk management must take at least part of the blame. A more tempered view regards the turmoil as a result of a risk management failure or a regulatory failure.</p>
<p>This column presents my personal view that the turmoil is the inevitable consequence of the interplay between opposing forces in financial markets &#8212; risk and rewards, speculation and regulation, risk taking and risk management and so on. To the extent that the risk appetite of a financial institute is implemented through a conflict between such opposing forces, these crises cannot be avoided. Worse, the intensity and frequency of similar meltdowns are going to increase as the volume of transactions increases. This is the inescapable conclusion from non-linear dynamics. After all, such turbulence has always existed in the real economy in the form cyclical booms and busts. In free market economies, selfishness and the inherent conflicts between selfish interests provide the stretching and cohesive forces, setting the stage for chaotic turbulence.</p>
<p>Physics has always been a source of talent and ideas for quantitative finance, much like mathematics provides a rich toolkit to physics. In his book, Dreams of a Final Theory, Nobel Prize winning physicist Steven Weinberg marvels at the uncanny ability of mathematics to anticipate physics needs. Similarly, quants may marvel at the ability of physics to come up with phenomena and principles that can be directly applied to our field. To me, it looks like the repertoire of physics holds a few more gems that we can employ and exploit.</p>
<table border="1" cellpadding="15" width="90%" align="center" bgcolor="#000000">
<tbody>
<tr>
<td>
<h4>Box: Heisenberg&#8217;s Uncertainty Principle</h4>
<p>Where does this famous principle come from? It is considered a question beyond the realms of physics. Before we can ask the question, we have to examine what the principle really says. Here are a few possible interpretations:</p>
<ul>
<li>Position and momentum of a particle are intrinsically interconnected. As we measure the momentum more accurately, the particle kind of &#8220;spreads out,&#8221; as George Gamow&#8217;s character, Mr. Tompkins, puts it. In other words, it is just one of those things; the way the world works.</li>
<li> When we measure the position, we disturb the momentum. Our measurement probes are &#8220;too fat,&#8221; as it were. As we increase the position accuracy (by shining light of shorter wavelengths, for instance), we disturb the momentum more and more (because shorter wavelength light has higher energy/momentum).</li>
<li> Closely related to this interpretation is a view that the uncertainty principle is a perceptual limit.</li>
<li> We can also think of the uncertainly principle as a cognitive limit if we consider that a future theory might surpass such limits.</li>
</ul>
<p>The first view is currently popular and is related to the so-called Copenhagen interpretation of quantum mechanics. Let’s ignore it for it is not too open to discussions.</p>
<p>The second interpretation is generally understood as an experimental difficulty. But if the notion of the experimental setup is expanded to include the inevitable human observer, we arrive at the third view of perceptual limitation. In this view, it is actually possible to &#8220;derive&#8221; the uncertainty principle, based on how human perception works.</p>
<p>Let&#8217;s assume that we are using a beam of light of wavelength <img src="http://l.wordpress.com/latex.php?latex=%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\lambda" style="vertical-align:-20%;" class="tex" alt="\lambda" /> to observe the particle. The precision in the position we can hope to achieve is of the order of <img src="http://l.wordpress.com/latex.php?latex=%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\lambda" style="vertical-align:-20%;" class="tex" alt="\lambda" />. In other words, <img src="http://l.wordpress.com/latex.php?latex=%5CDelta%20x%20%5Capprox%20%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\Delta x \approx \lambda" style="vertical-align:-20%;" class="tex" alt="\Delta x \approx \lambda" />. In quantum mechanics, the momentum of each photon in the light beam is inversely proportional to the wavelength. At least one photon is reflected by the particle so that we can see it. So, by the classical conservation law, the momentum of the particle has to change by at least this amount(<img src="http://l.wordpress.com/latex.php?latex=%5Capprox%20constant%2F%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\approx constant/\lambda" style="vertical-align:-20%;" class="tex" alt="\approx constant/\lambda" />) from what it was before the measurement. Thus, through perceptual arguments, we get something similar to the Heisenberg uncertainty principle <center><img src="http://l.wordpress.com/latex.php?latex=%5CDelta%20x.%5CDelta%20p%20%5Capprox%20constant&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\Delta x.\Delta p \approx constant" style="vertical-align:-20%;" class="tex" alt="\Delta x.\Delta p \approx constant" /></center></p>
<p>We can make this argument more rigorous, and get an estimate of the value of the constant. The resolution of a microscope is given by the empirical formula <img src="http://l.wordpress.com/latex.php?latex=0.61%5Clambda%2FNA&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="0.61\lambda/NA" style="vertical-align:-20%;" class="tex" alt="0.61\lambda/NA" />, where <img src="http://l.wordpress.com/latex.php?latex=NA&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="NA" style="vertical-align:-20%;" class="tex" alt="NA" /> is the numerical aperture, which has a maximum value of one. Thus, the best spatial resolution is <img src="http://l.wordpress.com/latex.php?latex=0.61%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="0.61\lambda" style="vertical-align:-20%;" class="tex" alt="0.61\lambda" />. Each photon in the light beam has a momentum <img src="http://l.wordpress.com/latex.php?latex=2%5Cpi%5Chbar%2F%5Clambda&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="2\pi\hbar/\lambda" style="vertical-align:-20%;" class="tex" alt="2\pi\hbar/\lambda" />, which is the uncertainty in the particle momentum. So we get <img src="http://l.wordpress.com/latex.php?latex=%5CDelta%20x.%5CDelta%20p%20%5Capprox%204%5Chbar&#038;bg=FFFFEE&#038;fg=1D1B29&#038;s=0" title="\Delta x.\Delta p \approx 4\hbar" style="vertical-align:-20%;" class="tex" alt="\Delta x.\Delta p \approx 4\hbar" />, approximately an order of magnitude bigger than the quantum mechanical limit.</p>
<p>Through more rigorous statistical arguments, related to the spatial resolution and the expected momentum transferred, it may possible to derive the Heisenberg uncertainty principle through this line of reasoning.</p>
<p>If we consider the philosophical view that our reality is a cognitive model of our perceptual stimuli (which is the only view that makes sense to me), my fourth interpretation of the uncertainty principle being a cognitive limitation also holds a bit of water.</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="5" width="80%" align="center" bgcolor="#333333">
<tbody>
<tr>
<td><span style="color: #ffffff;">About the Author</span><br />
<span style="color: #ffffff;"><br />
The author is a scientist from the European Organization for Nuclear Research (CERN), who currently works as a senior quantitative professional at Standard Chartered in Singapore. More information about the author can be found at his blog: http//www.Thulasidas.com. The views expressed in this column are only his personal views, which have not been influenced by considerations of the firm&#8217;s business or client relationships.<br />
</span></td>
</tr>
</tbody>
</table>
<p><script type="text/javascript"><!--
  AttachPDF('w2009-01-ChaosUncertainty.pdf', 'Printable mock up version') ;
// --></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thulasidas.com/2008-11/chaos-and-uncertainty.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Nightmares</title>
		<link>http://www.thulasidas.com/2008-07/software-nightmares.htm</link>
		<comments>http://www.thulasidas.com/2008-07/software-nightmares.htm#comments</comments>
		<pubDate>Mon, 28 Jul 2008 02:13:44 +0000</pubDate>
		<dc:creator>Manoj</dc:creator>
				<category><![CDATA[Columns]]></category>
		<category><![CDATA[Quantitative Finance]]></category>
		<category><![CDATA[The Wilmott Magazine]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[murphy's law]]></category>
		<category><![CDATA[quant]]></category>
		<category><![CDATA[quantitative finance]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://www.thulasidas.com/?p=167</guid>
		<description><![CDATA[This article, to appear in the Wilmott Magazine, discusses the issues involved in rolling out a pricing model as a deployed platform for trading. Although of more direct interest to the practitioners, this article may appeal to those who find the mysterious field of global markets intriguing. 

[...] The financial industry keeps up with the developments in the computer industry for one simple reason. Stronger computers and smarter programs mean more money -- a concept we readily grasp. As we use the latest and greatest in computer technology and pour money into it, we fuel further developments in the computing field. In other words, not only did we start the fire, we actively fan it as well. But it is not a bad fire; the positive feedback loop that we helped set up has served both the industries well. [...]]]></description>
			<content:encoded><![CDATA[<p>To err is human, but to really foul things up, you need a computer. So states the remarkably insightful Murphy&#8217;s Law. And nowhere else does this ring truer than in our financial workplace. After all, it is the financial sector that drove the rapid progress in the computing industry &#8212; which is why the first computing giant had the word &#8220;business&#8221; in its name.</p>
<p>The financial industry keeps up with the developments in the computer industry for one simple reason. Stronger computers and smarter programs mean more money &#8212; a concept we readily grasp. As we use the latest and greatest in computer technology and pour money into it, we fuel further developments in the computing field. In other words, not only did we start the fire, we actively fan it as well. But it is not a bad fire; the positive feedback loop that we helped set up has served both the industries well.</p>
<p>This inter-dependency, healthy as it is, gives us nightmarish visions of perfect storms and dire consequences. Computers being the perfect tools for completely fouling things up, our troubling nightmares are more justified than we care to admit.</p>
<h4>Models vs. Systems</h4>
<p>Paraphrasing a deadly argument that some gun aficionados make, I will defend our addiction to information technology. Computers don&#8217;t foul things up; people do.</p>
<p>Mind you, I am not implying that we always mess it up when we deploy computers. But at times, we try to massage our existing processes into their computerised counterparts, creating multiple points of failure. The right approach, instead, is often to redesign the processes so that they can take advantage of the technology. But it is easier said than done. To see why, we have to look beyond systems and processes and focus on the human factors.</p>
<p>In a financial institution, we are in the business of making money. We fine-tune our reward structure in such a way that our core business (of making money, that is) runs as smoothly as possible. Smooth operation relies on strict adherence to processes and the underlying policies they implement. In this rigid structure, there is little room for visionary innovation.</p>
<p>This structural lack of incentive to innovate results in staff hurrying through a new system rollout or a process re-engineering. They have neither the luxury of time nor the freedom to slack off in the dreaded &#8220;business-as-usual&#8221; to do a thorough job of such &#8220;non-essential&#8221; things.</p>
<p>Besides, there is seldom any unused human resource to deploy in studying and improving processes so that they can better exploit technology. People who do it need to have multi-facetted capabilities (business and computing, for instance). Being costly, they are much more optimally deployed in the core business of making more money.</p>
<p>Think about it, when is the last time you (or someone you know) got hired to revamp a system and the associated processes? The closest you get is when someone is hired to duplicate a system that is already known to work better elsewhere.</p>
<p>The lack of incentive results in a dearth of thought and care invested in the optimal use of technology. Suboptimal systems (which do one thing well at the cost of everything else) abound in our workplace. In time, we will reach a point where we have to bite the bullet and redesign these systems. When redesigning a system, we have to think about all the processes involved. And we have to think about the system while designing or redesigning processes. This cyclic dependence is the theme of this article.</p>
<p>Systems do not figure in a quant&#8217;s immediate concern. What concerns us more is our strongest value-add, namely mathematical modelling. In order to come up with an optimal deployment strategy for models, however, we need to pay attention to operational issues like trade workflow.</p>
<p>I was talking to one of our top traders the other day, and he mentioned that a quant, no matter how smart, is useless unless his work can be deployed effectively and in a timely manner. A quant typically delivers his work as a C++ program. In a rapid deployment scenario, his program will have to plug directly into a system that will manage trade booking, risk measurements, operations and settlement. The need for rapid deployment makes it essential for the quants to understand the trade lifecycle and business operations.</p>
<h4>Life of a Trade</h4>
<p>Once a quant figures out how to price a new product, his work is basically done. After coaxing that stochastic integral into a pricing formula (failing which, a Crank-Nicholson or Monte Carlo), the quant writes up a program and moves on to the next challenge.</p>
<p>It is when the trading desk picks up the pricing spreadsheet and books the first trade into the system that the fun begins. Then the trade takes on a life of its own, sneaking through various departments and systems, showing different strokes to different folks. This adventurous biography of the trade is depicted in Figure 1 in its simplified form.</p>
<p>At the inception stage, a trade is conceptualized by the Front Office folks (sales, structuring, trading desk &#8211; shown in yellow ovals in the figure). They study the market need and potential, and assess the trade viability. Once they see and grab a market opportunity, a trade is born.</p>
<p><img class="centered" title="Fig. 1: Life of a Trade" src="/img/w5-figure1.gif" alt="Fig. 1: Life of a Trade" /></p>
<p>Even with the best of quant models, a trade cannot be priced without market data, such as prices, volatilities, rates and correlations and so on. The validity of the market data is ensured by Product Control or Market Risk people. The data management group also needs to work closely with Information Technology (IT) to ensure live data feeds.</p>
<p>The trade first goes for a counterparty credit control (the pink bubbles). The credit controllers ask questions like: if we go ahead with the deal, how much will the counterparty end up owing us? Does the counterparty have enough credit left to engage in this deal? Since the credit exposure changes during the life cycle of the trade, this is a minor quant calculation on its own.</p>
<p>In principle, the Front Office can do the deal only after the credit control approves of it. Credit Risk folks use historical data, internal and external credit rating systems, and their own quantitative modelling team to come up with counterparty credit limits and maximum per trade and netted exposures.</p>
<p>Right after the trade is booked, it goes through some control checks by the Middle Office. These fine people verify the trade details, validate the initial pricing, apply some reasonable reserves against the insane profit claims of the Front Office, and come up with a simple yea or nay to the trade as it is booked. If they say yes, the trade is considered validated and active. If not, the trade goes back to the desk for modifications.</p>
<p>After these inception activities, trades go through their daily processing. In addition to the daily (or intra-day) hedge rebalancing in the Front Office, the Market Risk Management folks mark their books to market. They also take care of compliance reporting to regulatory bodies, as well as risk reporting to the upper management &#8212; a process that has far-reaching consequences.</p>
<p>The Risk Management folks, whose work is never done as Tracy Chapman would say, also perform scenario, stress-test and historical Value at Risk (VaR) computations. In stress-tests, they apply a drastic market movement of the kind that took place in the past (like the Asian currency crisis or 9/11) to the current market data and estimate the movement in the bank&#8217;s book. In historical VaR, they apply the market movements in the immediate past (typically last year) and figure out the 99 percentile (or some such pre-determined number) worst loss scenario. Such analysis is of enormous importance to the senior management and in regulatory and compliance reporting. In Figure 1, the activities of the Risk Management folks are depicted in blue bubbles.</p>
<p>In their attempts to rein in the ebullient traders, the Risk Management folks come across in their adversarial worst. But we have to remind ourselves that the trading and control processes are designed that way. It is the constant conflict between the risk takers (Front Office) and the risk controllers (Risk Management) that implements the risk appetite of the bank as decided by the upper management.</p>
<p>Another group that crunches the trade numbers every day from a slightly different perspective are the Product Control folks, shown in green in Figure 1. They worry about the daily profit and loss (P/L) movements both at trade and portfolio level. They also modulate the profit claims by the Front Office through a reserving mechanism and come up with the so called unrealized P/L.</p>
<p>This P/L, unrealized as it is, has a direct impact on the compensation and incentive structure of Front Office in the short run. Hence the perennial tussle over the reserve levels. In the long term, however, the trade gets settled and the P/L becomes realized and nobody argues over it. Once the trade is in the maturity phase, it is Finance that worries about statistics and cash flows. Their big picture view ends up in annual reports and stake holders meetings, and influences everything from our bonus to the CEO&#8217;s new Gulfstream.</p>
<p>Trades are not static entities. During the course of their life, they evolve. Their evolution is typically handled by Middle Office people (grey bubbles) who worry about trade modifications, fixings, knock-ins, knock-outs etc. The exact name given to this business unit (and indeed other units described above) depends on the financial institution we work in, but the trade flow is roughly the same.</p>
<p>The trade flow that I described so far should ring alarm bells in a quant heart. Where are the quants in this value chain? Well, they are hidden in a couple of places. Some of them find home in the Market Risk Management, validating pricing models. Some others may live in Credit Risk, estimating peak exposures, figuring out rating schemes and minimising capital charges.</p>
<p>Most important of all, they find their place before a trade is ever booked. Quants teach their home banks how to price products. A financial institution cannot warehouse the risk associated with a trade unless it knows how much the product in question is worth. It is in this crucial sense that model quants drive the business.</p>
<p>In a financial marketplace that is increasingly hungry for customized structures and solutions, the role of the quants has become almost unbearably vital. Along with the need for innovative models comes the imperative of robust platforms to launch them in a timely fashion to capture transient market opportunities.</p>
<p>In our better investment banks, such platforms are built in-house. This trend towards self-reliance is not hard to understand. If we use a generic trading platform from a vendor, it may work well for established (read vanilla) products. It may handle the established processes (read compliance, reporting, settlements, audit trails etc.) well. But what do we do when we need a hitherto unknown structure priced? We could ask the vendor to develop it. But then, they will take a long time to respond. And, when they finally do, they will sell it to all our competitors, or charge us an arm and a leg for exclusivity thereby eradicating any associated profit potential.</p>
<p>Once a vended solution is off the table, we are left with the more exciting option of developing in-house system. It is when we design an in-house system that we need to appreciate the big picture. We will need to understand the whole trade flow through the different business units and processes as well as the associated trade perspectives.</p>
<h4>Trade Perspectives</h4>
<p>The perspective that is most common these days is trade-centric. In this view, trades are the primary objects, which is why conventional trading systems keep track of them. Put bunch of trades together, you get a portfolio. Put a few portfolios together, you have a book. The whole Global Markets is merely a collection of books. This paradigm has worked well and is probably the best compromise between different possible views.</p>
<p>But the trade-centric perspective is only a compromise. The activities of the trading floor can be viewed from different angles. Each view has its role in the bigger scheme of things in the bank. Quants, for instance, are model-centric. They try to find commonality between various products in terms of the underlying mathematics. If they can reuse their models from one product to another, potentially across asset classes, they minimize the effort required of them. Remember how Merton views the whole world as options! I listened to him in amazement once when he explained the Asian currency crisis as originating from the risk profile of compound options &#8212; the bank guarantees to corporate clients being put options, government guarantees to banks being put options on put options.</p>
<p>Unlike quants who develop pricing models, quantitative developers tend to be product-centric. To them, it doesn&#8217;t matter too much even if two different products use very similar models. They may still have to write separate code for them depending on the infrastructure, market data, conventions etc.</p>
<p>Traders see their world from the asset class angle. Typically associated with a particular trading desks based on asset classes, their favourite view cuts across models and products. To traders, all products and models are merely tools to making profit.</p>
<p>IT folks view the trading world from a completely different perspective. Theirs is a system-centric view, where the same product using the same model appearing in two different systems is basically two different beasts. This view is not particularly appreciated by traders, quants or quant developers.</p>
<p>One view that all of us appreciate is the view of the senior management, which is narrowly focussed on the bottom line. The big bosses can prioritise things (whether products, asset classes or systems) in terms of the money they bring to the shareholders. Models and trades are typically not visible from their view &#8212; unless, of course, rogue traders lose a lot of money on a particular product or by using a particular model. Or, somewhat less likely, they make huge profits using the same tricks.</p>
<p>When the trade reaches the Market Risk folks, there is a subtle change in the perspective from a trade-level view to a portfolio or book level view. Though mathematically trivial (after all, the difference is only a matter of aggregation), this change has implications in the system design. Trading systems have to maintain a robust hierarchical portfolio structure so that various dicing and slicing as required in the later stages of the trade lifecycle can be handled with natural ease.</p>
<p>The busy folks in the Middle Office (who take care of trade validations and modifications) are obsessed with trade queues. They have a validation queue, market operation queue etc. Again, the management of queues using status flags is something we have to keep in mind while designing an in-house system.</p>
<p>When it comes to Finance and their notions of cost centres, the trade is pretty much out of the booking system. Still, they manage trading desks and asset classes cost centres. Any trading platform we design has to provide adequate hooks in the system to respond to their specific requirements as well.</p>
<h4>Quants and the Big Picture</h4>
<p>Most quants, especially at junior levels, despise the Big Picture. They think of it as a distraction from their real work of marrying stochastic calculus to C++. Changing that mindset to some degree is the hidden agenda behind this column.</p>
<p>As my trader friends will agree, the best model in the world is worthless unless it can be deployed. Deployment is the fast track to the big picture &#8212; no point denying it. Besides, in an increasingly interconnected world where a crazy Frenchman&#8217;s actions instantly affect our bonus, what is the use of denying the existence of the big picture in our nook of the woods? Instead, let&#8217;s take advantage of the big picture to empower ourselves. Let&#8217;s bite the bullet and sit through a &#8220;Big Picture 101.&#8221;</p>
<p>When we change our narrow, albeit effective, focus on the work at hand to an understanding of our role and value in the organization, we will see the potential points of failure of the systems and processes. We will be prepared with possible solutions to the nightmarish havoc that computerized processes can wreak. And we will sleep easier.</p>
<p><script type="text/javascript"><!--
 AttachPDF('w2008-09-Nightmare.pdf') ;
//--></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thulasidas.com/2008-07/software-nightmares.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
