Showing posts with label feedback. Show all posts
Showing posts with label feedback. Show all posts

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.

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.