Tuesday, March 24, 2009

The Road to Chaos

At this point we need to take a brief detour from our charge into the market to get some very helpful conceptual background. While the concepts are rooted in mathematical rigor, some nice drawings have been prepared to present them in a more elegant form. What you need to take home from this post is that chaos is anything but random. The limited determinism that exists for any chaotic system is a very meaningful and powerful tool, one we'll be using extensively and should be studied closely.

There are numerous analogies
for chaotic systems. Paul Ormerod liked to use ant models in his book, Butterfly Economics. However, a more telling example in the context of chaos in the stock market is the cigarette smoke diagram. It is the canonical example given to undergraduate students of fluid dynamics to describe the change between smooth, predictable laminar flow to irregular, chaotic turbulent flow. Cigarette smoke is an analogy that is quite extensible into the study of the stock market and therefore will be used throughout this blog to describe chaotic phenomenon in hands-on language.
Click to Enlarge Image Cigarette smoke rising off of the burning tip will rise because it is hotter than the surrounding air. As it speeds up, it grows unstable and begins to break down into turbulent flow. The initial region of instability is periodic flow, meaning it just wobbles back and forth over and over in a very repetitive, predictable fashion. The actual point where the turbulent flow begins is distinct. You can try watching a few cigarettes or incense etc for yourself to gain firsthand familiarity. (Must observe in very still air)

The key things to note here are that both the laminar region and the periodic region are very easy to model and predict, and the model will be able to predict tiny features at any point in the smoke with a relatively high degree of accuracy. However, the turbulent region is different. It will begin with very subtle perturbations that suddenly cause the smoke to change remarkably in its flow characteristics and behavior. The resulting pattern is actually non-random. All of the physics of the fluid are still intact. Everything behaves exactly as we understand it, it's just that the solution is based on so much data that we can't possibly collect enough to model it.

To illustrate some other key aspects of turbulence, the diagram includes two other illustrative (and quite suppositious) features. Imagining we could identify the region where the turbulence would begin to develop two seconds from now, we would perplexingly find nothing of great interest. In fact, it would be probably impossible to distinguish the smoke that would cause turbulence from the smoke that wouldn't. This is because chaotic behavior is the culmination of tiny, tiny features getting conserved, propagated, and amplified so that when the tipping point is reached, it will be highly dependent on nearly everything. The second illustrative feature is the arrow that says "chaos starts here." While the cigarette undoubtedly plays a role in the shape of the final turbulent smoke swirling pattern, it's again impossible in practice to tell what exactly about the cigarette lead to the smoke transitioning to turbulent when and how it eventually did.

One of the easy mistakes to make here is to believe that the smoke turning to turbulence is the result of one tiny disturbance, such as a tiny perturbation in the ambiant air or an imperfection in the cigarette paper. The truth is that every single part of the picture contributes to the final result, and no single part is dominant. No matter which part of the picture you change, be it a tiny tear in the cigarette paper or a slight twitch in the surrounding air a foot away, the resulting shape of the smoke will be different and could even be unrecognizable.

If you're asking yourself what isn't random about this extreme sensitivity to initial conditions, think of observing a large number of cigarettes. Although Phillip Morris may have you believe that every single cigarette will produce an equally unique and interesting smoke pattern, the truth is that they will get less and less unique as you keep making observations. Each smoke plume will fall within roughly the same area, and if you could measure this over a large enough cigarettes, you could predict with a high degree of certainty the maximum growth rate of the turbulent smoke.
It turns out that this characteristic of turbulent smoke is a very well understood concept known as a boundary value problem. Although every cigarette will be unique, they will all tend to fall within the same range over time, and what this essentially says is that there is a lack of uniqueness with respect to the range that the turbulent smoke will occupy. Lack of uniqueness is another way of saying determinism, which is another word for a sure thing. Limited-determinism refers to the idea that each smoke plume will be in many ways unique and in at least one way very non-unique, with larger exceptions becoming more and more rare. It's not certain what particular shape the smoke will take. Only the range that it will occupy can be defined or measured with some certainty. The applicability of this concept to the stock market should be self-foreshadowing at this point. Welcome to the chaos highway.
This illustration is simply to make clear that boundaries only tell us where the chaos should go, not where it should go within the boundaries. We'll see in the next chapter that, for the stock market, there are reasons why these boundaries are soft, but that they exist and can be used to make relatively definite predictions about the price a stock will trade at in the future in certain situations. Stay tuned.

