Wednesday, May 27, 2009

If I Were a Computer

If there was a several hundred billion dollar capital fund and you were charged with investing it, you would hire the smartest people you could get your hands on, provide them with a relatively insane budget, and give them huge incentives to perform. Even with a lot of bright people who can easily employ fundamental analysis and technical analysis to make a lot of money, the tendency will still be to try and get ahead of the game. After all, who gets paid to invest several hundred billion dollars with primitive tools used by any multi-billion dollar hedge fund manager? If you were paid to be one of these people, three tools would be made available to you with no expense spared: The best financial market data that can be purchased, every research report written, and a really big computer along with some programmers and engineers to help you run it.

The details of this post are rather daunting. You don't need to understand them down to the gory details in order to see the points of this exercise. Focus on the notions that are implied simply by alluding to the mathematics rather than the actual content of mentioned formulas.

Now for some plot spoilers:

What you're looking at is called a control diagram. Whenever there's a really big system with lots of feedback response that need to be modeled, engineers will draw up a control diagram and use it to write the equations of the system. Looking at that big column of blocks with the arrows going in a circle, does something seem familiar? (This illustration is from Covert Newspaper Interception.)

Here's a brief rundown of the diagram:
  • Emerging financial and economic data (basically any information, including insider information, that will affect the results of fundamental models.) flows in at the far left.
  • This data gets processed by fundamental analysts, who are the vector for that data to start affecting the supply and demand for a stock.
  • This result flows into the summing junction, which is exactly what it sounds like, just a way of indicating that the arrow coming out of the right side is the sum of everything going in.
  • The summed signal goes back into all of the technical analysis branches, which produce new buy and sell signals.
  • The result that pops out at the right is dependent on both the recycled data that's already present in the system and the new data that is introduced by fundamental traders.
Now, to skip the ending and the epilogue, ask yourself why these diagrams are called control diagrams. If hair isn't raising up on your spine, it should be. The very act of writing this diagram like this shows that it's theoretically possible to write some software that to a large degree not only predict, but control the demand for a stock by adding an external signal that either causes or dampens feedback cycles.

It gets better. The task of figuring out how influential technicals and fundamentals are is readily taken care of by the use of empirical constants k1, k2, k3...kn, and multiplying the indicator by this constant, or even a simple empirical formula, all while remaining well within the reach of the computational power of a simple desktop computer.

How is this possible? Well, let's imagine that a set of n traders with mi capital are watching a particular indicator of a particular stock, and that each individual trader is influenced in some arbitrary amount by that indicator. The weight for each individual trader is just some constant factor, like 0.10 for instance or maybe 0.40 if a trader really likes a certain indicator. The summation of all of these traders, weighted by their individual incomes and sensitivity to the indicator, is just a constant times that indicator. One simple number multiplied by one other number can, to a very large degree, represent the aggregate trading influence of the movements of a particular indicator.

In a nutshell, that last paragraph says that you can, to a sufficient degree of accuracy, simplify the stock market to be, instead of n traders with n wallets and n propensities to trade because of a particular indicator, just one big trader with a big wallet and a wallet-weighted average propensity (wallet-weighted average since the amount of money a trader has influences how much their propensity gets expressed in the aggregate).

If you do this for every single indicator imaginable, you can represent the entire feedback portion of the stock market as one gigantic, linear function. Solving for these k constants isn't easy just yet. And we still have to decide on how to empirically represent the fundamentals.

To start, let's assume that, by and large, you can hire a group of true-to-the name analysts who have access to enough of the information that their assessment of the value and future earnings of a stock are a reasonably accurate depiction of all traders who are following a stock. They don't have to be supremely accurate since the bulk of traders trade multiple stocks and don't have time to cover every one of those perfectly themselves. The idea is that you want to have some indication with sensitivity to changes in fundamentals that can be tweaked by a constant or simple function. Hiring traders or polling traders to get an idea of what other traders are doing is a perfectly valid course of action. Again, you're making a reasonable assumption that n traders with n models and n data sets can be approximated as one average trader who used a plausibly average data set and a plausibly average financial model. The accuracy of this approximation is again not that important. That your panel of analysts behaves for the most part just like real traders is all that's important.

