Learning the Kalman Filter

Michael Kleder’s “Learning the Kalman Filter” mini tutorial, along with the great feedback it has garnered (73 comments and 67 ratings, averaging 4.5 out of 5 stars),  is one of the most popular downloads from Matlab Central and for good reason.

In his in-file example, Michael steps through a Kalman filter example in which a voltmeter is used to measure the output of a 12-volt automobile battery. The model simulates both randomness in the output of the battery, and error in the voltmeter readings. Then, even without defining an initial state for the true battery voltage, Michael demonstrates that with only 5 lines of code, the Kalman filter can be implemented to predict the true output based on (not-necessarily-accurate) uniformly spaced, measurements:

 

This is a simple but powerful example that shows the utility and potential of Kalman filters. It’s sure to help those who are trepid about delving into the world of Kalman filtering.

Using Volatility to Predict Market Direction

Decomposing Asset Returns

 

We can decompose the returns process Rt as follows:

While the left hand side of the equation is essentially unforecastable, both of the right-hand-side components of returns display persistent dynamics and hence are forecastable. Both the signs of returns and magnitude of returns are conditional mean dependent and hence forecastable, but their product is conditional mean independent and hence unforecastable. This is an example of a nonlinear “common feature” in the sense of Engle and Kozicki (1993).

Although asset returns are essentially unforecastable, the same is not true for asset return signs (i.e. the direction-of-change). As long as expected returns are nonzero, one should expect sign dependence, given the overwhelming evidence of volatility dependence. Even in assets where expected returns are zero, sign dependence may be induced by skewness in the asset returns process.  Hence market timing ability is a very real possibility, depending on the relationship between the mean of the asset returns process and its higher moments. The highly nonlinear nature of the relationship means that conditional sign dependence is not likely to be found by traditional measures such as signs autocorrelations, runs tests or traditional market timing tests. Sign dependence is likely to be strongest at intermediate horizons of 1-3 months, and unlikely to be important at very low or high frequencies. Empirical tests demonstrate that sign dependence is very much present in actual US equity returns, with probabilities of positive returns rising to 65% or higher at various points over the last 20 years. A simple logit regression model captures the essentials of the relationship very successfully.

Now consider the implications of dependence and hence forecastability in the sign of asset returns, or, equivalently, the direction-of-change. It may be possible to develop profitable trading strategies if one can successfully time the market, regardless of whether or not one is able to forecast the returns themselves.  

