## Wednesday, August 31, 2016

The speech from Fed Chair in the Jackson hole was quite uneventful. The far more interesting was this one. It was a while back the ever useful Michael Pettis hinted at how rate cuts can be deflationary - exactly the opposite of mainstream central bank thought process. This represents another argument, and how crucial fiscal participation is in delivering monetary objectives.

Talking of central banks, this month is another one for central bank focus. Starting with ECB next week, followed by BoE around middle of the month, and ending with Fed and BoJ towards the end, the mood of the market is expected to swing based on these policy outcomes. The general expectation is a hawkish Fed while the rest continues the dovish stance. Here are the top 5 trade to consider for the moment.

#2: Pay GBP 10s30s steepener: Following Brexit, the long end sterling curve steepened sharply, followed by an equally sharp flattening after the early August BoE. This is presumably a reaction from the QE announcement, but it is not entirely intuitive. While we had similar sharp flattening move in Euro after ECB QE in early 2015, the large difference in size between this two perhaps points towards a bit over-reaction (ECB's initial €60b per month, later €80b, compared to BoE's £10b per month, i.e. £60b over 6 months). Not only in terms of absolute size, the ECB QE is also larger in comparison with the supply - for example at the ECB capital key, Germany amounts to approx €20b per month currently, compared to a gross supply of around €16b per month (as per Bundesbank projection figures for this years). For the UK, this compares to £10b per monthly to £11b of monthly supply (as per UK DMO projections). This does not correct for the German securities trading at an yield lower than ECB depo rate (and hence not eligible for QE), and also the fact that ECB QE will extend beyond the BoE one, hence the actual difference in supply pressure is much more acute. The second interesting point to note is the maturity distribution (see chart below). UK has a squeeze in the middle segment (belly, i.e. 7 year to 15 year remaining maturities) of the curve, whereas the squeeze for ECB is mostly in the long end, putting a relative rally pressure in the belly UK Gilts curve. Add to this the facts that the market price of expected inflation spread between UK and Euro area (breakeven inflation swap) has actually widened following Brexit. This is presumably influenced by the sharp decline in GBP vs USD, but this inflation premium somehow has to be priced in the nominal rates which in general should exert a steepening pressure. This combination makes a steepening position for GBP 10s30s attractive. One of the possible reason for such a sharp flattening can be the expressed intention of the BoE governor to steer clear of negative rates and that remains a risk (somewhat mitigated by a still 25bps to go). Other risk is a sudden strong recovery in UK economy, which will weaken the case for steepening.

#3:  Equity bearish protection: For all those bears out there, shorting the all time highs have been as appealing as it has been money loosing since June. The equity markets around the world has been quite oblivious to shocks. FTSE 100 had one of the best runs in Europe. European equities have been less spectacular, but nonetheless not in correction territory. Nikkei 225 handled strengthening yen better than expected. Even EM had a decent run. The key has been the amazing resilience of S&P 500 - and appears everything is now pending on a breakdown in the US equity market. As a result, S&P is now trading at tad lower from all time high, and tad higher than all time low realized volatility. On top, last print from CFTC traders positioning shows the highest ever short positioning in VIX. But there are potential issues on the horizon to be cautious, FOMC in September is the obvious one, South African political situation may be a trigger, or sometimes things just happen. Fortunately, we also have the S&P calendar vol spreads around the highs. This present a good cautious positioning of buying the near term puts vs long term (e.g. 3m/6m) - relatively less damning long gamma position. A large downside move in the US equity market will almost certainly have repercussion across the globe, and if triggered by FOMC, especially across the emerging markets.

