ANOVA
In statistics, the analysis of variance - more commonly referred to as an ANOVA - tests the relationship of multiple sets of means to determine if their respective populations are significantly different from one another and, therefore, independent.
Means are a ubiquitous analytical tool. For the purposes of quantitative trading, changes in means and their delineation of interval trends are commonly cited factors when trying to determine future price paths; these are more commonly referred to as moving averages. When interval moving averages are observed on a relative basis, we can conduct a 'technical analysis of variance.'
In plain English, we can easily observe the 20 day moving average of a stock to get a basic understanding of its recent direction and momentum. We can similarly observe the 50 day moving average to understand the stock's longer term direction and momentum. Additionally, we can measure the dispersion of the stock's price to these historical means. These are all ex-post observations in that we are studying past behavior. However, when we observe the relationship of means to one another, we can conduct ex-ante analyses about likely future events.
To be clear, this 'technical ANOVA' is not a test of population independence... by their very nature, we know that interval moving averages are derived from the same population of price data and, therefore, are not independent. Rather, the purpose is to make deductions about the timing, direction and magnitude of future price changes.
THEORY OF RELATIVITY
Einstein's theory of general relativity made its way back into mainstream news recently as scientists observed the presence of gravitational waves that are creating curves in the space-time continuum. The geometric theory of gravitation is an extension of special relativity to account for non-inertial frames of reference... or so I'm told. Basically, the theory of relativity describes motion between two frames of reference.
Equity prices typically move in one of two ways... barely at all or all of a sudden. Modest movements in prices can be characterized by prices that stay within an expected range over a given period of time as generalized by a realized standard deviation. Whereas, dramatic price changes will move outside of that expected range... sometimes violently so, as in the case of idiosyncratic catalyst events or systemic market corrections. To the naked eye, these movements can appear to be completely random.
However, when we observe the movements of equity prices - which we know to be stochastic and assume to be lognormal - we notice the motion of interval means through the incorporation of technical analysis. Here's a link to a piece I wrote on simulating equity prices:
http://tancockstradingblog.blogspot.com/2015/08/projecting-equity-prices-using.html
The motion of these measurements relative to one another tends to create energy that can directly influence price action. This brings us back to our technical ANOVA; the purpose of which is to understand when prices are likely to release energy and move outside of their standard ranges.
THE ENERGY FORMULA
Einstein would derive his theory of special relativity to express the relationship between mass and energy... we have come to recognize this expression by its famous formula, E=MC^2.
To understand how equity markets display energy, let us first define a few variables:
Where:
Next, let's observe some recent price action in the S&P and note the motion of relative means. Here's a chart of the SPY:
Our relative means are exhibited in the forms of curved lines which represent interval moving averages.
Below, are a few more visual representations of quantified variables used in my principle component analysis:
20 Day Variance:
The red lines represent points where the normalized measure of dispersion between price and moving average would be high.
Moving Average Variance:
Here, the red lines show areas of wide dispersion between moving averages.
Moving Average Variance Delta:
Here, we see both expanding and contracting moving average deltas.
SPLITTING ATOMS & SPLITTING MEANS, BOTH RELEASE ENERGY
On July 16, 1945, Robert Oppenheimer split the Plutonium atom to instantaneously release the equivalent of 20 kilotons of TNT in the New Mexico desert. Years after the successful Trinity test, Oppenheimer darkly equated his feelings following the world's first uncontrolled release of atomic energy to the Hindu scripture Bhagavad Gita by saying, "'Now I am become death, the destroyer of worlds.'"
On a lighter note, we can also think of equity price action in terms of releasing energy. Going back to our chart of the SPY, we notice three distinct dramatic moves that have all taken place over the course of the past six months:
The first (left-most) and third (right-most) moves represent almost identical retracement and subsequent breakout patterns that followed bouts of dramatic selling. The second movement represents the most recent round of market volatility that shook the S&P back in January.
Let's start by looking at the first move and breaking it down into three component parts:
Prior to the January breakdown, the S&P pulled back a total of four times following its most recent high.
Why didn't the index break down at any of these moments?
Lastly, let's look at the third movement:
The argument could be made that these examples are anecdotal... and it's true that there are always exceptions to general rules. Fundamental market factors cannot be ignored. However, when patterns appear consistently throughout history and the same set of variable measurements accompany them, deductions can be made about future price action.
In statistics, the analysis of variance - more commonly referred to as an ANOVA - tests the relationship of multiple sets of means to determine if their respective populations are significantly different from one another and, therefore, independent.
Means are a ubiquitous analytical tool. For the purposes of quantitative trading, changes in means and their delineation of interval trends are commonly cited factors when trying to determine future price paths; these are more commonly referred to as moving averages. When interval moving averages are observed on a relative basis, we can conduct a 'technical analysis of variance.'
In plain English, we can easily observe the 20 day moving average of a stock to get a basic understanding of its recent direction and momentum. We can similarly observe the 50 day moving average to understand the stock's longer term direction and momentum. Additionally, we can measure the dispersion of the stock's price to these historical means. These are all ex-post observations in that we are studying past behavior. However, when we observe the relationship of means to one another, we can conduct ex-ante analyses about likely future events.
To be clear, this 'technical ANOVA' is not a test of population independence... by their very nature, we know that interval moving averages are derived from the same population of price data and, therefore, are not independent. Rather, the purpose is to make deductions about the timing, direction and magnitude of future price changes.
THEORY OF RELATIVITY
Einstein's theory of general relativity made its way back into mainstream news recently as scientists observed the presence of gravitational waves that are creating curves in the space-time continuum. The geometric theory of gravitation is an extension of special relativity to account for non-inertial frames of reference... or so I'm told. Basically, the theory of relativity describes motion between two frames of reference.
Equity prices typically move in one of two ways... barely at all or all of a sudden. Modest movements in prices can be characterized by prices that stay within an expected range over a given period of time as generalized by a realized standard deviation. Whereas, dramatic price changes will move outside of that expected range... sometimes violently so, as in the case of idiosyncratic catalyst events or systemic market corrections. To the naked eye, these movements can appear to be completely random.
However, when we observe the movements of equity prices - which we know to be stochastic and assume to be lognormal - we notice the motion of interval means through the incorporation of technical analysis. Here's a link to a piece I wrote on simulating equity prices:
http://tancockstradingblog.blogspot.com/2015/08/projecting-equity-prices-using.html
The motion of these measurements relative to one another tends to create energy that can directly influence price action. This brings us back to our technical ANOVA; the purpose of which is to understand when prices are likely to release energy and move outside of their standard ranges.
THE ENERGY FORMULA
Einstein would derive his theory of special relativity to express the relationship between mass and energy... we have come to recognize this expression by its famous formula, E=MC^2.
To understand how equity markets display energy, let us first define a few variables:
Where:
- 20 Day Moving Average: The arithmetic mean of prices over the previous 20 days
- 50 Day Moving Average: The arithmetic mean of prices over the previous 50 days
- 20 Trend: A normalized measure of the change in the 20 day moving average
- 50 Trend: A normalized measure of the change in the 50 day moving average
- 20 Day Variance: A normalized measure of absolute dispersion between the current price and 20 day moving average
- 50 Day Variance: A normalized measure of absolute dispersion between the current price and 50 day moving average
- Moving Average Variance: A normalized measure of the dispersion between moving averages
- Moving Average Variance Delta: The rate of change in the moving average variance
Next, let's observe some recent price action in the S&P and note the motion of relative means. Here's a chart of the SPY:
Our relative means are exhibited in the forms of curved lines which represent interval moving averages.
Below, are a few more visual representations of quantified variables used in my principle component analysis:
20 Day Variance:
The red lines represent points where the normalized measure of dispersion between price and moving average would be high.
Moving Average Variance:
Here, the red lines show areas of wide dispersion between moving averages.
Moving Average Variance Delta:
Here, we see both expanding and contracting moving average deltas.
SPLITTING ATOMS & SPLITTING MEANS, BOTH RELEASE ENERGY
On July 16, 1945, Robert Oppenheimer split the Plutonium atom to instantaneously release the equivalent of 20 kilotons of TNT in the New Mexico desert. Years after the successful Trinity test, Oppenheimer darkly equated his feelings following the world's first uncontrolled release of atomic energy to the Hindu scripture Bhagavad Gita by saying, "'Now I am become death, the destroyer of worlds.'"
On a lighter note, we can also think of equity price action in terms of releasing energy. Going back to our chart of the SPY, we notice three distinct dramatic moves that have all taken place over the course of the past six months:
The first (left-most) and third (right-most) moves represent almost identical retracement and subsequent breakout patterns that followed bouts of dramatic selling. The second movement represents the most recent round of market volatility that shook the S&P back in January.
Let's start by looking at the first move and breaking it down into three component parts:
- The first move is the market's retracement off of a low. The market has expended a lot of energy to get to this point and is beginning to recoil. Here, the index has large 20 and 50 day variances, a large negative moving average variance and the move begins at the point where the difference between the averages begins to shrink, or the moving average variance delta statistic changes from negative to positive.
- The second part of the move is a basing period where volatility recedes and markets consolidate and store energy again. Here, the variance statistics are getting smaller.
- The last segment of the move is a breakout. The averages have crossed and are the variance between them is growing as the market expends energy again until the point where the variance statistics are large again.
Prior to the January breakdown, the S&P pulled back a total of four times following its most recent high.
Why didn't the index break down at any of these moments?
- The moving average variance statistic is widely positive during the first two pullbacks and actually positive (even if barely so) during all four. A wide Moving Average Variance is the result of recent price action where energy has been used.
- As the average variances contract, the market moves become larger as the index has recouped energy.
- Finally, after the averages cross again and begin to expand to the downside, market energy expands to the downside and another round of selling follows.
Lastly, let's look at the third movement:
- This should look familiar as we saw an almost identical move following last summer's market volatility.
- The three segment moves follow the same patterns as last fall's move with the same accompanying statistics.
- This is the basis for an expected continuation of the breakout pattern... history suggests that prices will continue to expand as the market releases energy until the variance statistics become inflated once again.
The argument could be made that these examples are anecdotal... and it's true that there are always exceptions to general rules. Fundamental market factors cannot be ignored. However, when patterns appear consistently throughout history and the same set of variable measurements accompany them, deductions can be made about future price action.
Comments
Post a Comment