The most important charts of 2012

Business Insider posted a great year end wrap-up of charts. I thought I’d post a couple of my own favorite charts and then highlight some of theirs. Its long but well worth checking out.

Don’t take our word for it : Several asset managers make long term stock market return forecasts that are very low. Interesting but this is unrelated to short term drivers of the market.

Gangnam Style viral video sends DI corp to stratosphere and back again. Source: Bloomberg

Now onto some of the great charts posted at business insider.
The Most Important Charts of 2012

I thought I would stay away from too many Europe, Fiscal Cliff or Apple slides since they have dominated the media. Having said that, lets start with the one Europe slide….

Europe certainly influenced trader perceptions for the last couple years. However, the 4-year presidential cycle did provide some guidance to traders…

And yet the market was also tremendously intervention and monetary policy driven….

Deleveraging has dominated headlines as well, including on this blog. But while the private sector is deleveraging the public sector is largely offsetting this:

Looking under the hood, the economic returns to debt growth are diminishing and have been for decades. They are quickly approaching zero:

While some of the economic fundamentals don’t look spectacular, the market has done reasonably well this year. You wouldn’t know that consumers were deleveraging from the absolute and relative performance of the consumer discretionary sector:

Some of this strength is being caused by the recovery in housing and rally in housing stocks:

Another key insight that has proven useful in navigating this market cycle is the sectoral balances analysis approach seen below. I’m still working on incorporating this into my investment approach.

Looking at the long term now, demographics will likely play a role in driving asset prices. This chart looks to bearish to me but there will certainly be a drag in some markets with the number of retirees growing and working age population shrinking.

Lastly, an interesting chart trying to time the market using relative hedge fund exposure. Interesting take, might need some further investigation.

Source: The Most Important Charts of 2012

Advertisements

Dashboards for Technical Analysis: Visualizing Sector Rotation Relative Strength

One of the biggest challenges of trading is getting the right information into a format where you can make decisions effectively without being bogged down by the unnecessary. Today I thought we could look at a tool I built in excel to better understand trends in sector rotation. The idea came from one Mebane Faber’s Idea Farm publications from a research paper written by Ineichen Research and Management AG entitled Wristons Law of Capital.

Lets take a look at one of their great visualizations:


Source: Ineichen Research and Management AG, Mebane Faber’s The Idea Farm, 1, 2

Ineichen goes on to look at not only high frequency economic indicators but risk, general economic indicators and many others. Check out the report and see it for yourself.

This is a great visualization technique so I thought, why not apply it to technical analysis concepts? So I started testing out the idea by looking at sector rotation in a similar dashboard format:

Here we have each sector ETF’s relative strength trend against the SPY (S&P500 ETF), so if the XLF (Financials) is outperforming the SPY (SP500 ETF) it would be green. The SPY is plotted above the relative strength matrix with its 50 and 200 day moving averages. The specific relative strength calculation looks to see if the ratio of the two ETFs is above or below its 20 day moving average. I also categorized each sector ETF into Early, Late or Counter cyclical to be able to better see the progression throughout the business cycle, although there is debate surrounding this technique because no relationship is everlasting in the markets. Lastly, I reversed the colour scheme on the counter cyclical ETFs so that if they are under performing the index, they turn green. The reason for this is to look at the sector rotation composite as a means to time exposure to the market index, so the more green you have, the better the underlying internals of the market. I’m still playing around with this concept and trying to figure out the best way of incorporating the late cycicals.

As you can see, this is a powerful visualization tool that can help a trader read the meta-communications of the market. It is not limited to sector rotation. I’ve seen dashboards looking at breadth and various other techniques. Personally, I plan on incorporating breadth extremes, DeMark counts, different economic indicators, and even highlighting exogenous events like policy interventions. Whatever information you find useful about the market can be combined in a way to streamline your decision making process for trading to be able to make better decisions more effectively. I’d love to hear some suggestions for what kind of information would be useful to look at in this manner if you have any, post a comment below!

Cheers, and happy trading

Looking at gold stock intraday and overnight returns in R

I came across an interesting post recently: Kaeppel’s Corner: The Greatest Gold Stock System You’ll Probably Never Use. It describes how most of the returns from gold stocks have come from overnight gaps (Open – Previous Close) vs intraday (Close – Open). I’ve known about the overnight/intraday anomaly for a while but haven’t seen it this pronounced before. So I thought it was a good time to do some digging on my own with the help of Systematic Investor’s Toolbox in R.

First, let’s initialize the Systematic Investor Toolbox, download the ‘GDX’ data from yahoo and plot a chart.

###############################################################################
# Load Systematic Investor Toolbox (SIT)
# http://systematicinvestor.wordpress.com/systematic-investor-toolbox/
###############################################################################
setInternet2(TRUE)
con = gzcon(url('http://www.systematicportfolio.com/sit.gz', 'rb'))
source(con)
close(con)