There is substantial evidence that sign forecasting can often be done successfully. Relevant research on this topic includes Breen, Glosten and Jaganathan (1989), Leitch and Tanner (1991), Wagner, Shellans and Paul (1992), Pesaran and Timmerman (1995), Kuan and Liu (1995), Larsen and Wozniak (10050, Womack (1996), Gencay (1998), Leung Daouk and Chen (1999), Elliott and Ito (1999) White (2000), Pesaran and Timmerman (2000), and Cheung, Chinn and Pascual (2003).

There is also a huge body of empirical research pointing to the conditional dependence and forecastability of asset volatility. Bollerslev, Chou and Kramer (1992) review evidence in the GARCH framework, Ghysels, Harvey and Renault (1996) survey results from stochastic volatility modeling, while Andersen, Bollerslev and Diebold (2003) survey results from realized volatility modeling.

Sign Dynamics Driven By Volatility Dynamics

Let the returns process Rt be Normally distributed with mean m and conditional volatility st.

The probability of a positive return Pr[Rt+1 >0] is given by the Normal CDF F=1-Prob[0,f]


 

 

For a given mean return, m, the probability of a positive return is a function of conditional volatility st. As the conditional volatility increases, the probability of a positive return falls, as illustrated in Figure 1 below with m = 10% and st = 5% and 15%.

In the former case, the probability of a positive return is greater because more of the probability mass lies to the right of the origin. Despite having the same, constant expected return of 10%, the process has a greater chance of generating a positive return in the first case than in the second. Thus volatility dynamics drive sign dynamics.  

 Figure 1

Email me at jkinlay@investment-analytics.com.com for a copy of the complete article.


 

 

 

 

Volatility Metrics

Volatility Estimation

For a very long time analysts were content to accept the standard deviation of returns as the norm for estimating volatility, even though theoretical research and empirical evidence dating from as long ago as 1980 suggested that superior estimators existed.
Part of the reason was that the claimed efficiency improvements of the Parkinson, GarmanKlass and other estimators failed to translate into practice when applied to real data. Or, at least, no one could quite be sure whether such estimators really were superior when applied to empirical data since volatility, the second moment of the returns distribution, is inherently unknowable. You can say for sure what the return on a particular stock in a particular month was simply by taking the log of the ratio of the stock price at the month end and beginning. But the same cannot be said of volatility: the standard deviation of daily returns during the month, often naively assumed to represent the asset volatility, is in fact only an estimate of it.

Realized Volatility

All that began to change around 2000 with the advent of high frequency data and the concept of Realized Volatility developed by Andersen and others (see Andersen, T.G., T. Bollerslev, F.X. Diebold and P. Labys (2000), “The Distribution of Exchange Rate Volatility,” Revised version of NBER Working Paper No. 6961). The researchers showed that, in principle, one could arrive at an estimate of volatility arbitrarily close to its true value by summing the squares of asset returns at sufficiently high frequency. From this point onwards, Realized Volatility became the “gold standard” of volatility estimation, leaving other estimators in the dust.

Except that, in practice, there are often reasons why Realized Volatility may not be the way to go: for example, high frequency data may not be available for the series, or only for a portion of it; and bid-ask bounce can have a substantial impact on the robustness of Realized Volatility estimates. So even where high frequency data is available, it may still make sense to compute alternative volatility estimators. Indeed, now that a “gold standard” estimator of true volatility exists, it is possible to get one’s arms around the question of the relative performance of other estimators. That was my intent in my research paper on Estimating Historical Volatility, in which I compare the performance characteristics of the Parkinson, GarmanKlass and other estimators relative to the realized volatility estimator. The comparison was made on a number of synthetic GBM processes in which the simulated series incorporated non-zero drift, jumps, and stochastic volatility. A further evaluation was made using an actual data series, comprising 5 minute returns on the S&P 500 in the period from Jan 1988 to Dec 2003.

The findings were generally supportive of the claimed efficiency improvements for all of the estimators, which were superior to the classical standard deviation of returns on every criterion in almost every case. However, the evident superiority of all of the estimators, including the Realized Volatility estimator, began to decline for processes with non-zero drift, jumps and stochastic volatility. There was even evidence of significant bias in some of the estimates produced for some of the series, notably by the standard deviation of returns estimator.

The Log Volatility Estimator

Finally, analysis of the results from the study of the empirical data series suggested that there were additional effects in the empirical data, not seen in the simulated processes, that caused estimator efficiency to fall well below theoretical levels. One conjecture is that long memory effects, a hallmark of most empirical volatility processes, played a significant role in that finding.
The bottom line is that, overall, the log-range volatility estimator performs robustly and with superior efficiency to the standard deviation of returns estimator, regardless of the precise characteristics of the underlying process.

Estimating Historical Volatility

Career Opportunity for Quant Traders

Career Opportunity for Quant Traders as Strategy Managers

We are looking for 3-4 traders (or trading teams) to showcase as Strategy Managers on our Algorithmic Trading Platform.  Ideally these would be systematic quant traders, since that is the focus of our fund (although they don’t have to be).  So far the platform offers a total of 10 strategies in equities, options, futures and f/x.  Five of these are run by external Strategy Managers and five are run internally.

The goal is to help Strategy Managers build a track record and gain traction with a potential audience of over 100,000 members.  After a period of 6-12 months we will offer successful managers a position as a PM at Systematic Strategies and offer their strategies in our quantitative hedge fund.  Alternatively, we will assist the manager is raising external capital in order to establish their own fund.

If you are interested in the possibility (or know a talented rising star who might be), details are given below.

Manager Platform

Daytrading Index Futures Arbitrage

Trading with Indices

I have always been an advocate of incorporating index data into one’s trading strategies.  Since they are not tradable, the “market” in index products if often highly inefficient and displays easily identifiable patterns that can be exploited by a trader, or a trading system.  In fact, it is almost trivially easy to design “profitable” index trading systems and I gave a couple of examples in the post below, including a system producing stellar results in the S&P 500 Index.

 

http://jonathankinlay.com/2016/05/trading-with-indices/

Of course such systems are not directly useful.  But traders often use signals from such a system as a filter for an actual trading system.  So, for example, one might look for a correlated signal in the S&P 500 index as a means of filtering trades in the E-Mini futures market or theSPDR S&P 500 ETF (SPY).

Multi-Strategy Trading Systems

This is often as far as traders will take the idea, since it quickly gets a lot more complicated and challenging to build signals generated from an index series into the logic of a strategy designed for related, tradable market. And for that reason, there is a great deal of unexplored potential in using index data in this way.  So, for instance, in the post below I discuss a swing trading system in the S&P500 E-mini futures (ticker: ES) that comprises several sub-systems build on prime-valued time intervals.  This has the benefit of minimizing the overlap between signals from multiple sub-systems, thereby increasing temporal diversification.

http://jonathankinlay.com/2018/07/trading-prime-market-cycles/

A critical point about this system is that each of sub-systems trades the futures market based on data from both the E-mini contract and the S&P 500 cash index.  A signal is generated when the system finds particular types of discrepancy between the cash index and corresponding futures, in a quasi risk-arbitrage.

SSALGOTRADING AD

Arbing the NASDAQ 100 Index Futures

Developing trading systems for the S&P500 E-mini futures market is not that hard.  A much tougher challenge, at least in my experience, is presented by the E-mini NASDAQ-100 futures (ticker: NQ).  This is partly to do with the much smaller tick size and different market microstructure of the NASDAQ futures market. Additionally, the upward drift in equity related products typically favors strategies that are long-only.  Where a system trades both long and short sides of the market, the performance on the latter is usually much inferior.  This can mean that the strategy performs poorly in bear markets such as 2008/09 and, for the tech sector especially, the crash of 2000/2001.  Our goal was to develop a daytrading system that might trade 1-2 times a week, and which would perform as well or better on short trades as on the long side.  This is where NASDAQ 100 index data proved to be especially helpful.  We found that discrepancies between the cash index and futures market gave particularly powerful signals when markets seemed likely to decline.  Using this we were able to create a system that performed exceptionally well during the most challenging market conditions. It is notable that, in the performance results below (for a single futures contract, net of commissions and slippage), short trades contributed the greater proportion of total profits, with a higher overall profit factor and average trade size.

EC

Annual PL

PL

Conclusion: Using Index Data, Or Other Correlated Signals, Often Improves Performance

It is well worthwhile investigating how non-tradable index data can be used in a trading strategy, either as a qualifying signal or, more directly, within the logic of the algorithm itself.  The greater challenge of building such systems means that there are opportunities to be found, even in well-mined areas like index futures markets.  A parallel idea that likewise offers plentiful opportunity is in designing systems that make use of data on multiple time frames, and in correlated markets, for instance in the energy sector.Here one can identify situations in which, under certain conditions, one market has a tendency to lead another, a phenomenon referred to as Granger Causality.

 

Volatility Trading Styles

The VIX Surge of Feb 2018

Volatility trading has become a popular niche in investing circles over the last several years.  It is easy to understand why:  with yields at record lows it has been challenging to find an alternative to equities that offers a respectable return.  Volatility, however, continues to be volatile (which is a good thing in this context) and the steepness of the volatility curve has offered investors attractive returns by means of the volatility carry trade.  In this type of volatility trading the long end of the vol curve is sold, often using longer dated futures in the CBOE VIX Index, for example.  The idea is that profits are generated as the contract moves towards expiration, “riding down” the volatility curve as it does so.  This is a variant of the ever-popular “riding down the yield curve” strategy, a staple of fixed income traders for many decades.  The only question here is what to use to hedge the short volatility exposure – highly correlated S&P500 futures are a popular choice, but the resulting portfolio is exposed to significant basis risk.  Besides, when the volatility curve flatten and inverts, as it did in spectacular fashion in February, the transition tends to happen very quickly, producing a substantial losses on the portfolio.  These may be temporary, if the volatility spike is small or short-lived, but as traders and investors discovered in the February drama, neither of these two desirable outcomes is guaranteed.  Indeed as I pointed out in an earlier post this turned out to be the largest ever two-day volatility surge in history.  The results for many hedge funds, especially in the quant sector were devastating, with several showing high single digit or double-digit losses for the month.

VIX_Spike_1

 

Over time, investors have become more familiar with the volatility space and have learned to be wary of strategies like volatility carry or option selling, where the returns look superficially attractive, until a market event occurs.  So what alternative approaches are available?

An Aggressive Approach to Volatility Trading

In my blog post Riders on the Storm  I described one such approach:  the Option Trader strategy on our Algo Trading Platform made a massive gain of 27% for the month of February and as a result strategy performance is now running at over 55% for 2018 YTD, while maintaining a Sharpe Ratio of 2.23.

Option Trader

 

The challenge with this style of volatility trading is that it requires a trader (or trading system) with a very strong stomach and an investor astute enough to realize that sizable drawdowns are in a sense “baked in” for this trading strategy and should be expected from time to time.  But traders are often temperamentally unsuited to this style of trading – many react by heading for the hills and liquidating positions at the first sign of trouble; and the great majority of investors are likewise unable to withstand substantial drawdowns, even if the eventual outcome is beneficial.

SSALGOTRADING AD

The Market Timing Approach

So what alternatives are there?  One way of dealing with the problem of volatility spikes is simply to try to avoid them.  That means developing a strategy logic that step aside altogether when there is a serious risk of an impending volatility surge.  Market timing is easy to describe, but very hard to implement successfully in practice.  The VIX Swing Trader strategy on the Systematic Algotrading platform attempts to do just that, only trading when it judges it safe to do so. So, for example, it completely side-stepped the volatility debacle in August 2015, ending the month up +0.74%.  The strategy managed to do the same in February this year, finishing ahead +1.90%, a pretty creditable performance given how volatility funds performed in general.  One helpful characteristic of the strategy is that it trades the less-volatile mid-section of the volatility curve, in the form of the VelocityShares Daily Inverse VIX MT ETN (ZIV).  This ensures that the P&L swings are much less dramatic than for strategies exposed to the front end of the curve, as most volatility strategies are.

VIX Swing Trader1 VIX Swing Trader2

A potential weakness of the strategy is that it will often miss great profit opportunities altogether, since its primary focus is to keep investors out of trouble. Allied to this, the system may trade only a handful of times each month.  Indeed, if you look at the track record above you find find months in which the strategy made no trades at all. From experience, investors are almost as bad at sitting on their hands as they are at taking losses:  patience is not a highly regarded virtue in the investing community these days.  But if you are a cautious, patient investor looking for a source of uncorrelated alpha, this strategy may be a good choice. On the other hand, if you are looking for high returns and are willing to take the associated risks, there are choices better suited to your goals.

The Hedging Approach to Volatility Trading

A “middle ground” is taken in our Hedged Volatility strategy. Like the VIX Swing Trader this strategy trades VIX ETFs/ETNs, but it does so across the maturity table. What distinguishes this strategy from the others is its use of long call options in volatility products like the iPath S&P 500 VIX ST Futures ETN (VXX) to hedge the short volatility exposure in other ETFs in the portfolio.  This enables the strategy to trade much more frequently, across a wider range of ETF products and maturities, with the security of knowing that the tail risk in the portfolio is protected.  Consequently, since live trading began in 2016, the strategy has chalked up returns of over 53% per year, with a Sharpe Ratio of 2 and Sortino Ratio above 3.  Don’t be confused by the low % of trades that are profitable:  the great majority of these loss-making “trades” are in fact hedges, which one would expect to be losers, as most long options trades are.  What matters is the overall performance of the strategy.

Hedged Volatility

All of these strategies are available on our Systematic Algotrading Platform, which offers investors the opportunity to trade the strategies in their own brokerage account for a monthly subscription fee.

The Multi-Strategy Approach

The approach taken by the Systematic Volatility Strategy in our Systematic Strategies hedge fund again seeks to steer a middle course between risk and return.  It does so by using a meta-strategy approach that dynamically adjusts the style of strategy deployed as market conditions change.  Rather than using options (the strategy’s mandate includes only ETFs) the strategy uses leveraged ETFs to provide tail risk protection in the portfolio. The strategy has produced an average annual compound return of 38.54% since live trading began in 2015, with a Sharpe Ratio of 3.15:

Systematic Volatility Strategy 1 Page Tear Sheet June 2018

 

A more detailed explanation of how leveraged ETFs can be used in volatility trading strategies is given in an earlier post:

http://jonathankinlay.com/2015/05/investing-leveraged-etfs-theory-practice/

 

Conclusion:  Choosing the Investment Style that’s Right for You

There are different styles of volatility trading and the investor should consider carefully which best suits his own investment temperament.  For the “high risk” investor seeking the greatest profit the Option Trader strategy in an excellent choice, producing returns of +176% per year since live trading began in 2016.   At the other end of the spectrum, the VIX Swing trader is suitable for an investor with a cautious trading style, who is willing to wait for the right opportunities, i.e. ones that are most likely to be profitable.  For investors seeking to capitalize on opportunities in the volatility space, but who are concerned about the tail risk arising from major market corrections, the Hedge Volatility strategy offers a better choice.  Finally, for investors able to invest $250,000 or more, a hedge fund investment in our Systematic Volatility strategy offers the highest risk-adjusted rate of return.

Understanding Stock Price Range Forecasts

Stock Price Range Forecasts

Range forecasts are produced by estimating the parameters of a Geometric Brownian Motion process from historical data and using the model to project a large number of sample paths for the stock price over the coming month and year.

For example, this is a range forecast for Netflix, Inc. (NFLX) as at 7/27/2018 when the price of the stock stood at $355.21:

$NFLX

As you can see, the great majority of the simulated price paths trend upwards.  This is typical for most stocks on account of their upward drift, a tendency to move higher over time.  The statistical table below the chart tells you that in 50% of cases the ending stock price 1 month from the date of forecast was in the range $352.15 to $402.49. Similarly, around 50% of the time the price of the stock in one year’s time were found to be in the range $565.01 to $896.69.  Notice that the end points of the one-year range far exceed the end points of the one-month range forecast – again this is a feature of the upward drift in stocks.

If you want much greater certainty about the outcome, you should look at the 95% ranges.  So, for NFLX, the one month 95% range was projected to be $310.06 to $457.13.  Here, only 1 in 20 of the simulated price paths produced one month forecasts that were higher than $457.13, or lower than $310.06.

Notice that the spread of the one month and one year 95% ranges is much larger than of the corresponding 50% ranges.  This demonstrates the fundamental tradeoff between “accuracy” (the spread of the range) and “certainty”, (the probability of the outcome being with the projected range).  If you want greater certainty of the outcome, you have to allow for a broader span of possibilities, i.e. a wider range.

SSALGOTRADING AD

Uses of Range Forecasts

Most stock analysts tend to produce single price “targets”, rather than a range – these are known as “point forecasts” by econometricians.  So what’s the thinking behind range forecasts?

Range forecasts are arguably more useful than simple point forecasts.  Point forecasts make no guarantee as to the likelihood of the projected price – the only thing we know for sure about such forecasts is that they will be wrong!  Is the forecast target price optimistic or pessimistic?  We have no way to tell.

With range forecasts the situation is very different.  We can talk about the likelihood of a stock being within a specified range at a certain point in time.  If we want to provide a pessimistic forecast for the price in NFLX in one month’s time, for example, we could quote the value $352.15, the lower end of the 50% range forecast.  If we wanted to provide a very pessimistic forecast, one that is very likely to be exceeded, we could quote the bottom of the 95% range: $310.06.

The range also tells us about the future growth prospects for the firm.  So, for example, with NFLX, based on past performance, it is highly likely that the stock price will grow at a rate of more than 2.4% and, optimistically, might increase by almost 3x in the coming year (see the growth rates calculated for the 95% range values).

One specific use of range forecasts is in options trading.  If a trader is bullish on NFLX, instead of buying the stock, he might instead choose to sell one-month put options with a strike price below $352 (the lower end of the 50% one-month range).  If the trader wanted to be more conservative, he might look for put options struck at around $310, the bottom of the 95% range.  A more complex strategy might be to buy calls struck near the top of the 50% range, and sell more calls struck near the top of the 95% range (the theory being that the stock is quite likely to exceed the top of the 50% one-month range, but much less likely to reach the high end of the 95% range).

Limitations of Range Forecasts

Range forecasts are produced by using historical data to estimate the parameters of a particular type of mathematical model, known as a Geometric Brownian Motion process.  For those who are interested in the mechanics of how the forecasts are produced, I have summarized the relevant background theory below.

While there are grounds for challenging the use of such models in this context, it has to be acknowledged that the GBM process is one of the most successful mathematical models in finance today.  The problem lies not so much in the model, as in one of the key assumptions underpinning the approach:  specifically, that the characteristics of the stock process will remain as they are today (and as they have been in the historical past).  This assumption is manifestly untenable when applied to many stocks:  a company that was a high-growth $100M start-up is unlikely to demonstrate the same  rate of growth ten years later, as a $10Bn enterprise.  A company like Amazon that started out as an online book seller has fundamentally different characteristics today, as an online retail empire.  In such cases, forecasts about the future stock price – whether point or range forecasts – based on outdated historical informations are likely to be wrong, sometimes wildly so.

Having said that, there are a great many companies that have evolved to a point of relative stability over a period of perhaps several decades: for example, a company like Caterpillar Inc. (CAT).  In such cases the parameters of the GBM process underpinning the stock price are unlikely to fluctuate widely in the short term, so range forecasts are consequently more likely to be useful.

Another factor to consider are quarterly earnings reports, which can influence stock prices considerably in the short term, and corporate actions (mergers, takeovers, etc) that can change the long term characteristics of a firm and its stock price process in a fundamental way.  In these situations any forecast methodology is likely to unreliable, at least for a while, until the event has passed.  It’s best to avoid taking positions based on projections from historical data at times like this.

Review of Background Theory

 

GBM1

GBM2 GBM3 GBM4 GBM5

Riders on the Storm

The Worst Volatility Scare for Years

February 2018 was an insane month for stocks, wrote CNN:

A profound inflation scare. Not one but two 1,000-point plunges for the Dow. And a powerful comeback that almost went straight back up.

The CNN story-line continues:

The Dow plummeted more than 3,200 points, or 12%, in just two weeks. Then stocks raced back to life, at one point recovering about three-quarters of those losses.

Fittingly, February ended with more drama. The Dow tumbled 680 points during the month’s final two days, leaving it down about 1,600 points from the record high in late January.

The headline in the Financial Times was a little more nuanced, focusing on the impact of the market turmoil on quant hedge funds:

 

FT

 

Quant Funds Get Trashed

The FT reported:

Computer-driven, trend-following hedge funds are heading for their worst month in nearly 17 years after getting whipsawed when the stock market’s steady soar abruptly reversed into one of the quickest corrections in history earlier in February.

The carnage amongst hedge funds was widespread, according to the article:

Société Générale’s CTA index is down 5.55 per cent this month, even after the recent market rebound, making it the worst period for these systematic hedge funds since November 2001.
Man AHL’s $1.1bn Diversified fund lost almost 10 per cent in the month to February 16, while the London investment firm’s AHL Evolution and Alpha funds were down about 4-5 per cent over the same period. The flagship funds of GAM’s Cantab Capital, Systematica and Winton lost 9.5 per cent, 7.2 per cent and 4.6 per cent* respectively between the start of the month and February 16. Aspect Capital’s Diversified Fund dropped 9.5 per cent in the month to February 20, while a trend-following fund run by Lynx Asset Management slumped 12.7 per cent. A leveraged version of the same fund tumbled 18.8 per cent. One of the other big victims is Roy Niederhoffer, whose fund lost 21.1 per cent in the month to February 20.

Painful reading, indeed.

 

Traders conditioned to a state of somnambulance were shocked by the ferocity of the volatility spike, as the CBOE VIX index soared by over 200% in a single day, reaching a high of over 38 on Feb 5th:

 

VIX Index

 

Indeed, this turned out to be the largest ever two-day increase in the history of the index:

VIX_Spike_1

This Quant Strategy Made 27% In February Alone

So, for a quant-driven options strategy that is typically a premium seller, February must surely have been a disaster, if not a total wipe-out.  Not quite.  On the contrary, our Option Trader strategy made a massive gain of 27% for the month.  As a result strategy performance is now running at over 55% for 2018 YTD, while maintaining a Sharpe Ratio of 2.23.

Option Trader

You can tell that the strategy has a tendency to collect option premiums, not only because the strategy description says as much, but also from the observation that over 90% of strategy trades have been profitable – one of the defining characteristics of volatility strategies that are short-Vega, long-Theta.  The theory is that such strategies make money most of the time, but then give it all back (and more) when volatility inevitably spikes.  While that is generally true, in my experience, that clearly didn’t occur here.  So what’s the story?

One of the advantages of our Algo Trading Platform is that it not only reports in detail the live performance of our strategies, but it also reveals the actual trades on the site (typically delayed by 24-72 hours).  A review of the trades made by the Option Trader strategy from the end of January though early February indicates a strongly bullish bias, with short put trades in stocks such as Netflix, Inc. (NFLX), Shopify Inc. (SHOP), The Goldman Sachs Group, Inc. (GS) and Facebook, Inc. (FB), coupled with short call trades in VIX ETF products such as ProShares Ultra VIX Short-Term Futures (UVXY) and iPath S&P 500 VIX ST Futures ETN (VXX).  As volatility began to spike on 2/5, more calls were sold at increasingly fat premiums in several of the VIX Index ETFs.  These short volatility positions were later hedged with long trades in the underlying ETFs and, over time, both the hedges and the original option sales proved highly profitable. In other words, the extremely high levels of volatility enabled the strategy to profit on both legs of the trade, a highly unusual occurrence.  Meanwhile, while it was hedging its bets in the VIX ETF option trades, the strategy was becoming increasingly aggressive in the single stocks sector, taking outright long positions in Baidu, Inc. (BIDU), Align Technology, Inc. (ALGN), Netflix, Inc. (NFLX) and others, just as they became trading off their lows in the second week of the month.  By around Feb 12th the strategy recognized that the volatility shock had begun to subside and took advantage of the inflated option premia, selling puts across the board, in particular in the technology (Tesla, Inc. (TSLA), NVIDIA Corporation (NVDA)) and retail sectors (GrubHub Inc. (GRUB), Alibaba Group Holding Limited (BABA)) that had suffered especially heavy declines.  Many of these trades were closed at a substantial profit within a span of just a few days as the market stabilized and volatility subsided.  The strategy broadened the scope of its option selling as the month progressed, initially recovering the entirety of the drawdown it had initially suffered, before going on to register substantial profits on almost every trade.

To summarize:

  1.  Like many other market players, the Volatility Trader strategy was initially caught on the wrong side of the volatility spike and suffered a significant drawdown.
  2. Instead of liquidating positions, the strategy began hedging aggressively in sectors holding the greatest danger – VIX ETFs, in particular.  These trades ultimately proved profitable on both option and hedge legs as the market turned around and volatility collapsed.
  3. As soon as volatility showed signed of easing, the strategy began making aggressive bets on market stabilization and recovery, taking long positions in some of the most beaten-down stocks and selling puts across the board to capture inflated option premia.

Lesson Learned:  Aggressive Defense is the best Options Strategy in a Volatile Market

If there is one lesson above all others to be learned from this case study it is this:  that a period of market turmoil is a time of opportunity for option traders, but only if they play aggressively, both in defense and offense.  Many traders run scared at times like this and liquidate positions, taking heavy losses in the process that can prove impossible to recover from if, as here, the drawdown is severe.  This study shows that by holding one’s nerve and hedging rather than liquidating loss-making positions and then moving aggressively to capitalize on inflated option prices a trader can not only weather the storm but, as in this case, produce exceptional returns.

The key take-away is this: in order to play aggressively you have to have sufficient reserves in the tank to enable you to hold positions rather than liquidate them and, later on, to transition to selling expensive option premiums.  The mistake many option traders make is to trade too close to the line in term of margin limits, resulting  in a forced liquidation of positions that would otherwise have been profitable.

You can trade the Option Trader strategy live in your own brokerage account – go here for details.

 

 

Trading Prime Market Cycles

Magicicada tredecassini NC XIX male dorsal trim.jpg

Magicicada is the genus of the 13-year and 17-year periodical cicadas of eastern North America. Magicicada species spend most of their 13- and 17-year lives underground feeding on xylem fluids from the roots of deciduous forest trees in the eastern United States.  After 13 or 17 years, mature cicada nymphs emerge in the springtime at any given locality, synchronously and in tremendous numbers.  Within two months of the original emergence, the lifecycle is complete, the eggs have been laid, and the adult cicadas are gone for another 13 or 17 years.

The emergence period of large prime numbers (13 and 17 years) has been hypothesized to be a predator avoidance strategy adopted to eliminate the possibility of potential predators receiving periodic population boosts by synchronizing their own generations to divisors of the cicada emergence period. If, for example, the cycle length was, say, 12 years, then the species would be exposed to predators regenerating over cycles of 2, 3, 4, or 6 years.  Limiting their cycle to a large prime number reduces the variety of predators the species is likely to face.

SSALGOTRADING AD

Prime Cycles in Trading Strategies

What has any of this to do with trading?  When building a strategy in a particular market we might start by creating a model that works reasonably well on, say, 5-minute bars. Then, in order to improve the risk-adjusted returns we might try create a second sub-strategy on a different frequency.  This will hopefully result in a new series of signals, an increase in the number of trades, and corresponding improvement in the risk-adjusted returns of the overall strategy.  This phenomenon is referred to as temporal diversification.

What time frequency should we select for our second sub-strategy?  There are many factors to consider, of course, but one of them is that we would like to see as few duplicate signals between the two sub-strategies.  Otherwise we will simply be replicating trades, rather than reducing the overall level of strategy risk through temporal diversification.  The best way to minimize the overlap in signals generated by multiple sub-strategies is to use prime number bar frequencies (5 minute, 7 minute, 11 minute, etc).

S&P500 Swing Trading Strategy

An example of this approach is our EMini Swing Trading strategy which we operate on our Systematic Algotrading Platform.  This strategy is actually a combination of several different sub-strategies that operate on 5-minute, 11-minute, 17-minute and 31-minute bars.  Each strategy focuses on a different set of characteristics of the S&P 500 futures market, but the key point here is that the trading signals very rarely overlap and indeed several of the sub-strategies have a low correlation.

correl

 

The resulting increase in trade frequency and temporal diversification produces very attractive risk-adjusted performance: after an exceptional year in 2017 which saw a 78.58% net return, the strategy is already at  +60% YTD in 2018 and showing no sign of slowing down.

Investors can auto-trade the E-Mini Swing Trading strategy and many other strategies in their own account – see the Leaderboard for more details.

Perf1Monthly returns

Momentum Strategies

A few weeks ago I wrote an extensive post on a simple momentum strategy in E-Mini Futures. The basic idea is to buy the S&P500 E-Mini futures when the contract makes a new intraday high. This is subject to the qualification that the Internal Bar Strength fall below a selected threshold level. In order words, after a period of short-term weakness – indicated by the low reading of the Internal Bar Strength – we buy when the futures recover to make a new intraday high, suggesting continued forward momentum.

IBS is quite a useful trading indicator, which you can learn more about in the blog post:

A characteristic of momentum strategies is that they can often be applied successfully across several markets, usually with simple tweaks to the strategy parameters. As a case in point, take our Tech Momentum strategy, listed on the Systematic Strategies Algotrading platform which you can find out more about here:

This swing trading strategy applies similar momentum concepts to exploits long and short momentum effects in technology sector ETFs, focusing on the PROSHARES ULTRAPRO QQQ (TQQQ) and PROSHARES ULTRAPRO SHORT QQQ (SQQQ). Does it work? The results speak for themselves:

In four years of live trading the strategy has produced a compound annual return of 48.9%, with a Sharpe Ratio of 1.78 and Sortino Ratio of 2.98. 2018 is proving to be a banner year for the strategy, which is up by more than 48% YTD.

A very attractive feature of this momentum approach is that it is almost completely uncorrelated with the market and with a beta of just over 1 is hardly more risky than the market portfolio.

You can find out more about the Tech Momentum and other momentum strategies and how to trade them live in your own account on our Strategy Leaderboard: