Wednesday, December 21, 2011

Record Long Term Treasury Returns

I mistakenly assume everyone knows that US Treasury Returns have been extreme in 2011.  As we near the end of the year, I thought it would be beneficial to look at the world’s best performer while incorporating some new graphical techniques.  There is also an opinion (NOT INVESTMENT ADVICE) expressed in one of the charts.

From TimelyPortfolio
From TimelyPortfolio

R code in GIST:

Friday, December 16, 2011

Lattice Explore Bonds

Since my fifth most popular post has been Bond Market as a Casino Game Part 1, I thought I would use Vanguard Total US Bond Market mutual fund (VBMFX) monthly returns to build our skills in the lattice R package and help visualize the unbelievable run of U.S. bonds (Calmar Ratio 1.37 over the past 20 years).

Although I have primarily graphed with R base graphics, PerformanceAnalytics charts, and ggplot, the lattice package provides an extremely powerful set of charting tools.

We can start with a basic qqplot of the entire set of monthly returns.

From TimelyPortfolio

Then, we can group by year.

From TimelyPortfolio

Or, we can also very easily split each year into its own panel.

From TimelyPortfolio

Here is a little different look with a density plot.

From TimelyPortfolio

Now let’s build boxplots and dotplots.

From TimelyPortfolio

Add an annual dotplot to a boxplot for the entire period.

From TimelyPortfolio

Or we can add a boxplot for each year.

From TimelyPortfolio

See for all my posts on bonds.

R code from GIST:

Thursday, December 15, 2011

With Size, Does Risk–>Return?

A basic tenet in finance is that higher risk should lead to higher return as the time horizon stretches to infinity.  However, in bonds, higher risk has not meant higher return with either credit risk (high-yield) or long duration risk (maturity > 15 years).  Based on some quick analysis of Kenneth French’s dataset on returns by market capitalization, it appears theory might better explain reality but not in a linear fashion.  For those more interested in risk and return on small caps, see this fascinating revelation refuting a basic tenet of finance About That Small Cap Effect: Oops!

From TimelyPortfolio
From TimelyPortfolio
From TimelyPortfolio

R code from GIST:

Friday, December 9, 2011

A Tale of Two Frontiers

In a follow up to Evolving Domestic Frontier, I wanted to explore the efficient frontier including international indexes since 1980.  Life is great when your primary indexes (Barclays Aggregate and S&P 500) lie on the frontier as they did 1980-1999.  The situation becomes much more difficult with a frontier like 2000-now.

From TimelyPortfolio

If we examine return, risk, and Sharpe though, 1980 to now was really not that bad with annualized returns of all indexes stocks and bonds > 8% even including the last decade of “equity misery”.  As the S&P 500 shifted from the top of the efficient frontier to the bottom, it seems the focus over the last decade as been finding alternatives for the S&P 500. Strangely, the unbelievable riskless return of bonds has allowed some investors to claim and use bonds as one of these potential alternatives to the S&P 500.

From TimelyPortfolio
From TimelyPortfolio

Bonds as alternatives to equities have made even more sense when we look at correlations.

From TimelyPortfolio

However, bonds based on the yield to maturity of the Barclays Aggregate index suggest, even guarantee, forward returns of only 2.3%, significantly below the +8% generously provided for 30 years.  I believe the focus on alternatives should be alternatives for the guaranteed miserably low returns of bonds (WSJ Bond Buyers Dilemma).  The trick though is reducing risk (drawdown) of these alternatives to an acceptable level to most bond investors.  Max drawdown on bonds since 1982 has been 5%, which is virtually an impossible constraint for any risky alternatives, since in even very attractive secular buy-hold periods, drawdown generally is 20% to 30%.

From TimelyPortfolio

Our options are basically limited to cash, which at 0% return is unacceptable, unless we can discover a method to reduce drawdown on the risky set of alternatives to 20%, but really down to 10%.  How do we transform risky alternatives with historical drawdowns of 40%-70% to an acceptable bond alternative?  I think it requires tactical techniques blended with cash with a lot of client education and hand-holding.

R code from GIST:

Wednesday, December 7, 2011

Happy 1st Birthday Timely Portfolio

December 8, 2010, I sat down to write my first post on Timely Portfolio Reading->Writing

“I am determined to play not spectate. After 20 years of voracious reading, I have decided to write, and this blog represents my commitment. More than likely it will be a reflection of me, so a lot about my work/passion money management and markets but also hopefully some worthwhile thoughts and observations. I will be the writer and possibly the only reader ultimately but I know that I will benefit immensely from this project. Any benefit to others will be extremely gratifying and help resolve my debt to all the wonderful authors that have entertained and enlightened me over the years.”

After a couple of months, I was able to more specifically assess the benefit of my blogging in Why Talk My Book?

“…I blog to

1) record my thoughts with a timestamp and no benefit of hindsight

2) improve the thoroughness of my thoughts through the Hawthorne Effect. If I publish something for all the world to see, I am going to make absolute sure that my references are correct.

3) get feedback to improve my thoughts. Please criticize and bash what I write. The markets hurt my feelings all the time and do far more damage than your thoughts ever will. Please share them.

Markets have humbled me far too greatly to believe that I can or will move markets. Only the established trend of the market can attract enough attention to move the market meaningfully in my favor. Markets are not efficient, and I have no private information. I simply need to be an diligent, honest, and humble observer of the market, and I will do well.”