#4: Pay Cross-currency basis widener in EUR: One for the long-ish term - this is a reversal of Euro savings glut trade. Since the start of the financial crisis, the cross currency basis widened as everyone panicked after dollar funding. Subsequently during the period of European sovereign crisis, this basis remained under stress, and only started normalizing after the whatever it takes promise from ECB's Draghi. However, after peaking at around mid 2014, this basis (not only in Euro, but across major currencies like GBP and JPY), started widening again. My theory is: this time it has less to do with financial market panic and shortage of dollar funding from the liability side, and more with the savings glut on the asset side. In such a scenario, asset managers willing to invest in higher yielding assets (like US treasuries or equities) will swap their euro funding with a euro vs dollar cross currency swap (effectively a dollar loan against euro) and paying dollar interest vs receiving euro interest. As more and more money chase this trade, there will be a receiving pressure on the euro leg, pushing the basis down. The fact that this is asset driven and not liability driven is corroborated by a flattish slope in the basis for different maturities. During the panic days, it was a strictly inverted slope (e.g. 1y tenor wider than 5y), which is now reversed or almost flat. Given this, any recovery in the euro area (and indeed globally) consumer and investment spending will set the direction in a reverse trend. Currently the levels are near short term support. Also given the slope as mentioned above, this benefits from a positive roll-down. This is a relatively low risk and low cost of carry trade for global economic recovery. The alternative is of course that long-dated forward trade in euro. But I like this one better at the moment: the long dated forward can remain stuck even after normalization (i.e. end of savings glut), but the basis will surely feel the pressure. Plus the once juicy carry in those long-dated forwards are mostly gone. Reportedly, there is currently a dollar funding shortage, on account of the money market regulation change mentioned above. But also reportedly a large part of the switch from CP to treasury is done.

#5: The ECB Trade: ECB is not BoJ and Euro area is not yet Japan. The question is if you see them converging or diverging. The chart below shows market reactions in rates and FX for recent major central bank decisions in Euro area and Japan. Note how in recent time, ECB meetings followed a rally in Euro and a flattening in the curve. Also note how the similar the reaction was in BoJ. And finally, how the last one from BoJ in July end, which underwhelmed the market, reversed the flattening trend, with less pronounced effect and in fact a net steepening. The story of QE is perhaps running out of steam.

I expect similar reaction for ECB even if they announce a QE extension beyond September 2017. The standard trade will be fading the move, which is as of today expected to be a steepener. However, a rally in Euro may be more difficult in the short term as the focus shifts immediately to Fed.

All data from respective treasury offices, and Bloomberg.

## Thursday, August 18, 2016

### Systematic Trading: Getting Technical with Technical Indicators

There are few investors and traders who have never used a technical indicator. Some use them as part of their core trading strategies, others as confirmation or as a timing tool. I am reasonably certain even the most ardent value investors perhaps look at them in time of trials and tribulations. The set of these indicators are large (and ever increasing) as different ones developed over course of time, often from different markets and asset classes1. This is usually not a problem, as most practioner will settle down with one or two favorites.

However, most indicators have a lot in common among them. They are usually a function of past and present market data. They can be usually expressed as a function of returns of the underlying, and they tend to move in a range (though not always statistically stationary2).

Taking the example of a simple one - the moving average cross-over indicator. This is expressed as a difference of two moving averages (a short and a long ones). Mathematically, this can be represented as $mom=\sum_{i=0}^{n_1} a_i.P_i - \sum_{i=0}^{n_2} b_i.P_i$, where $n_1$ and $n_2$ are the short and long moving average periods, $a_i$s and $b_i$s are the weights (for simple moving average $a_i=1/n_1$ etc.) and $P_i$s are the prices. It can be shown that this can be converted from this price space to returns space, as $mom=\sum_{i=0}^{n} w_i.r_i$. Here $r_i=P_i - P_{i-1}$ (returns assuming log prices) and $n=n_2$ from above.