*note there is a typo in the first cigarette smoke diagram. will get corrected at an indefinite time in the future™.

Monday, March 23, 2009

Covert Newspaper Interception

In the last entry, we were introduced to the market at its most granular level. Moving one rung up the ladder, let's turn our attention to where these orders actually come from. Even without being overly simplistic, there is really only one source of all the action. Real people in offices and on the internet all over the world enter in orders or run computer systems that do the trading for them. We still haven't invented true artificial intelligence, so the software running on these systems is inevitably the result of the careful reasoning of a human being who designed an algorithm based on what he or she thought to be the most appropriate indicators for a computer to act on.

With the understanding that the market price we observe is the result of orders and orders are the result of decisions made by people, then the origin or price movements is rooted in those decisions. Stock trading has traditionally been characterized under two broad headings.

  • Fundamentals - The fundamentalist aims to accurately know the "value" of a stock and capitalize on deviations from this. The basis of a strictly fundamental investor's decisions are existing and emerging financial data and models used to mathematically quantify the implications of this data to come up with the value per share. A grossly simplified example of fundamental analysis is the simple value plus twenty times earnings rule. Real models will include lots of projections regarding future product demand and market growth, and they will also be designed for fast modification to obtain the new projections quickly as more data is made available. The methods employed are up to the analyst, but the common attribute of all fundamental analysis is that it's rooted in hard numbers and rigorous business forecasting.

  • Technical Analysis - The technical trader tends to be a direct student of the stock market itself, believing that because the trading decisions are ultimately what drive the price, direct analysis of these trading decisions is in fact more telling than the fundamental analysts predictions. Different technical models and indicators are more varied than fundamental analysis techniques. There are probably dozens of simple techniques based on theories like fractal patterns or candlesticks etc, and most of them get refined to the point of tears to deal with inconsistencies with varying degrees of success. Furthermore there are huge statistical models that use data all the way back to the beginnings of the stock market. Technical indicators based on mathematical analysis of the current trading and volume pattern have entire books written about them. The list goes on. What all technical analysis has in common is the use of existing trading data and a focus on the implications of trading decisions. It's a bit like watching ants in order to find out where food is. Since the technical traders themselves become ants whenever they buy and sell, the presence of feedback is obvious.

This is a more traditional evaluation of the big schools of stock trading. Let's rewrite this a little bit to gain some new perspective:

  • Primary Information Consumers - These traders and investors form their evaluation of a stock based on the emerging news and financial data. None of this information influences the market until this group of traders digests it.

  • Recyclers - These traders are highly reactionary and introduce feedback into the system. By divining buy and sell signals from the result of current trading activity and the secondary reaction to the news, they both increase the overall sensitivity to the current trading pattern and introduce meaningless and purely inventive behavior to the muddy brown water.

  • Cold-War Specialists - These traders seek to get farthest ahead in the feedback game, predicting and perhaps purposely triggering new cycles of feedback based on existing feedback behavior. In the process it's theorized that they will make money. This introduces a whole new layer of fantasy, as the process of making money is dependent upon buying and selling, which influences the market, which the computer models performing this kind of trading are even more highly dependent upon. At this level the market is so circular and feedback oriented that it's doubtful any of the resultant behavior has anything to do with the initial information trickling through to the final result.