Now, we could be heroes and plug and chug these constants all day until the model starts working, or we could just throw the thing into what's called an artificial neural network. It's just a neat type of software that is very good at signal analysis and recognizing patterns in data. It would simply tweak the constants until the model, at any given time in the past, predicted any other time after that with the highest accuracy. The result won't be perfect, but what will eventually get spat out on the other end is a set of these k constants that makes the model the most in line with the data. Not only that, using statistical analysis it would be possible to estimate the accuracy of future predictions, so the software could tell you the best times to pay attention to the result.

And it gets better still. By controlling feedback, a sufficiently large fund could create feedback cycles that would be stable enough to absorb the fund's own trades, and they have absolutely every reason in the world to do so. It's conceivably possible that maximizing the return on investment for such a fund might even involve calculating which feedback cycles to generate at which points in order to maximize the total amount of the fund's own trading activity that the market volatility could accommodate. Given the size of some overgrown funds, once more it can't be more obvious that they in fact have every reason in the world to do so.

This post has cleared the stage for the dark side of the stock market. Get ready to feel more skeptical of the market as a whole than your used to. At the same time, rest assured that you can be on a level playing field as long as you let the underlying implications work for you. The posts following this one will almost entirely be focused on this dark side and how to safely navigate it. Consider this the half-way point for this blog.

Tuesday, May 26, 2009

Changing Lanes

When navigating the chaos highway, what you quickly realize is that, while the middle of the road can't give you a clear sense of direction, the edges of the asphalt are usually so cut-and-dried that you find yourself neglecting to even imagine what it's like beyond the edge. This can never be made more clear than if you ride a motorcycle. Sure, you have ten feet of margin on either side, so in a way it's like you have all the freedom in the world, but that stops at the curb. If you ever have to get closer than you like, you feel it fast.

The boundaries of the stock market are not hard boundaries. Think of grassy medians. The stock tends to bounce around like a reckless motorcyclist as long as things are more than okay. Wanting to profit from the movements of this motorcyclist, we're tempted to try and hire physicists and mathematicians and work out the equations of motion etc etc. Yet because of the motorcyclists unpredictable whims and even bad driving decisions, this is for the most part guaranteed to be a dead end. The more precisely we try to describe the motorcyclist, the more vulnerable our predictions are to subtle inconsistencies.