#*****************************************************************
# Load historical data
#******************************************************************
load.packages('quantmod')
require(PerformanceAnalytics)

#http://www.optionetics.com/marketdata/article.aspx?aid=24606
data.GDX = getSymbols('GDX', src = 'yahoo', from = '1994-01-01',auto.assign = FALSE)

gdxdata = data.GDX['1995::']

GDXret = cumprod(ifna(Cl(gdxdata)/lag(Cl(gdxdata),1),1))
plota(gdxdata, type = 'candle', main = 'GDX')

GDX is essentially rangebound over its lifetime with tremendous volatility. Not a buy and hold investment for sure! Lets look at the overnight and intraday cumulative returns:

GDXovernight = cumprod(ifna(Op(gdxdata)/lag(Cl(gdxdata),1),1))
GDXintraday = cumprod((Cl(gdxdata)/Op(gdxdata)))
GDXintraday.rev = cumprod(1/(Cl(gdxdata)/Op(gdxdata)))

plota(GDXintraday, type = 'l', main = 'GDX intraday vs overnight', ylim = c(min(GDXintraday),max(GDXovernight)), col = 'black', log = 'y')
plota.lines(GDXovernight, type = 'l', main = 'GDX curves', col = 'blue')
plota.legend(c('intraday','overnight'),c('black','blue'))

The results are very similar to ones in the Optionetics blog post with the overnight return producing tremendous gains and the intraday return huge losses. The only thing that is different is that I’m compounding the returns vs holding 100 shares. However, the shape of the graph is virtually the same.

Next let’s look at what happens when we go long the overnight session and short the intraday. I’m also going to add on the 12 month return, drawdown and 20 day intraday/overnight volatility to get a better picture of whats going on.

starting.equity = 100000
GDXstrat = starting.equity*GDXintraday.rev*GDXovernight

GDX.intraday.vol = ifna(100*sqrt(252) * bt.apply.matrix((Cl(gdxdata)/Op(gdxdata))-1, runSD, n = 20),0)
GDX.overnight.vol = ifna(100*sqrt(252) * bt.apply.matrix(ifna(Op(gdxdata)/lag(Cl(gdxdata),1)-1,0), runSD, n = 20),0)

layout(1:4)
plota(GDXstrat, type = 'l', main = 'GDX: short open - long close', ylim = range(GDXstrat), log = 'y', col = 'blue')
GDX.12mroc = ifna(100 * (GDXstrat / lag(GDXstrat, 255 ) - 1),0)
plota(GDX.12mroc, type = 'l', main = '12m ROC', ylim = range(GDX.12mroc), col = 'green')
GDX.dd = 100 * compute.drawdown(GDXstrat)
plota(GDX.dd, type = 'l', main = 'Drawdown', ylim = range(GDX.dd), col = 'red')
plota(GDX.intraday.vol, type = 'l', main = 'GDX 20-period Volatility', ylim = range(GDX.intraday.vol), col = 'cyan')
plota.lines(GDX.overnight.vol, type = 'l', main = 'vol.overnight', ylim = range(GDX.overnight.vol), col = 'purple')
plota.legend(c('intraday','overnight'),c('cyan','purple'))

Much better visualization of the properties of this strategy. Of course, it transacts twice a day, so there will be huge impacts from commissions, slippage, etc so it may not be feasible to trade. Nevertheless, it is an interesting phenomena and I wonder what in the underlying market structure is causing it.

Finally, I changed the symbol in the code and outputted the same graph for ‘NUGT’ the triple leveraged gold stock ETF. The results are consistent although the magnitude of returns and volatility and much greater.

Solo climbing….

Every once in a while you see something that pushes the boundaries of physical achievement. In the following video, Alex Honnold shows off solo climbing, which is the sport of climbing without any ropes or harnesses. Crazy? Perhaps. Nevertheless, Alex is a role model in showing us how to push beyond conventional limits…Very cool video

Mark Carney speech highlights

In honour of our great Canadian central banker that is taking off to London, I thought I would highlight parts of his speeches. Carney understands global deleveraging more than most other central bankers, quoting Minsky along the way. He also understands that Canadians will one day have to go through this process as well….

Quotes from: Growth in the age of deleveraging

“Most fundamentally, current events mark a rupture. Advanced economies have steadily increased leverage for decades. That era is now decisively over. The direction may be clear, but the magnitude and abruptness of the process are not. It could be long and orderly or it could be sharp and chaotic. How we manage it will do much to determine our relative prosperity.”

“In general, the more that households and governments drive leverage, the less the productive capacity of the economy expands, and, the less sustainable the overall debt burden ultimately is.

“Another general lesson is that excessive private debts usually end up in the public sector one way or another. Private defaults often mean public rescues of banking sectors; recessions fed by deleveraging usually prompt expansionary fiscal policies. This means that the public debt of most advanced economies can be expected to rise above the 90 per cent threshold historically associated with slower economic growth.”