The first classification is an academic one that shows the intellectual differentiation between two major schools of stock market analysis. The second classification scheme recognizes instead a food-chain of traders where each higher tier is trying to be a step ahead of the last, introducing more feedback and amplifying noise to the point that there is no meaningful signal left, a situation that believe it or not makes further technical analysis more productive.

This cartoon is a caricature of where we're at in this anal
ysis. Each step up the information food chain sees deeper than the last and employs more high-powered tools to analyze the information. Each layer tries to look over the shoulder of the last in order to get the jump. The take-home fact is that the only point where new information hits the market is at the financial data level. All other market movement results from the recycling of old news that has become expressed in the trading pattern, which will go on to create new cycles of feedback in the absence of any new news. These categorizations are non-exclusive. Many traders and organizations belong to several or all groups of traders. Indeed, if you read to the end of this book, you will likely belong to several groups yourself. The right tool for the right job is always the best tool.

In the illustration, we see a fundamental analyst sitting at his desk crunching away numbers and news articles to fit them into his model. The ninja looks over his shoulder while a pirate with a spyglass looks over his shoulder. A commando with binoculars looks over the pirate's shoulder and finally an astronaut in space uses the Hubble Space Telescope; everyone is looking at the same information.

Not everyone agrees to this relationship. The author of this particular article believes that "
the technicals are the chicken and the fundamentals are the egg." His argument is based on the idea of technical analysts perceiving subtle changes in the trading pattern in advance of the information becoming public knowledge. All this actually proves is that fundamentals sometimes hit the market in the form of insider information or perhaps just good detective work. In short, the distinction cannot be rightly made from fundamentals that are known to the trader and fundamentals that are known to at least one trader who then feeds the information into the market via his activities.

There you have it. Everything that happens because of fundamentals is a primary information source to the market. As this information is reused over and over, it's highly susceptible to changes in initial conditions. Given the market price at a particular instant and all of the fundamental data available to all traders, it would still be impossible to predict the stock price since the market is in fact re-digesting the old decisions and the chart leading up to any particular instant may have taken a variety of shapes, leading to a variety of new feedback mechanisms.

One interesting thing to note here is that, without at least some fundamental traders present, the price will never incorporate the emerging financial news and data. Pure technical traders live in a cubicle and implicitly push the same numbers over and over again without any way to corroborate their analysis with actual financial data. It is only by the signals contributed by fundamental analysis that technical analysts can navigate. If a stock were purely dominated by technical analysis models, then it would be possible to trade at prices independent of any changes to underlying fundamentals. While fundamentals can only do so much to determine a viable stock price, take the fact that stocks don't regularly diverge from solid valuations (in situations where these can be confidently made) by orders of magnitude to indicate that there is at the very least some connection from trading price to fundamentals.

In conclusion there is a very telling and definite distinction between fundamental and technical analysis. One is the precursor to all other trading activity that may follow. The other is dominant whenever this influence is minor. Think of it like a library where only fundamental analysts bring in new books. As long as there are new books, there is plenty to keep the technical analysts busy. In the absence of new books, only knowledge in the library already will be circulated.

Sunday, March 22, 2009

At the Beachhead

To establish the context of discussion let's start by looking towards the market as it exists at the most granular level, orders. Orders are entered and then executed, modified, or canceled. Every single order goes through this life cycle. Each individual active order has two essential characteristics, price and size. Price is straightforward. Size just indicates how many assets to trade. Buy orders and sell orders are all vying for shares and being adjusted to reflect the perceived supply-demand situation. If you've never watched a daily chart with level II volume in real-time, the easiest way to describe it is a rugby scrummage where all of the orders influence the supply-demand balance. Orders are made either with the goal of obtaining shares or simply pushing the pile by influencing perception, but in the end all orders will continue to move the front lines (the spread) one direction or the other. Whenever orders meet up in the middle, they are compatible and will execute. When we plot these executions against time, they show up as the spot price chart that we're familiar with. Orders continuously join and leave the pile. Some orders are bigger and, like a large rugby player, will influence the pile more than others. Orders meet in the middle and transactions occur. The whole pile shifts around as orders are adjusted or orders dry up on one side, temporarily giving way to a route until more orders are encountered at a new price. This is what trading looks like at the knife-edge of the market.