Similar treatment can be applied to other common indicators to convert them as a function of returns $r_i$s. A few example 3 below:
• Momentum cross-over = $\sum_{i=0}^{n} w_i.r_i$
• MACD Histogram = MACD line - signal line = $\sum_{i=0}^{n1} w_i^1.r_i$ - $\sum_{i=0}^{n2} w_i^2.r_i$ $\Rightarrow$ $\sum_{i=0}^{n} w_i.\Delta{r_i}$, Here $\Delta{r_i}=r_i - r_{i-1}$. This follows from logic similar to the momentum crossover above, and noting the difference of sum is in returns terms instead of prices.
• CCI = (Price - Average Price)/(0.15 x Mean Deviation) = $\frac{1}{\sigma}\sum (P_i - \bar P)$ $\Rightarrow$ $\frac{1}{n.\sigma}\sum (r^{n}+r^{n-1}+..+r)$ $\Rightarrow$ $\sum w_i.r_i$, where $r^k = r_i - r_{i-k}$
• Know Sure Thing = (RCMA1 x 0.1) + (RCMA2 x 0.2) + (RCMA3 x 0.3) + (RCMA4 x 0.4) = $a1.\sum w_1.r^{n_1} + a2.\sum w_2.r^{n_2} + a3.\sum w_3.r^{n_3} + a4.\sum w_3.r^{n_3}$ $\Rightarrow$ $\sum w_i.r_i$

Similarly most others can be expressed as a function of returns, although not all of them as linear (or even polynomial) as above. Broadly, we can divide all common technical indicators that can be expressed as function of returns in three different classes 4
• Indicators that are linear (or polynomial) combination of past returns in returns space ($f(r)$). Examples - the ones above. Under certain condition (stationarity) they can be modeled as Gaussian distribution
• Indicators that are functions of sign of the returns in signed returns space ($f(r^+, r^-)$). Examples - like RSI or Chande Momentum Oscillator. They can be analyzed using folded normal distribution
• Indicators that are function of returns in time space ($f(t(r))$). An examples is the Aroon indicator

One objective of analyzing commonality of technical indicators can be to choose the one that is best suited to a particular purpose (depending on the time series characteristics of the underlying and the trading strategy). Another, and perhaps more common, can be dimensionality reduction as part of inputs to advanced machine learning based trading systems.

Following figure shows the outcome of principal component analysis of different technical indicators run on different equity indices5 - showing the first two principal components. Interestingly, for most cases (both in real market data and simulations6) the first two components will explain close to 85% or more variance in the indicators. As we can see all indicators load similarly on the first component. This is the underlying momentum component. This component typically explain around 70% variance, and will probably be the choice of inputs in a support vector machine or neural network system incorporating technical indicators.

The second component is where the indicators differ a lot. This component captures the signature of the filtering carried out by the indicator. This signature has two parts, one is the intrinsic method of the filter computation. For example from the above formulate, we see MACD is a function of difference of returns and hence will tend to behave more like over-differenced series (assuming the returns are stationary). In contrast, KST will have a large component which is simply sum of returns, and hence will behave more like a non-stationary series in the limit. Indeed, for common parameters for these indicators (representing a look back of 20 days), the time series characteristics of these signals can be captured in the following (inverse) unit root circle plot (here roughly speaking, closer the plotted points, i.e. roots, towards the center of the circle, more mean-reverting is the series)

We can see from the PCA plot there are four major groups of indicators based on their time series characteristics - MACD, which is very much mean-reverting (i.e. suitable for short term trends), KST (which is quite the opposite) and then we have two groups - one consisting the first type of indicators noted above (function of returns) and the other group consists of the second and third types (function of signed returns and returns in time space). This is validated in the unit root plot as well, we see MACD has roots much closer to the center, KST almost on the circle perimeter, RSI quite close to it, and Bollinger bands closer to the center relatively.

Another way to appreciate how different indicators impact the momentum signal differently, is to look at how they filter the components of the underlying (returns in this case) at different frequencies - as seen in the AR spectral analysis chart below. Click on the indicators on the right hand side legend to turn them off or on.

A spectrum that has higher values towards zero frequency (like KST) means they will tend to filter out higher frequency in the data,whereas the ones that has a peak away from zero, or drop off slowly from peak at zero will tend to pick up faster components (in the extreme resembling high negative correlation of a over-differenced signal). Of course as we increase look back period, an indicator will tend to move away from the second kind and towards the first kind.

Using this insight, one can design an appropriate set of indicators to extract an "average" momentum signal, to be used in other strategy or as inputs to a neural networks or similar system.