The year in blogging has been incredibly fun, challenging, and educational.  Thanks to all those who have joined me along the way, especially those that helped, commented, criticized, referred, and improved my blog.  I never planned for or even imagined anything close to the stats shown below.

From TimelyPortfolio

I love the interaction, so please let me know what you are thinking.

Tuesday, December 6, 2011

World Since June 2008

For a client meeting, I struggled with how best to illustrate world markets since June 2008.  I used R to produce this (I amended this post to reflect a prettier forked version as discussed in the comments), but I’m still not completely satisfied. Anyone have suggestions to improve?

From TimelyPortfolio

What I thought was interesting was US equity outperformance and the US 10y yield move through the financial collapse low 2.15% seen in December 2008 and significantly lower than the 2.87% at the S&P low March 2009.  I think both can be explained by an illusion of control assigned to the US.  This illusion begins to unravel if the political process fails and monetary policy has reached its limits.

R code from Gist:

Sunday, December 4, 2011

Improved Moving Average?

I have been notified by the authors that the code does not perfectly reflect the improved moving average introduced.  In another post, I will explore the differences.  The authors have now released their version of the code

When @quantfblog started following me on Twitter, I was delighted to discover their papers

Papailias, Fotis and Thomakos, Dimitrios D., An Improved Moving Average Technical Trading Rule (September 11, 2011). Available at SSRN:

Papailias, Fotis and Thomakos, Dimitrios D., An Improved Moving Average Technical Trading Rule II - Can We Obtain Performance Improvements with Short Sales? (November 12, 2011). Available at SSRN:

backed by a nice and improving website  I just could not resist the opportunity to port their improved moving average idea to R and run some additional tests.  The entire process was extremely pleasant due to the authors’ willingness to test, comment, and suggest throughout the implementation process.  Thanks so much to them for all their help.



From TimelyPortfolio
From TimelyPortfolio
From TimelyPortfolio

For fun, I thought it would be interesting to compare the "Improved Moving Average" to a Mebane Faber style 10-month moving average system.

From TimelyPortfolio


While I enjoyed the testing, I am still not entirely sure if the “improved moving average” is significantly improved, but it certainly might fit someone’s utility curve better than the standard moving average.  More than anything, this process has proven to me a couple of things:

1) the beauty of open-source and collaboration.  The authors were incredibly generous and helpful as I worked through this process.  To even better demonstrate the power of open-source, I will use ttrTests to do additional testing and then the bt examples from in future posts.

2) how even a simple moving average can become incredibly complex.  Making one very slight change markedly changes the results.

R code from GIST:


Thursday, December 1, 2011

Is Drawdown the Biggest Determinant of System Success?

In all my system development, I still have not been able to determine what universal underlying conditions significantly improve a system’s chances of outperforming buy-and-hold.  Also, I have found very little discussion, so maybe R with some help from ttrTests can help answer my question of when I should just go buy-and-hold (a very pleasant situation for a money manager).  Starting in this business in 1998, I have often said that I dream of a day when I can just buy and hold similar to Japan stocks 1980-1990, US stocks 1990-2000, and US bonds 1982-now.

Those who follow my blog or know me already understand my obsession with drawdown, but that obsession focuses more on client/manager psychology (Investing for the Long Run) rather than drawdown’s effects on tactical systems.  I do not understand the industry’s focus on standard deviation.  I have never had a client call me or even worse fire me because my standard deviation has increased.  I know the argument is that higher standard deviations lead to higher drawdown, but as I show later in the post, this does not seem to be the case.

Clients call me or fire me because they have lost money, so if I can minimize the frequency, amplitude, and duration of drawdowns, then I can help/guide the client and reduce the worry, which is one main reason why they are paying me.  Also, though I think that focusing on minimizing drawdown can meaningfully increase the chances of achieving their long term return objectives (Drawdown Control Can Also Determine Ending Wealth and Confidence, Ending Equity, and What I Can Do as the Money Manager), which is even more likely the reason why clients pay me.

How nice would it be if drawdown also determines an objective system’s success?  To start the testing I thought I would use the fine work of David St. John on ttrTests (ttrTests 4th and Final Test) to get 100,000 bootstrapped samples from monthly S&P 500 data to examine drawdown, standard deviation, skewness, and compound returns on buy-and-hold versus a Mebane Faber 10-month moving average system.  Since I am so biased, I will let you determine the significance of drawdown on the results.

From TimelyPortfolio
From TimelyPortfolio

Here is where I get some confidence in my belief higher standard deviation does not necessarily cause worse drawdowns. However, it is interesting that higher standard deviation has as high a correlation as drawdown with system out(under)performance (bottom right).

From TimelyPortfolio

R code from GIST:

Inevitability of a Death Spiral

I think Satyajit Das’ guest post

The Sovereign Debt Train Wreck
from The Big Picture by Barry Ritholtz

does a very nice job highlighting and clarifying some of my thoughts on the U.S. sovereign debt problem, which is clearly not being priced with a US 10y Treasury at 2.10% or even 4%.  For those of you unfamiliar with Satyajit Das, his book exposed ex-ante both what caused the financial panic of 2008-2009 and the concurrent disgusting practices prevalent in finance.

For my thoughts on death spiral and the generosity of Asian central banks, see posts

Generosity of Asian Central Banks

Death Spiral of a Country

Death Spiral Warning Graph

Unsustainable Gift

Nine Lives of the Fed Put