Monthly Archives: November 2011

More spreads

To provide a bit more context for the French government bond spreads discussed in the last post, the chart below shows the 5-year spreads to German bonds for a few more European countries.

All SpreadsWith spreads over 4300 basis points (43%), the chart is dominated by Greece, so here is the chart again with Greece removed.

Spreads without GreeceAs you can see in both charts, while French spreads are certainly heading north, they have a long way to go.

For those who have spotted the break in the line for Ireland, my data source seems to be missing 2010 data. I am looking into that and will update the casts if I plug the gaps.

Data source: Bloomberg.

French spreads

Changes of leadership in both Greece and Italy were initially well-received by markets, but investors are getting nervous again. Attention is shifting to France, and French government bonds seem to be on the nose. The chart below shows the “spread” between French and German 5-year government bonds. Measured in basis points (1/100th of 1%), the spread is the difference between the yields on the respective bonds and it has now reached 183 basis points.

Given that yields on 5-year government bonds are only 0.95%, that is a big difference. Investors are demanding almost double the rate of interest on a French bond offered by a German bond if they are to take on the risk that France is not able to repay its debt in 5 years’ time.

Unlike France, the United Kingdom is lucky enough to have its own currency and the spread between UK and German government bonds is only 10 basis points. More on that in a future post.

Data source: Bloomberg.

 

 

Sculptures by the Sea

It has been quite a long time since art was the subject of a post here on the Mule, but today we took the kids to see Sculptures by the Sea. Held each year, this exhibition consists of a series of large sculptures arranged along the coast from Bondi beach to beach. As usual, parking was challenging, but as usual, the effort was worthwhile. We did not make it along the full length of the exhibition (small legs got a bit too tired), but there were some excellent pieces. The family favourite was, without a doubt, the magnificent stag. Here are a few photos.

More colour wheels

In response to my post about colour wheels, I received a suggested enhancement from Drew. The idea is to first match colours based on the text provided and then add nearby colours. This can be done by ordering colours in terms of huesaturation, and value. The result is a significant improvement and it will capture all of those colours with more obscure names.

Here is my variant of Drew’s function:

col.wheel <- function(str, nearby=3, cex=0.75) {
	cols <- colors()
	hsvs <- rgb2hsv(col2rgb(cols))
	srt <- order(hsvs[1,], hsvs[2,], hsvs[3,])
	cols <- cols[srt]
	ind <- grep(str, cols)
	if (length(ind) <1) stop("no colour matches found",
		call.=FALSE)
	s.ind <- ind
	if (nearby>1) for (i in 1:nearby) {
		s.ind <- c(s.ind, ind+i, ind-i)
	}
	ind <- sort(unique(s.ind))
	ind <- ind[ind <= length(cols)]
	cols <- cols[ind]
	pie(rep(1, length(cols)), labels=cols, col=cols, cex=cex)
	cols
}

I have included an additional parameter, nearby, which specifies the range of additional colours to include. A setting of 1 will include colours matching the specified string and also one colour on either side of each of these. By default, nearby is set to 3.

The wheel below shows the results for col.wheel(“thistle”, nearby=5). As well as the various shades of “thistle”, this also uncovers “plum” and “orchid”.

"Thistle" wheel

This is far more powerful than the original function: thanks Drew.

Colour wheels in R

Regular readers will know I use the R package to produce most of the charts that appear here on the blog. Being more quantitative than artistic, I find choosing colours for the charts to be one of the trickiest tasks when designing a chart, particularly as R has so many colours to choose from.

In R, colours are specified by name, with names ranging from the obvious “red”, “green” and “blue” to the obscure “mintycream”, “moccasin” and “goldenrod”. The full list of 657 named colours can be found using the colors() function, but that is a long list to wade through if you just want to get exactly the right shade of green, so I have come up with a shortcut which I thought I would share here*.

Below is a simple function called col.wheel which will display a colour wheel of all the colours matching a specified keyword.

col.wheel <- function(str, cex=0.75) {
	cols <- colors()[grep(str, colors())]
	pie(rep(1, length(cols)), labels=cols, col=cols, cex=cex)
	cols
	}

To use the function, simply pass it a string:

col.wheel("rod")

As well as displaying the colour wheel below, this will return a list of all of the colour names which include the specified string.

 [1] "darkgoldenrod"        "darkgoldenrod1"       "darkgoldenrod2"
 [4] "darkgoldenrod3"       "darkgoldenrod4"       "goldenrod"
 [7] "goldenrod1"           "goldenrod2"           "goldenrod3"
[10] "goldenrod4"           "lightgoldenrod"       "lightgoldenrod1"
[13] "lightgoldenrod2"      "lightgoldenrod3"      "lightgoldenrod4"
[16] "lightgoldenrodyellow" "palegoldenrod"

"Rod" colour wheel
In fact, col.wheel will accept a regular expression, so you could get fancy and ask for colours matching “r.d” which will give you all the reds and the goldenrods.

This trick does have its limitations: you are not likely to find “thistle”, “orchid” or “cornsilk” this way, but I have found it quite handy and others may too.

*My tip was inspired by this page about R colours.

Melbourne Cup

I have been resting on my laurels for too long. Two years ago I had Shocking success tipping a winner for the Melbourne Cup. Needless to say the analysis was entirely bogus, but it was fun. Since then I have been reluctant to tarnish my spotless prediction record, but fortune favours the brave, so I really should try again.

Inspired by my last analysis, The Hoopla is tipping Lost in the Moment, which is a 5 year-old bay horse starting at barrier three and is carrying 53 kg. Unfortunately, my statistics tell me that over the last 150 races going back to 1861, there have been five Cups in which a horse with three words in its name has won, but never one with four words. That does not bode well for Lost in the Moment.

I will not give up entirely on a good formula, so based on the analysis from two years ago, I would still like to tip a bay horse with a handicap in the 50-55 kg range starting in the barrier range 1 to 5. This time, however, I will take into account the fact that over half of previous Cup winners only had a one-word name.

Three of the horses in barriers 1 through 5 have a one-word name, and they are all carrying around 53 kg:

  • Illo
  • Precedence
  • Modun

According to this form guide (which is the only one not blocked at my place of work, which limits access to “gambling sites” and yet is doubtless hosting many Melbourne Cup festivities), Precedence and Modun are geldings, which rules them out (they come second to horses in the chart below).

Horses

So: the Stubborn Mule tip for the 2011 Melbourne Cup is Illo.

For anyone foolish enough to take heed of this tip, I appreciate it, but you are foolish.

UPDATE: after a good run for much of the race (always a bad sign) Illo failed to win or even place. So it seems that the Mule has lost his crown.