For this purpose, the first PCA component is the one we seek to use as input as momentum signal, straight and simple. The usefulness of the second component is that it allows us to fine-tune the momentum signal for our purpose. A momentum signal depends on our time frame - a short period momentum can look like mean-reversion in longer time frame. To extract a consistent signal we need to tune the choice of the indicators and parameters. If we are looking to extract momentum signals averaged over different filtering methods, but not over time, we need to ensure all factor loadings on the second component are within acceptable limits. Whereas if we want to span as much frequency spectrum as possible we want the loadings to span much larger space. Depending on out choice we extract the kind of signal we want from the first component7.

Note, while I mention the first component as momentum signal, it is NOT same as what is known as the time series momentum factor. However, it can easily computed by back-testing trading PnL based on this momentum signal. As we have seen in general these signals can be expressed as $\sum w.r$, the PnL will be (using a linear sizing function) $\sum (w_i.r_i).r_j$, or (using a sign function) $sign(\sum (w_i.r_i)).r_j$. Of course we can approximate the signum function, and then in general, the PnL becomes a polynomial of auto-covariances of the underlying returns.

1. This is a useful place with good introductory materials on different indicators
2. In general an indicators will tend to become non-stationary at a given periodic frequency (e.g. daily) as we increase the look-back parameter
3. There is no guarantee the sum of weights adds up to one. Please feel free to notify me in comments if you spot any error.
4. Here we ignore the indicators that take volume as an input as well
5. All data from Yahoo Finance
6. Based on simulations assuming expected market behaviours, i.e. AR or ARMA type return characteristics.
7. One can design an algorithm for this purpose, that will maximize the explained variance by the first component of the PCA, by optimizing over the parameter space of the indicators within a pre-defined set.

## Tuesday, August 9, 2016

### Off Topic: Olympic Gymnastics Medal Table Dynamics

Being the month of summer Olympics, here are some stats from past games while we wait for the tally from Rio (since Barcelona 92). The major highlights are
• The spectacular rise of China, especially after Athens 2004
• The emphatic decline of Eastern European countries in medal tally, especially after 2004
• The great decline of Russia (includes Ukraine tally, for ease of historical data handling only) and what appears to be a recent comeback
Click the play button in below chart to see how the dynamics evolved. Select the little boxes on the right to track a particular bubble.

The change that happened was a complete revision of the point system following a judging controversy in Athens summer Olympics in 2004. This includes abolishing the "perfect 10" and introduction of "difficulty level" in scoring.

This offers a positive skew to the participants. Choosing a high difficulty level enables one to achieve a much better chance to win a medal (and probably on the higher side - i.e. gold or silver). Although that means the execution will be difficult, and on an average they should balance out each other. However, if you aim for high difficulty levels and in rare cases manage to hit the execution, you will be sure to win a medal. This positive skew should theoretically motivate gymnasts to choose higher difficulty levels. This also means a higher variance in performance outcome.

This also should mean a higher rate of injuries for gymnasts. Unfortunately, data that I could get on this are too little to say anything statistically.

## Wednesday, August 3, 2016

### Macro: The End of QE-topia

Negative rate is much more than what it says on the label. One of the cornerstones of modern finance is what is called present value (PV). PV is used to evaluate real projects, value financial investments or price derivatives, you name it. Surprisingly, based on my personal experience, it appears many practitioners and investors are unaware of the fundamental assumption on which this all encompassing concept of PV is delicately balanced - an assumption of a properly functional lending and borrowing market. Without that, there is no mean to transfer values across time back and forth, and PV loses its real meaning. Negative rates makes one question the validity of this assumption.

Central banks, it appears, are having a hard time. Last week's BoJ's underwhelming policy outcome was scorned off by the markets with an emphatic rally in Yen and sell-off in JGBs. This week BoE is widely expected to kick-in with some Brexit easing, and the markets so far has greeted the possibility with a renewed sell-off in FTSE 100. ECB is also expected to up the ante with another QE extension sometime later this year, and the European equities do not seem overjoyed about it. To contrast, S&P 500 seems pretty much nonchalant about a plausible Fed hike. The usual QE-led risk rally, it appears, are drawing to an end. In fact a few are already calling out for a regime change - from QE to deflation dominance (or lack of demand).