“While debt can fuel asset bubbles, it endures long after they have popped. It has to be rolled over, although markets are not always there. It can be spun into webs within the financial sector, to be unravelled during panics by their thinnest threads. In short, the central relationship between debt and financial stability means that too much of the former can result abruptly in too little of the latter. Hard experience has made it clear that financial markets are inherently subject to cycles of boom and bust and cannot always be relied upon to get debt levels right. This is part of the rationale for micro- and macroprudential regulation. ”

“As a result of deleveraging, the global economy risks entering a prolonged period of deficient demand. If mishandled, it could lead to debt deflation and disorderly defaults, potentially triggering large transfers of wealth and social unrest.”

“Austerity is a necessary condition for rebalancing, but it is seldom sufficient. There are really only three options to reduce debt: restructuring, inflation and
growth.”

“Once leverage is high in one sector or region, it is very hard to reduce it without at least temporarily increasing it elsewhere.

In recent years, large fiscal expansions in the crisis economies have helped to sustain aggregate demand in the face of private deleveraging (Chart 8). However, the window for such Augustinian policy is rapidly closing. Few except the United States, by dint of its reserve currency status, can maintain it for much longer. “


Source: Growth in the age of deleveraging

“This will be hard to accomplish without co-operation. Major advanced economies with deficient demand cannot consolidate their fiscal positions and boost household savings without support from increased foreign demand. Meanwhile, emerging markets, seeing their growth decelerate because of sagging demand in advanced countries, are reluctant to abandon a strategy that has served them so well in the past, and are refusing to let their exchange rates materially adjust.”

What It Means for Canada

Canada has distinguished itself through the debt super cycle (Chart 10), though there are some recent trends that bear watching. Over the past twenty years, our non-financial debt increased less than any other G-7 country. In particular, government indebtedness fell sharply, and corporate leverage is currently at a record low (Chart 11). “


Source: Growth in the age of deleveraging

“In the run-up to the crisis, Canada’s historically large reliance on foreign financing was also reduced to such an extent that our net external indebtedness was virtually eliminated.

Over the same period, Canadian households increased their borrowing significantly. Canadians have now collectively run a net financial deficit for more than a decade, in effect, demanding funds from the rest of the economy, rather than providing them, as had been the case since the Leafs last won the Cup. ”

” Unlike many others, we still have a risk-free rate and a well-functioning financial system to support our economy. ”

“First and foremost, that means reducing our economy’s reliance on debt-fuelled household expenditures. To this end, since 2008, the federal government has taken a series of prudent and timely measures to tighten mortgage insurance requirements in order to support the long-term stability of the Canadian housing market. Banks are also raising capital to comply with new regulations. Canadian authorities are co-operating closely and will continue to monitor the financial situation of the household sector.

To eliminate the household sector’s net financial deficit would leave a noticeable gap in the economy. Canadian households would need to reduce their net financing needs by about $37 billion per year, in aggregate. To compensate for such a reduction over two years could require an additional 3 percentage points of export growth, 4 percentage points of government spending growth or
7 percentage points of business investment growth. Any of these, in isolation, would be a tall order. Export markets will remain challenging. Government cannot be expected to fill the gap on a sustained basis.

But Canadian companies, with their balance sheets in historically rude health, have the means to act—and the incentives. Canadian firms should recognize four realities: they are not as productive as they could be; they are under-exposed to fast-growing emerging markets; those in the commodity sector can expect relatively elevated prices for some time; and they can all benefit from one of the most resilient financial systems in the world. In a world where deleveraging holds back demand in our traditional foreign markets, the imperative is for Canadian companies to invest in improving their productivity and to access fast- growing emerging markets.”

“Today, our demographics have turned, our productivity growth has slowed and the world is undergoing a competitive deleveraging.

We might appear to prosper for a while by consuming beyond our means. Markets may let us do so for longer than we should. But if we yield to this temptation, eventually we, too, will face painful adjustments.

It is better to rebalance now from a position of strength; to build the competitiveness and prosperity worthy of our nation. ”

 

I thought it would be good to look at the private household sector debt chart from the last post.

In short, Carney knows Canada is at risk despite its fiscal prudence and low corporate debt because the household private sector has accumulated leverage due to overconsumption. Carney would like Canada to avoid the situation where the public sector takes over the gap in aggregate demand caused by deleveraging and thus asks the corporate sector to step up. Exporting our way out of this isn’t an option as there is a game of competitive devaluation going on worldwide. Unfavourable demographics also come into play as a drag. Having said all this, Canada is still relatively in a better position although they haven’t even begun the deleveraging process and are therefore 3-4 years behind the game.

Carney also mentions that Canada still has a ‘risk-free rate’ which is a great point. The US has reached its zero-bound for interest rates, and as a result its economic cycle is closely related to trends in inflation. As Francois Trahan of Wolfe Trahan & Co. insists that “inflation is the new fed funds rate,”. In Canada we still have some maneuvering room