Skip to main content

Convexity as a Technical Indicator - Applications of the Second Derivative...



WHAT'S IN A NAME?

In investment parlance, the term 'convexity' is typically reserved for the topic of fixed income risk; especially in regards to debt with embedded optionality where negative convexity is a prominent pricing factor.  However, it is important to recall that 'convexity' (or 'concavity', for that matter) is a mathematical measurement used to describe the second derivative of a continuous, nonlinear function on an interval.

The issue with confining the term to a single connotation is that - for better or worse - investment tools have become increasingly nonlinear since the days of the 60/40 model and convexity is present in a number of applications.  The extent to which it has been circumscribed to a single asset class is evident in equity option jargon where the second derivative of the pricing function is called 'gamma' instead of convexity.  Of course, the argument could be made that the principle purpose of option vernacular is to convolute unsuspecting buyers; it's easier to sell something with 'theta' than something that will 'exponentially bleed you dry'... 'theta' just sounds better.


FINDING THE SECOND DERIVATIVE

In factor modeling equity prices (or in keeping with the semantic theme, principle component modeling), the hunt for factors with predictive capacity is perpetual.  For a while, I've noticed what looked like more than a casual relationship between the convexity of the 20 day moving average and subsequent price movements.

There are numerous ways in which convexity can be applied as a metric.  In doing a little research, I found the most commonly used method is the inflection point.  Inflection points occur when a function's second derivative changes sign (from positive to negative or vice versa).

Graphically speaking, an inflection point occurs when a the concavity/convexity of a function changes.  Think of a standard cubic function at the origin, the convexity changes from negative to positive; or a cube root function, which becomes asymptotic at the origin as its convexity changes from positive to negative.



To see how this relates to technical analysis, here's a chart of the SPY with some notable inflection points highlighted:

 
This chart shows how finding points of inflection can be useful but there are a couple of things to consider before building it into a factor model.

First, there is the issue of false flags; this occurs when a metric indicates a changing factor for reasons more closely related to static data than changing market forces.  For example, in between the second and third arrows in the previous chart, there were multiple inflection points because equity prices languished at a high base with hardly any volatility.

Second, inflection points can be difficult to incorporate into a multi-factor model.  As the name suggests, multi-factor models depend on numerous factors that have to be quantified and it would be cumbersome to try to incorporate a factor that signifies points of change.  Also, I suspect that the degree to which the moving average is convex would be beneficial in itself.

So the issue becomes how to quantify the factor of convexity.

One way would be to use a dichotomous variable expressed by a simple inequality.  This would capture whether convexity is positive or negative.  On the plus side, it's easy to incorporate, I already use boolean variables for other factors in the same model and it would capture inflection points.  Unfortunately, the primary limitation of these variables is the loss of magnitude.  A series of discrete, instead of dichotomous, variables could be used instead.  This would require a more complex set of inequalities, but it certainly can be done.  However, it does not fully solve the higher yielding issue of magnitude - which is still not fully captured.

This leaves the option of using continuous variables.  Continuous variables may not explicitly capture points of inflection, but they do reflect the more critical point of convexity magnitude and are perhaps the easiest to incorporate into a factor model.


BUILDING A METRIC 

To build a serviceable convexity metric, I used a moving average to dampen the noise produced by  the counteraction between the trending vs tracking phenomenon in predictive analytics.  This helps to address the issue of false flags.

To measure the results, I looked at the predictive capacity of the lone metric against the daily price changes in the SPY etf over the last 500 days.  The average daily return over this period was 3 bp with an annualized volatility of 13.9%.  When I split the daily results across the positive/negative threshold, the daily returns on days that followed a positive convexity metric averaged 25 bp with 12.3% vol vs -16 bp with a 14.4% vol on days that followed a negative convexity measurement.

Below, you'll find the linear relationship between my convexity metric and daily return.  Strong relationships are virtually nonexistent for stochastic variables like equity prices so the presence of a positive relationship and an R-squared greater than 0.1 is meaningful.


I am continuing to test the metric to find its ideal weight in factors across technical patterns.  This includes - among other things - optimization testing in combination with other variables but that goes beyond the scope of this piece and is more of a proprietary exercise.

Comments

Popular posts from this blog

Modeling Credit Risk...

     Here's a link to a presentation I gave back in August on modeling credit risk.  If anyone would like a copy of the slides, go ahead and drop me a line... https://www.gotostage.com/channel/39b3bd2dd467480a8200e7468c765143/recording/37684fe4e655449f9b473ec796241567/watch      Timeline of the presentation: Presentation Begins:                                                                0:58:00 Logistic Regression:                                                                1:02:00 Recent Trends in Probabilities of Default:                              1:10:20 Machine Learning:                                                                  1:15:00 Merton Structural Model:                                                        1:19:30 Stochastic Asset Simulation Model:                                        1:27:30 T-Year Merton Model:                

Modeling Black-Litterman; Part 1 - Reverse Optimization

  "The 'radical' of one century is the 'conservative' of the next." -Mark Twain In this series, I'm going to explore some of the advances in portfolio management, construction, and modeling since the advent of Harry Markowitz's Nobel Prize winning Modern Portfolio Theory (MPT) in 1952. MPT's mean-variance optimization approach shaped theoretical asset allocation models for decades after its introduction.  However, the theory failed to become an accepted industry practice, so we'll explore why that is and what advances have developed in recent years to address the shortcomings of the original model. The Problems with Markowitz For the purpose of illustrating the benefits of diversification in a simple two-asset portfolio, Markowitz's model was a useful tool in producing optimal weights at each level of assumed risk to create efficient portfolios.   However, in reality, investment portfolios are complex and composed of large numbers of holdin

Evidence the SPY is Overbought...

 A quick note on the recent market rally here of late.  It's plain to see the markets have been on a tear for the month of June (and going back into May for the QQQ) as the SPY closed today at its highest level in almost fourteen months. If we start to look at the historical levels, however, it appears the SPY may be overbought in the short-run and susceptible to a mean-reverting pattern. Here's the daily chart of the SPY as of today's (6/15/23) close... When looking at the distance between the closing price and the 50-day moving average (illustrated by the yellow bar), we're noticing a large gap... this can be measured by a statistic I developed which I casually refer to as "variance"... or the distance between current prices and their respective moving averages. Historically, throughout the life of the SPY (which debuted in January of '93), the variance over the 50-day moving average has peaked at a reading of 3.20... today's reading posts up at 2.49