In the wake of the Great Financial Crisis, most central bank carried out a massive amount of monetary stimulus. One way to track the global monetary stimulus beyond policy rates is to track the combined balance sheet of major central banks1, as we see below.

Few would argue against the unprecedented monetary stimulus led mostly by the Fed which served a crucial purpose during and after the crisis to restore confidence, liquidity and growth conditions. However, the effectiveness of QEs from other central banks have arguably been much weaker. ECB QE is so far hardly "successful".

Also, over time, the impact to real economy has grown visibly less dramatic. Below chart (left one) shows the growth in global major central bank balance sheet  vis-à-vis growth in M2 money supply as well as bank lending across major economies2. Since the abatement of the European Sovereign Crisis in Q3 2012, all the measures have started moving in lock-step. What is more, the magnitude of global M2 growth has been lower than central bank balance sheet growth, meaning less bang for the QE bucks. The bank lending growth has been even lower than that. It is hardly a surprise we started to have quite a bit of noise around the effectiveness of QE and monetary stimulus around that time and since.

It is not hard to see why. As the right hand chart3 shows, irrespective of what the central banks have been doing, the global private sector still continues with deleveraging (with some exception, like US corporates). The excess savings - especially for Euro area (and a large contraction in dis-savings in the US as well) clearly underscores the problem. This arguably is an expected outcome of a balance sheet recession - wherein the private sector, afflicted with too much debt and in a process to repair their balance sheet, will try to increase savings and desist from borrowing no matter how low the lending rates are pushed down by QE. This is less a question about pricing and more about the capacity and willingness to borrow. On top, the increased regulatory burdens and negative interest rates certainly did not help the banking sector much to upsize their loan books. The combined effect - anemic global demand and as a result, stunted global investments (not helped by pre-crisis built-up over-capacity in certain sectors) - was given a new moniker, secular stagnation.

Economies can be stimulated using many forms and jargon. But in any case, to boost demand it must work to enable the demand side to afford it. And this increase demand must be paid for by either increased debt (i.e. borrowing) or equity (like increased transfer or wage). Monetary policy, in practice, mostly tend to fund this increased demand through debt in its standard transmission channel through banks. In a scenario where many are focused on reducing leverage, it is no surprise that this will have a less-than-expected impact. Monetary policy can enhanced equity based spending as well, like through wealth effect or inducing an increase in wage through increased inflation expectation. While this has worked in the US, for the rest of the world, especially in Euro Area and in Japan, this has hardly been the case. The dis-inflation remains very much alive.

There are some recent trends, however, that is slowly becoming a theme - and it involves the other side of the stimulus coin. 2015 has been the first year after the extra-ordinary time during the crisis, that major global economies have experienced a reversal of a combined fiscal tightening (see below4 on the left). We are past the fiascoes like sales tax hike in Japan and the excessive focus on balanced budget in Europe. And a few countries like Canada and Japan have already stated fiscal stimulus as their explicit policy tools. US may see similar moves after the election. Of course the downside of the government playing the role of "consumer of the last resort" is that this comes at a cost of debt concentration at government sector.

We are on a cusp right now. Global consumption, despite all the allegation, has shown considerable resilience (although much away from their pre-crisis period, see chart5 above on the right). What we want now, more than ever, is avoiding any policy mistake. Given the fragile nature and very low margin of error on the policy side, it will be hard to recover from one. We are past the days of equity rallies with every new round of monetary easing. Markets will focus more and more on the underlying growth. This growth will of course have some costs - the key policy issue will be how to allocate that in a balanced manner between the fiscal and monetary side of this. One-sided efforts from central banks - increasingly larger asset purchase from a rather finite pool in a world characterized by negative interest rates and safe asset shortage - is perhaps past its used-by date.

1. source: national central banks
2. source: national central banks, IMF, Bloomberg

3. source: national statistics offices, IMF
4. source: national statistics offices, national central banks

5. source: national statistics offices, Bloomberg