The scrummage analogy is only missing one important element. While orders do pile up at the middle and tend to push the flow of new orders and order modifications, there are always some traders that are actually looking to make transactions, and because they're always looking for the best price, they tend to act like self-conscious singles at a bar. Everyone wants to be first but nobody wants to be desperate. For this reason, the leading orders will often get canceled or shuffled to a price farther away from the action, hoping to get a better price on the shares the trader wants. The compliment to this effect is that when there are few orders on the other side, traders who need their orders to execute will often go chasing after orders, hoping to avoid the feared situation of having no trading partners. There you have it: self-conscious singles playing date rugby at a bar.

The big picture is composed by these orders tossing back and forth like grains of sand guided by shifting and turbulent wind. The grains strike the knife-edge and cause it to jitter around as it moves forward through time. We represent this on various kinds of charts, but arguably the most useful is the simple daily candle chart. Each day is a discrete unit of time, so the candles cleanly represent what has gone on for each trading day. Line charts are somewhat deceptive in that connecting the dots creates the illusion that the stock is at one price on any given time interval. This blog will go on to eventually describe many levels of information in the charts and will also analyze many of the big-picture mathematical significance, but for now study this chart briefly and take in the concept that the market is composed of granular trades. All further analysis will be based on identifying the characteristics of these trades and what that description tells us about any market.

This topic is honestly a little bit below the target level of the book, so if you need further elaboration, I suggest looking up the following terms: Level II Quotes, Depth of Market, Order Book. A simple site like investopedia should be sufficient. If not let me know and I'll develop a more thorough introduction. If you're already more than familiar with these concepts or find yourself wondering why I'm starting at such an elementary level, please bear with me as I work up to more advanced concepts.

Saturday, March 21, 2009

Sharpen Your Knives

First I'd like to welcome you to the blog and tell you a little bit about why I've decided to do it. Last weekend I had a long conversation with my friend, who is a graduate of physics at WPI, about chaos and the stock market. My experience in trading came before I had gained enough exposure to the rigorous mathematical concepts necessary to fully flesh out the peculiarities I had noticed. To make a long story short, at the end of several hours, we had assembled all of the right pieces of the puzzle so that my friend, who has a degree in physics, is now thoroughly convinced that there is in fact a level of determinism to the stock market. If you've never tried to prove something to a physics graduate, take my word for it that you can't do with smoke and mirrors.

In the end we concluded that there are a lot of important concepts that can be easily drawn from the model we developed, convincing me that I should go ahead and develop a book to explain the whole model, its limits, and how to apply it to best capitalize on the determinism that does exist, which is brings me to explaining the title. Looking at the market like a cow we'd like to convert to steak, but because of the chaotic aspects that shroud a lot of its behavior in impenetrable mystery, there are only certain cuts of its meat that can be reliably carved. Conventional wisdom says that the easiest profit opportunities are the least rewarding. Take it with a grain of salt for now, but I aim to explain in due course that the most profitable and reliable trades are in fact the easiest to identify and capitalize on.

Still, the cow we're after is highly erratic whenever these opportunities don't exist, so prudence is still necessary to avoid the more mystical cuts of the cow that, while potentially quite rewarding, cannot be rigorously described like the deterministic parts, giving us no real indication as to our likelihood of profit. In short, there are carvable cuts and uncarvable cuts of this chaotic cow. Traders, being profit driven, will inevitably attempt to carve up every piece of the cow, which often leads them into the mystical regions of the meat where determinism breaks down into randomness. Through this blog, I aim to hone the concepts and their delivery down so that the eventual book can both stand up to academic scrutiny and be accessible enough so that even retail investors can utilize the principles to identify the meat that is there for the taking without getting confused by the noise of a hungry stock market.