November 30th, 2014
By Ernest Chan.

Financial engineers are accustomed to borrowing techniques from scientists in other fields (e.g. genetic algorithms), but rarely does the borrowing go the other way. It is therefore surprising to hear about this
paper on a possible mechanism for evolution due to natural selection which is inspired by universal capital allocation algorithms.
A capital allocation algorithm attempts to optimize the allocation of capital to stocks in a portfolio. An allocation algorithm is calleduniversal if it results in a net worth that is “similar” to that generated by the best constant-rebalanced portfolio with fixed weightings over time (denoted CBAL* below), chosen in hindsight. “Similar” here means that the net worth does not diverge exponentially. (For a precise definition, see this very readable paper by Borodin, et al. H/t: Vladimir P.)
Previously, I know only of one such universal trading algorithm – the Universal Portfolio invented by Thomas Cover, which I have described before. But here is another one that has proven to be universal: the exceedingly simple EG algorithm.
The EG (“Exponentiated Gradient”) algorithm is an example of a capital allocation rule using “multiplicative updates”: the new capital allocated to a stock is proportional to its current capital multiplied by a factor. This factor is an exponential function of the return of the stock in the last period. This algorithm is both greedy and conservative: greedy because it always allocates more capital to the stock that did well most recently; conservative because there is a penalty for changing the allocation too drastically from one period to the next. This multiplicative update rule is the one proposed as a model for evolution by natural selection.
The computational advantage of EG over the Universal Portfolio is obvious: the latter requires a weighted average over all possible allocations at every step, while the former needs only know the allocation and returns for the most recent period. But does this EG algorithm actually generate good returns in practice? I tested it two ways:
1) Allocate between cash (with 2% per annum interest) and SPY.
2) Allocate among SP500 stocks.
In both cases, the only free parameter of the model is a number called the “learning rate” η, which determines how fast the allocation can change from one period to the next. It is generally found that η=0.01 is optimal, which we adopted. Also, we disallow short positions in this study.
The benchmarks for comparison for 1) are, using the notations of the Borodin paper,
a) the buy-and-hold SPY portfolio BAH, and
b) the best constant-rebalanced portfolio with fixed allocations in hindsight CBAL*.
The benchmarks for comparison for 2) are
a) a constant rebalanced portfolio of SP500 stocks with equal allocations U-CBAL,
b) a portfolio with 100% allocation to the best stock chosen in hindsight BEST1, and
c) CBAL*.
To find CBAL* for a SP500 portfolio, I used Matlab Optimization Toolbox’s constrained optimization function fmincon.
There is also the issue of SP500 index reconstitution. It is complicated to handle the addition and deletion of stocks in the index within a constrained optimization function. So I opted for the shortcut of using a subset of stocks that were in SP500 from 2007 to 2013, tolerating the presence of surivorship bias. There are only 346 such stocks.
The result for 1) (cash vs SPY) is that the CAGR (compound annualized growth rate) of EG is slightly lower than BAH (4% vs 5%). It turns out that BAH and CBAL* are the same: it was best to allocate 100% to SPY during 2007-2013, an unsurprising recommendation in hindsight.
The result for 2) is that the CAGR of EG is higher than the equal-weight portfolio (0.5% vs 0.2%). But both these numbers are much lower than that of BEST1 (39.58%), which is almost the same as that of CBAL* (39.92%). (Can you guess which stock in the current SP500 generated the highest CAGR? The answer, to be revealed below*, will surprise you!)
We were promised that the EG algorithm will perform “similarly” to CBAL*, so why does it underperform so miserably? Remember that similarity here just means that the divergence is sub-exponential: but even a polynomial divergence can in practice be substantial! This seems to be a universal problem with universal algorithms of asset allocation: I have never found any that actually achieves significant returns in the short span of a few years. Maybe we will find more interesting results with higher frequency data.
So given the underwhelming performance of EG, why am I writing about this algorithm, aside from its interesting connection with biological evolution? That’s because it serves as a setup for another, non-universal, portfolio allocation scheme, as well as a way to optimize parameters for trading strategies in general: both topics for another time.
Comments Off on Another “universal” capital allocation algorithm
October 8th, 2013
Posted by Ernest Chan: By Azouz Gmach.
VIX Futures & Options are one of the most actively traded index derivatives series on the Chicago Board Options Exchange (CBOE). These derivatives are written on S&P 500 volatility index and their popularity has made volatility a widely accepted asset class for
trading, diversifying and hedging instrument since their launch. VIX Futures started trading on March 26
th, 2004 on CFE (CBOE Future Exchange) and VIX Options were introduced on Feb 24
th, 2006.
VIX Futures & Options
VIX (Volatility Index) or the ‘Fear Index’ is based on the S&P 500 options volatility. Spot VIX can be defined as square root of 30 day variance swap of S&P 500 index (SPX) or in simple terms it is the 30-day average implied volatility of S&P 500 index options. The VIX F&O are based on this spot VIX and is similar to the equity indexes in general modus operandi. But structurally they have far more differences than similarities. While, in case of equity indices (for example SPX), the index is a weighted average of the components, in case of the VIX it is sum of squares of the components. This non-linear relationship makes the spot VIX non-tradable but at the same time the derivatives of spot VIX are tradable. This can be better understood with the analogy of Interest Rate Derivatives. The derivatives based on the interest rates are traded worldwide but the underlying asset: interest rate itself cannot be traded.
The different relation between the VIX derivatives and the underlying VIX makes it unique in the sense that the overall behavior of the instruments and their pricing is quite different from the equity index derivatives. This also makes the pricing of VIX F&O a complicated process. A proper statistical approach incorporating the various aspects like the strength of trend, mean reversion and volatility etc. is needed for modeling the pricing and behavior of VIX derivatives.
Research on Pricing Models
There has been a lot of research in deriving models for the VIX F&O pricing based on different approaches. These models have their own merits and demerits and it becomes a tough decision to decide on the most optimum model. In this regards, I find the work of
Mr. Qunfang Bao titled
‘Mean-Reverting Logarithmic Modeling of VIX’ quite interesting. In his research, Bao not only revisits the existing models and work by other prominent researchers but also comes out with suggestive models after a careful observation of the limitations of the already proposedmodels. The basic thesis of Bao’s work involves mean-reverting logarithmic dynamics as an essential aspect of Spot VIX.
VIX F&O contracts don’t necessarily track the underlying in the same way in which equity futures track their indices. VIX Futures have a dynamic relationship with the VIX index and do not exactly follow its index. This correlation is weaker and evolves over time. Close to expiration, the correlation improves and the futures might move in sync with the index. On the other hand VIX Options are more related to the futures and can be priced off the VIX futures in a much better way than the VIX index itself.
Pricing Models
As a volatility index, VIX shares the properties of mean reversion, large upward jumps & stochastic volatility (aka stochastic vol-of-vol). A good model is expected to take into consideration, most of these factors.
There are roughly two categories of approaches for VIX modeling. One is the Consistent approach and the other being Standalone approach.
I. Consistent Approach: – This is the pure diffusionmodel wherein the inherent relationship between S&P 500 & VIX is used in deriving the expression for spot VIX which by definition is square root of forward realized variance of SPX.
II. Standalone Approach: – In this approach, the VIX dynamics are directly specified and thus the VIX derivatives can be priced in a much simpler way. This approach only focuses on pricing derivatives written on VIX index without considering SPX option.
Bao in his paper mentions that the standalone approach is comparatively better and simpler than the consistent approach.
MRLR model
The most widely proposed model under the standalone approach is MRLR (Mean Reverting Logarithmic Model) model which assumes that the spot VIX follows a Geometric Brownian motion process. The MRLR model fits well for VIX Future pricing but appears to be unsuited for the VIX Options pricing because of the fact that this model generates no skew for VIX option. In contrast, this model is a good model for VIX futures.
MRLRJ model
Since the MRLR model is unable to produce implied volatility skew for VIX options, Bao further tries to modify the MRLR model by adding jump into the mean reverting logarithmic dynamics obtaining the Mean Reverting Logarithmic Jump Model (MRLRJ). By adding upward jump into spot VIX, this model is able to capture the positive skew observed in VIX options market.
MRLRSV model
Another way in which the implied volatility skew can be produced for VIX Options is by including stochastic volatility into the spot VIX dynamics. This model of Mean Reverting Logarithmic model with stochastic volatility (MRLRSV) is based on the aforesaid process of skew appropriation.
Both, MRLRJ and MRLRSV models perform equally well in appropriating positive skew observed in case of VIX options.
MRLRSVJ model
Bao further combines the MRLRJ and MRLRSV models together to form MRLRSVJ model. He mentions that this combined model becomes somewhat complicated and in return adds little value to the MRLRJ or MRLRSV models. Also extra parameters are needed to be estimated in case of MRLRSVJ model.
MRLRJ & MRLRSV models serve better than the other modelsthat have been proposed for pricing the VIX F&O. Bao in his paper, additionally derives and calibrates the mathematical expressions for the models he proposes and derives the hedging strategies based on these models as well. Quantifying the Volatility skew has been an active area of interest for researchers and thisresearch paper addresses the same in a very scientific way, keeping in view the convexity adjustments, future correlation and numerical analysis of the models etc. While further validation and back testing of the models may be required, but Bao’s work definitely answers a lot of anomalous features of the VIX and its derivatives.
—
Azouz Gmach works for QuantShare, a technical/fundamental analysis software.
===
My online Mean Reversion Strategies workshop will be offered in September. Please visit epchan.com/my-workshops for registration details.
Also, I will be teaching a new course Millisecond Frequency Trading (MFT) in London
http://epchan.blogspot.com/2013/08/guest-post-qualitative-review-of-vix-f.html
No Comments "
July 25th, 2013
By Ernest Chan.
In my
book I devoted considerable attention to the phenomenon of “
Momentum Crashes” that professor Kent Daniel discovered. This refers to the fact that momentum strategies generally work very poorly in the immediate aftermath of a financial crisis. This phenomenon apparently spans many asset classes, and has been around since the Great Depression. Sometimes it lasted multiple decades, and at other times these strategies recovered during the lifetime of a momentum trader. So how have momentum strategies fared after the 2008 financial crisis, and have they recovered?
First, let’s look at the
Diversified Trends Indicator (formerly the S&P DTI index), which is a fairly generic trend-following strategy applied to futures. Here are the index values since inception (click to enlarge):
and here are the values for 2013:
After suffering relentless decline since 2009, it has finally shown positive returns YTD!
Now look at a momentum strategy on the soybean futures (ZS) that I have been working on. Here are the cumulative returns from 2009 to 2011 June:
and here the cumulative returns since then:
The difference is stark!
Despite evidences that indeed momentum strategies have enjoyed a general recovery, we must play the part of skeptical financial scientists and look for alternative theories. If any reader can tell us an alternative, plausible explanation why ZS should start to display trending behavior since July 2011, but not before, please post that in the comment area. The prize for the best explanation: I will disclose in private more detailsabout this strategy to that reader. (To claim the prize, please include the last 4 digit of your phone number in the post for identification purpose.)
===
No Comments "
June 14th, 2013
By Ernest Chan.
Backtesting trading strategies necessarily involves a very limited amount of historical data. For example, I seldom test strategies with data older than 2007. Gathering longer history may not improve predictive accuracy since the market structure may have changed substantially. Given such scant data, it is reasonable to question whether the good backtest results (e.g. a high annualized return R) we may have obtained is just due to luck. Many academic researchers try to address this issue by running their published strategies through standard statistical hypothesis testing.
You know the drill: the researchers first come up with a supposedly excellent strategy. In a display of false modesty, they then suggest that perhaps a null hypothesis can produce the same good return R. The null hypothesis may be constructed by running the original strategy through some random simulated historical data, or by randomizing the tradeentry dates. The researchers then proceed to show that such random constructions are highly unlikely to generate a return equal to or better than R. Thus the null hypothesis is rejected, and thereby impressing you that the strategy is somehow sound.
As statistical practitioners in fields outside of finance will tell you, this whole procedure is quite meaningless and often misleading.
The probabilistic syllogism of hypothesis testing has the same structure as the following simple example (devised by Jeff Gill in his paper “The Insignificance of Null Hypothesis Significance Testing”):
1) If a person is an American then it is highly unlikely she is a member of Congress.
2) The person is a member of Congress.
3) Therefore it is highly unlikely she is an American.
The absurdity of hypothesis testing should be clear. In mathematical terms, the probability we are really interested in is the conditional probability that the null hypothesis is true given an observed high return R: P(H0|R). But instead, the hypothesis test merely gives us the conditional probability of a return R given that the null hypothesis is true: P(R|H0). These two conditional probabilities are seldom equal.
But even if we can somehow compute P(H0|R), it is still of very little use, since there are an infinite number of potential H0. Just because you have knocked down one particular straw man doesn’t say much about your original strategy.
If hypothesis testing is both meaningless and misleading, why do financial researchers continue to peddle it? Mainly because this is de rigueur to get published. But it does serve one useful purpose for our own private trading research. Even though a rejection of the null hypothesis in no way shows that the strategy is sound, a failure to reject the null hypothesis will be far more interesting.
(For other references on criticism of hypothesis testing, read Nate Silver’s bestseller “
The Signal and The Noise“. Silver is of course the statistician who correctly predicted the winner of all 50 states + D.C. in the 2012 US presidential election. The book is highly relevant to anyone who makes a living predicting the future. In particular, it tells the story of one Bob Voulgaris who makes $1-4M per annum betting on NBA outcomes. It makes me wonder whether I should quit making bets on financial markets and move on to sports.)
No Comments "
June 2nd, 2013
By Ernest Chan.
A
reader pointed out an interesting
paper that suggests using option volatility smirk as a factor to rank stocks. Volatility smirk is the difference between the implied volatilities of the OTM put option and the ATM call option. (Of course, there are numerous OTM and ATM put and call options. You can refer to the original paper for a precise definition.) The idea is that informed traders (
i.e. those traders who have a superior ability in predicting the next earnings numbers for thestock) will predominately buy OTM puts when they think the futureearnings reports will be bad, thus driving up the price of those puts and their corresponding implied volatilities relative to the more liquid ATM calls. If we use this volatility smirk as a factor to rank stocks, we can form a long portfolio consisting of stocks in the bottom quintile, and a short portfolio with stocks in the top quintile. If we update this long-short portfolio weekly with the latest volatility smirk numbers, it is reported that we will enjoy an annualized excess return of 9.2%.
As a standalone factor, this 9.2% return may not seem terribly exciting, especially since transaction costs have not been accounted for. However, the beauty of factor models is that you can combine an arbitrary number of factors, and though each factor may be weak, the combined model could be highly predictive. A search of the keyword “factor” on my blog will reveal that I have talked about many different factors applicable to different asset classes in the past. For stocks in particular, there is a short term factor as simple as the previous 1-day return that worked wonders. Joel Greenblatt’s famous “Little Book that Beats the Market” used 2 factors to rank stocks (return-on-capital and earnings yield) and generated an APR of 30.8%.
The question, however, is how we should combine all these different factors. Some factor model aficionados will no doubt propose a linear regression fit, with future return as the dependent variable and all these factors as independent variables. However, my experience with this method has been unrelentingly poor: I have witnessed millions of dollars lost by various banks and funds using this method. In fact, I think the only sensible way to combine them is to simply add them together with equal weights. That is, if you have 10 factors, simply form 10 long-short portfolios each based on one factor, and combine these portfolios with equal capital. As Daniel Kahneman said, “Formulas that assign equal weights to all the predictors are often superior, because they are not affected by accidents of sampling”.
No Comments "
May 11th, 2013
By Ernest Chan.
I have long been partial to
linear strategies due to their simplicity and relative immunity to overfitting. They can be used quite easily to profit from mean-reversion. However, there is a serious problem: they are quite
fragile,
i.e. vulnerable to tail risks. As we move from mean-reverting strategies to momentum strategies, we immediately introduce a nonlinearity (stop losses), but simultaneously remove certain tail risks (except during times when markets are closed). But if we want to enjoy anti-fragility and are going to introduce nonlinearities anyway, we might as well go full-monty, and consider options strategies. (It is no surprise that Taleb was an options trader.)It is easy to see that options strategies are nonlinear, since options payoff curves (value of an option as function of underlying stock price) are plainly nonlinear. I personally have resisted trading them because they all seem so complicated, and I abhor complexities. But recently a reader recommended a little book to me: Jeff Augen’s “
Day Trading Options” where the Black-Scholes equation (and indeed any equation) is mercifully absent from the entire treatise. At the same time, it is suffused with qualitative ideas. Among the juicy bits:
1) We can find distortions in the 2D implied volatility surface (implied volatility as z-axis, expiration months as x, and strike prices as y) which may mean revert to “smoothness”, hence presenting arbitrage opportunities. These distortions are present for both stock and stock index options.
2) Options are underpriced intraday and overpriced overnight: hence it is often a good idea to buy them at the market open and sell them at market close (except on some special days! See 4 below.). In fact, there are certain days of the week where this distortion is the most drastic and thus favorable to this strategy.
3) Certain cash instruments have unusually high kurtosis, but their corresponding option prices consistently underprice such tail risks. Thus structures such as strangles or backspreads can often be profitable without incurring any left tail risks.
4) If there is a long weekend before expiration day (e.g. Easter weekend), the time decay of the options value over 3 days is compressed into an intraday decline on the last trading day before the weekend.
Now, as quantitative traders, we have no need to take his word on any of these assertions. So, onward to backtesting!
(For those who may be stymied by the lack of affordable historical intraday options data, I recommend Nanex.net.)
===
There are still 2 slots available in my online Mean Reversion Strategiesworkshop in May. The workshop will be conducted live via Adobe Connect, and is limited to a total of 4 participants. Part of the workshop will focus on how to avoid getting hurt when a pair or a portfolio of instruments stop cointegrating.
No Comments "