But recall the cigarette analogy. We know that the largest divergences are the most rare. We know that the range of expected behavior roughly reflects changes in fundamentals and subsequent shifts in price-elasticity (supply-demand/price relationship). What if the motorcyclist is happily speeding along in the far right lane on a freeway that's taking a sharp left and dropping two lands due to construction. Chaos goes here. If "here" changes because the highway itself is turning too far away for the motorcyclist to do whatever he or she wants, then it's no longer about their whims. With a limited degree of certainty (they can ride in the median if they're crazy) they will follow the road.

The trading price is like a reckless motorcyclist. There's lots of profits and losses to be had in the chaotic meanderings through five lanes of traffic. The reliable profit comes when you see that the motorcyclist has nowhere else to turn. Keep your eye on the biker, but keep a better eye on the road. As a corporation's fundamentals change over time, the region where the stock will trade at also changes over time. The stock price is the most obvious piece of the picture. When you see that the fundamentals that have created the current trading regime are going to break down in some way, good or bad, you know almost without a doubt that the stock is about to be on the move.

Monday, May 25, 2009

Brick by Brick

Probably the most frustrating situation from the perspective of fundamentals is when you find yourself having all of the pieces of the puzzle together and know almost beyond a shadow of a doubt that your prediction about the future value of the company is going to pan out, and yet the stock is slowly meandering towards the inevitable. The easier it is to draw your conclusion, the harder it is to figure out what's keeping investors from jumping all over it. To set this paradox aside, first recall that a stock's fundamentals change over time. The second thing to consider is that fundamental valuations are only driven by breaking news, emerging financial data, and insider information etc, all types of cold hard facts that are known to at least some investors. Check back to Covert Newspaper Interception for a refresh on the subject.

Now, within the large volume of information available that can be used to come up with fundamental evaluations, there are essentially two types of facts:
  • Facts that are true right now. These are facts that are immediately actionable and give indications as to the present value of the corporation. Information of this nature has an immediate impact on the stock that is only limited by the reliability of the information.
  • Facts that are true over time. These are facts that are forward looking. A lot of things can happen in between now and then, but barring the emergence of any conflicting data, the information will become more and more like the first type of fact as the time of the prediction draws near.
To put it simply, a check on the way to the bank isn't quite the same as a check in the bank. The risk involved in forward looking predictions affects the price traders are willing to pay for future earnings. The desire to take profit on these earnings leads the market to get ahead of itself quite often, but these are localized variations that fit within the chaotic trading range. By and large, stocks will meander towards predictions rather than trading in the eventual range right off the bat.

To look at this another way, every prediction has a time point associated with it. In between now and the time the prediction is targeting, the part of the prediction that is exposed to risk will start off at maximum risk. As time goes by, if nothing negates the prediction, it will become more and more certain. If the time of the prediction target is reached with no contradicting information, the prediction will have become like fact, within the accuracy limits of the initial prediction. People don't pay for risk unless they're playing the lottery. The value in information that is forward looking will be directly proportional to the risk fading out as the potential for large surprises dwindles because of the nearness of the prediction target.

The best example of this is earnings forecasts. A company issues an earnings forecast at the beginning of the quarter. Parts of the forecast will be fully effective on the day of the prediction. Other parts will be forward looking and will take time to fully pan out. As time goes by in the quarter and there are no earnings warnings or revisions, it's usually assumed that the company has hit their target forecast or only slightly performed outside the predicted range. Then earnings are reported. This information is immediately actionable and 100% accurate, excepting gross accounting errors. Hindsight is 20/20. Foresight becomes hindsight in the absence of new information.

Putting all of the information together, all of these facts and predictions will assemble over time. The concrete part of what is known and used to establish fundamental valuations takes shape over time. Only the concrete parts matter. Some of this information is concrete today. Some of it only becomes concrete over time. Brick by brick, the facts that you can bank on come together.

Monday, May 18, 2009

Serendipitous Joyriding

ser·en·dip·i·ty - the faculty or phenomenon of finding valuable or agreeable things not sought for - Merriam Webster

When looking at the last article, especially if you've tried to delve into technical analysis before, you may have noticed a paradox that's rather hard to overcome. Different types of technical analysis can lead to conflicting conclusions. Different trading patterns can exist simultaneously, even nested patterns. Yet as a technical analyst you would nonetheless be faced with the need to reach a conclusion in the absence of definitive indications. Isn't that what the stock market is supposed to be about anyway? This article aims to change your mind.

Back to clouds and general inaccuracy of weather forecasting, there are some obvious similarities with the stock market. Hurricanes don't just disappear and stocks don't trade at prices that are not supported by supply and demand. The unlikely happens. The impossible doesn't. A hurricane is a very good example of where something chaotic, weather, gives birth to something that's more stable, self propagating as long as conditions remain favorable, and has readily identifiable order to it. Compared to relatively random puffs of clouds that can occur under a lot of conditions, a highly organized storm has both predictability and easily recognized patterns to its behavior. Yes, we still wonder whether they will land in Mexico or Louisiana sometimes, but compared to weather in general, a hurricane is something altogether different than the apparent randomness it resulted from.

Now, to borrow another example from fluid dynamics, take a good look at the photo on the right. Notice how the surrounding clouds seem to have nothing particularly important about them, while seemingly out of nowhere a double swirling pattern emerges and flows downwind. It's a Von-Karman vortex sheet. It was caused by an island that disrupted the cloud flow, which happened to be moving the right speed past an island of the correct size. All of that just happened. And yet the swirl pattern that emerged was periodic, highly organized but still so completely fragile that it slowly dissipates into the equally impressionable surrounding flow.

If chaos is apperent disorder from which it would seem nothing can become ordered, serendipity is the coalescence of many disordered influences that becomes itself not only ordered, but ordered in such a way that it becomes self-sustaining to an extent. As a technical analyst, this is many times what you see. At certain times it's as if there just is no clear pattern, and then out of nowhere the right influences start developing such that there is a clear pattern, and it goes on to re-express itself in the trading behavior as the rest of the traders recognize that the pattern has formed and seek to capitalize on it, reinforcing it.

In the last article, it was advised to think a bit like a single at a bar. Find a table, and then start talking. If you stand out in the middle of nowhere, you're never going to get anywhere. When you're trading, you have to realize that whether you're thinking that a stock is profitable or not, there's still no point in throwing all your money in right away. Don't fight the rugby pile at mid-field.

This article has a second piece of advice; don't find answers where there are none. It's a bit like trying to get inside a person's head while talking to them. You'll inevitably wind up chasing shadows; you'll show yourself in plane sight the first time you screw up. Stock market is no different. The first time you reach a conclusion about something that's really still too weak of a pattern to have the kind of significance required to become self-sustaining, you'll get caught with what's called a whipsaw, where an indicator indicates too early. In layman's terms, it's wrong.

When doing applying technical analysis or any kind of analysis for that matter, avoid the clouds. When you see a small eddie in a vast flow, let it go. When you see a couple of massive vortices that dominate the flow behavior and will continue to do so, jump on it. First of all, the smaller votices are not worth a lot because, even if they do continue to propogate, the end movement will be very small. Second of all, less organized phenomenon always get creamed and negated by more organized phenomenon. Why get fascinated by a quarter that's spinning on a table when a dump truck is about to unload a heap of cash somewhere else? Even if you find a needle in a haystack, it's still just a needle.

Just like these Von-Karman vortex sheets that span miles out over the ocean, what you should be most interested in is that effect that has sprung forth from a medley of all the right circumstances and is about to go on repeating itself several times even in the face of smaller eddies and disturbances along the way. They're huge. They're easy to identify. They develop slowly. They dominate. When you're looking at the weather of the market and the clouds seem to be just rolling forth without purpose, leave them alone. Wait for those moments of serindipity when you realize that all the right things have come together. At that moment, you'll be at the right place at the right time and be able to slowly buy your way into a position, and you won't find it that stressful. You'll have plenty of time to watch and see if the thing keeps developing and you won't have to overexpose yourself by trying to get the most out of a 2ft ladder.

When you do this, it's like your on chaos highway without a thing to lose just changing lanes at a whim and hugging the corners to feel the edge. There are sometimes cars all around and no clear direction, but sometimes that one driver slows down and that one space opens up in that other lane and you can punch it and move straight on through like there's no traffic at all. It's not magic anymore than finding a door in a wall. When it's there it's there. Serendipitous joyriding.


Saturday, May 2, 2009

Where's the Party At?

During the last post, you should have cemented the idea of limited chaotic trading by exploring the mechanisms that both cause it and contain it to finite ranges. This post will focus instead on what happens inside this finite range. While semi-hard limits are established by the edges of plausible fundamental valuation scenarios, fundamentals play less and less of a role when the stock is trading well within the plausible range. Look back to Covert Newspaper Interception for a refresh on the relationship between fundamentals and technical analysis.

This is a diagram of essentially what you should understand so far. There is a time dependent range of prices that a stock could plausibly trade at. These limits cannot be definitively described by any analytical solution, and even if they could, supply demand imbalances can cause them to be exceeded, although this is not favorable from the market's perspective and traders will quickly jump in to pick up any asset that is trading well away from its estimable value.

The limits can be changed by any number of influences, but usually large changes in a stock's trading regime will occur because of decisive changes to the corporations fundamental value drivers. Whenever this occurs, the chaotic meanderings of the stock within the range of plausible valuations will run into the semi-hard boundaries, where the demand becomes very responsive to further price changes and the stock can be expected to reliably recover.

Stocks always spend the least amount of time near the semi-hard boundaries. The reason for this is that the fundamentals are always dominant and exert ever increasing pressure at the edges, driving the stock back towards the chaotic region where fundamentals give no definite indication as to whether the asset is over or under-priced.

Area in between the boundaries is the current region of interest. The question of trading price is rather easily answered whenever the stock is near it's plausible fundamental boundary. It's rather obvious that somebody needs to either obtain or get rid of shares, and so traders are quick to show up at these points. Their activities guide the stock back into the chaotic region. The question is, now what?

Going back to the singles playing rugby in a bar analogy, ask yourself if you would stand out in the middle of nowhere or wait for a table to fill up somewhere with some interesting characters. Obviously you want to be where the action's at if you're going to make a move. Just like a trader wants to maximize profit potential for every trade, in a bar you might only briefly engage a single your interested while passing by in only to head over to their table later. The decisive interaction happens wherever interested parties coalesce for the mutual opportunity for exchange. Stock trades that happen at prices of little significance are low in volume and likely have little effect on the overall trading pattern. Cool exchanges while passing by on the staircase don't leave much opportunity for conversation.
The rugby pile does not just happen out of thin air. Players wait for the right openings. No trades can happen without trading partners. Orders will be waiting in the wings until it's obvious that some trading is about to take place.

Looking at our current model, a chaotic trading pattern semi-bounded by price elasticity resulting from fundamental analysis, it's a bit like knowing what street the bar is on. Once inside, the question becomes, which table are we looking to find a seat at? Technical analysis is the only tool capable of answering this question. It serves such a vital role that even if the entire body of literature on technical analysis were just 1% of what it is, that relatively tiny amount of knowledge would be paramount for anyone who wanted to maximize their profit or move a large amount of shares.

At first glance, the most basic forms of technical analysis seem to be inspired more by superstition and market psychology than any meaningful mechanisms, but recall that we, as traders, are interested exactly in determining where a "good" price to make a play is at in the absence of decisive fundamentals. To put it bluntly an arbitrary but mutually agreed upon price is exactly what's desired. Therefore the fact that the methods seem arbitrary makes them even more important than any analytical indications.

Before going straight to the question of which price to trade at, let's look at the three basic situations for any stock to find itself in:

  • Trading Flat - In this situation, the stock has a lot of recent information describing the price elasticity. Reactions to price are well understood and the contention points are straightforward. Non-flat trading will encounter resistance.
  • Moving Into Well-Defined Trading Regime - The price is on the move, and there is a body of existing trade history providing good cues as to what prices can be expected relative to prior valuations.
  • Moving Into Undefined Trading Regime - Stock is at a price that it has never traded at or hasn't traded at for a very long time. Indications of relative valuations are not current enough or non-existent and cannot provide reliable price points.
Now, to resolve what to look for in all three of these situations, let me introduce you to the three technical analysis tools that you will, without fail, get the most mileage out of.

Price Support/Resistance levels: Look for regions of the chart where lots of trading activity has occurred. A volume overlay is available on free websites such as stock charts that lets you see this graphically:

Blow up the chart to get a clearer view. See the hold up that occurred at approximately 7900 - 8300? Shouldn't be all that significant, yet as the Dow recovered, lo and behold the bounce decelerated quickly as it re-entered this range.

Uptrends/Downtrends: Connect some recent peak-to-peak points or bottom-to-bottom points and linearly extrapolate the result. It's really that simple. Stock charts has their own article on this. This is the most straightforward pacing mechanism in the stock market. As long as the rugby pile keeps advancing somewhere, this is where the new players will show up to keep the momentum going. Trendlines are especialy influential in the shaping of intraday trading.

Moving Averages: Come in exponential and standard varieties. These are also really good pacing mechanisms for a stock on the move. They form the first line offense/defense for trendlines. The beauty is that they exist as indicators even in the absence of existing price points or a nearby trendline. Thus they work even in the third situation.


AMD goes into a dead-cat bounce with the rest of the market and where's the first good point for restistance? There weren't any good price plateau's on the way down, so the stock went on uninterupted until the 200-day moving average. Then the scrummage was on. The exponential 20-day in particular will remain very intact on a long trend and will breakdown almost immediatly whenever the main trend has run its course.

With these three tools, you have all the ability to pick arbitrary price points that you need in order to avoid trading out in the middle of nowhere. Got a falling knife? Look for an old price point. Not sure where to make an entry on a long-term uptrend that is getting tripped up? Look for a longer-term uptrend that has remained intact.

I don't really consider this a form of technical analysis, but picking round numbers isn't always a bad idea. If you want a buy order to go through for certain and are expecting the stock to hit at least $14.50, place the order for $14.48 and you'll avoid having your order get creamed by everyone else. These are numbers of arbitrary significance and if humans had twelve fingers maybe we would think $144 was a price milestone, but we have ten and so decimal values are the numbers to pay attention to. I know. It seems too trivial to be significant, but trust me if you ever watch level II quotes on the daily, you'll see relatively massive volume at round prices like $35 or $10. The rounder the better.

Yes, these numbers are arbitrary, but so is the arrangement of tables in a bar, and yet we still sit down at them instead of standing in the space between.