Author Archives: Stubborn Mule

Forget the wisdom of crowds!

Congratulations to all you insightful Stubborn Mule readers! Despite the fact that pricing in the financial markets was indicating around a 60% probability of the Reserve Bank hiking the official interest rates, participants in a poll here on the blog put the chances of no move at 60%. Even the fact that Sportsbet punters* were tipping a rate rise did not sway Mule readers. And it turns out that they had a better read of the RBA tea-leaves than the so-called experts. Today the RBA announced they were leaving the official cash rate unchanged. Well done, all of you!

* Interestingly, Sportsbet have pulled financial bets from their website. Perhaps the Mule post on the topic had some repercussions. UPDATE: their financial bets are up and running again.

Will the Reserve Bank hike rates next week?

Over the last few months, the Reserve Bank of Australia (RBA) board meetings have not provided any real surprises, but coming up next week is the most interesting meeting in a while. The cash rate is currently 4.5%, but there have been enough noises from the bank’s governor and other RBA board members about the strength of the Australian economy, that consensus is leaning towards a rate hike next week. Financial market pricing is currently indicating a 62% probability of a 0.25% rate rise. Interestingly, the online betting agency Sportsbet offers bets on possible RBA actions (somewhat controversially) and its odds are indicating an even higher chance of a rate hike.

Reserve Bank move Payout Probability
Rise Between 0.01 and 0.25% 1.33 75%
Stay The Same 3.40 29%
Rise Between 0.26 and 0.5% 4.50 22%
Rise 0.51% or More 21.00 5%
Any Decrease 101.00 1%
Sportsbet Odds (as at 1 October 2010)

My own contacts in the markets (you know who you are) tell me that the HSBC economist Paul Bloxham, who recently joined the firm after 12 years at the RBA, is calling for no move until November. So, perhaps a hike is not as sure a thing as Sportsbet punters believe.

What do you think? Here is another chance to pit the collective wisdom of Stubborn Mule readers against both the financial markets and online gamblers!

If you need more information to help you make up your mind, you could read Christopher Joye’s arguments as to why the RBA should just be getting a move on in the fight against inflation. It might help tame property prices in the process. Then again, perhaps not.

UPDATE: there was an error with the calculation of probabilities, which has been corrected. By the way, the fact that the probabilities add up to well over 100% gives an insight into Sportzbet’s profit margin, which looks to be around 25%.

FURTHER UPDATE: Sportsbet’s pages of financial markets bets are down…I wonder if ASIC are on to them now.

When is a bet a derivative?

Roulette WheelAlmost 6 months ago, the Australian Securities and Investments Commission (ASIC) was rattling its sabre, threatening to “shut down” online betting agency Centrebet if they continued to allow punters to bet on stock market and interest rate moves.

Peter Martin reported at the time in the Sydney Morning Herald that ASIC had written to Centerbet saying:

it has come to the attention of the Australian Securities and Investments Commission that you may be carrying on a financial services business without holding a financial services licence.

In particular we believe the financial bets you offer over the ASX 200 share index and RBA interest rate changes may be ‘derivatives’, as defined in the Corporations Act.

It seems that anyone in Australia in the business of offering financial derivatives is required to hold an Australian Financial Services Licence (AFSL) and adhere to a raft of regulatory responsibilities. Centerbet, apparently, did not have such a licence.

It was a little bit surprising, therefore, to see an article about the soaring Australian dollar in today’s Herald feature the following commentary from another online betting agency, Sportsbet:

Sportsbet.com.au, which has taken bets on US dollar parity of up to $2000, says there has also been a plunge on the Reserve Bank raising interest rates next week.

So what has changed? A quick call to ASIC confirmed that a business offering bets on financial instruments would be required to hold an AFSL and that their records indicated that Sportsbet did not in fact hold such a licence. I asked them how this requirement was enforced and they told me that if they received a complaint, they would investigate it. They could neither confirm nor deny whether they had received any complaints about Sportsbet.

I will be listening out very carefully for the sound of ASIC’s sabre!

UPDATE: further digging revealed that even while ASIC was clamping down on Centrebet back in April, Sportsbet were taking financial bets. The difference in treatment is quite mysterious.

FURTHER UPDATE: Sportsbet have now taken down their pages for betting on interest rates and the Australian dollar. It may be temporary, or it may be that ASIC are investigating them…It’s now back up, so it appears to have only been a temporary suspension.

Purchasing Power Parity postponed

The Australian dollar has been going for a bit of a run over the last few weeks and many commentators are concerned that it has become over-valued. A widely quoted Bloomberg article published yesterday argued that the Aussie is 27% over fair value compared to the US dollar.

AUD/USD Australian Dollar vs US Dollar (Jun 2009 – Sep 2010)

Their case rests on the theory of “purchasing power parity” (PPP). According to this centuries-old idea, exchange rates should be such that identical goods in different countries should, in the long run at least, cost the same amount. If prevailing exchange rates make it cheaper to buy the same goods overseas than in Australia, then the buying power of the Australian dollar is too high and the currency is over-valued.

The rationale behind PPP is that if there is a big price difference, it becomes worthwhile for enterprising souls to export goods from the cheap country to Australia. Not only would this put upward pressure on prices in the cheap country, but the entrepreneurs would be buying the cheap country’s currency and selling the Australian dollar, thereby putting downward pressure on the Australian dollar. Both of these effects would tend to correct the over-valuation implied by PPP.

For years now The Economist has, famously, been publishing league tables of over- and under-valued currencies based on the price of a Big Mac at McDonalds. Their most recent report suggested that the Australian dollar was over-valued by almost 4%. At the time of publication, the Australian dollar was trading in currency markets at around US$0.88. Since then it has increased in value by another 9%, suggesting the over-valuation is now 13% (assuming Big Mac prices are about the same). However, the Big Mac index has come in for some criticism: last year various News Corporation organs broke the alarming story that Australian Big Macs are in fact smaller than Big Macs around the world, which suggests they are not as cheap in Australia as the Economist believes.

Perhaps aware of this problem, CBA economists have instead constructed an iPod index, based on the price of iPod Nanos around the world. Now I know that Apple only recently brought out their new Nano, but my Apple gadget of choice is the iPhone. Phone prices are tricky though, as they are distorted by the plethora of phone plan deals. So instead, I have constructed a PPP index based on the iPod Touch to illustrate the workings of PPP exchange rate indices. After all, the Touch is just an iPhone without the phone.

The table below has iPod Touch 32G prices from five countries around the world. For each of the non-US countries, the local price has been converted to an effective US dollar price using current currency market exchange rates. The PPP rate shows what the exchange rate would have to be to ensure that the local currency price would convert to the US dollar price of $299. Intriguingly, on this basis all four currencies appear to be over-valued relative to the US dollar. Indeed, the 13% over-valuation of the Australian dollar appears modest compared to a 23% over-valuation of the euro and the Pound. Even the Japanese Yen appears to be very slightly expensive.

Country iPod Price Effective US$ Price Market Rate PPP Rate Over-valuation
A$378
$357
0.94
0.84
13%
£249
$388
1.56
1.27
23%
€299
$391
1.31
1.06
23%
¥27,800
$324
85.7
97.7
2%
$317
$317

iPod Touch (32G) PPP Index

There is another possibility here though. Perhaps it is not so much that these currencies are all over-valued (or that the US dollar is under-valued), but simply that Apple rips off all its non-US customers! Mind you, as most Australians would know, Apple are far from alone in charging us more for electronic consumer goods than they charge Americans (although Europeans seem to get an even worse deal). So, sadly, the iPod index may not be very useful. The analysis does, however, highlight the challenges of using PPP to assess fair value of currencies.

Economists would caution against using a single product and would instead use a “basket” of consumer goods to compare currencies, which is what most of those arguing that the Australian dollar is over-valued would have done. But the real problem with the PPP analysis is that prices of consumer goods are not nearly as relevant to currency markets at the moment as interest rates are. Compared to the rest of the world, investors see Australian interest rates as attractively high. Here is a comparison of the interest rates you would earn by buying government bonds rather than iPods in the same five countries.

Country 2 Year 5 Year 10 Year
Australia
4.82%
4.97%
5.14%
UK
0.73%
1.82%
3.15%
Germany
0.81%
1.47%
2.47%
Japan
0.14%
0.30%
1.05%
USA
0.46%
1.40%
2.69%

Government Bond Rates (Sep 2010)

Depending on the “term” of the bond you buy (i.e. how many years before you get your money back), the rate you earn will differ. Typically, longer-dated bonds will generate higher returns, but regardless of the term an investor chooses, at the moment they can earn significantly more by investing in Australia than in any of the other four countries. Now Australia is certainly not the only country in the world with higher interest rates than the US, Europe or Japan, but most of the countries with high interest rates are developing countries which investors would consider a much riskier proposition than Australia. Furthemore, the noises coming from Australia’s central bankers suggest that interest rates here are only heading higher. In order to invest in Australia, offshore investors have to buy Australian dollars, and this goes a long way to explaining why the currency keeps getting stronger.

The practice of switching investments from low interest rate countries to high interest rate countries is known as the “carry trade” and it is not without risks. In fact, the Economist has compared the carry trade to picking up nickels in front of a steam roller. Where is the steam roller? It is the exchange rate. A US investor may be drawn to the extra 4.36% that a 2 year Australian government bond offers compared to a US government bond, but if the Australian dollar falls back as far as it has risen over recent months that investor would lose that 4.36% and more. On the other hand, if investors think that the Australian dollar is only going to keep going up as long as everyone is jumping on the carry trade, they may not see depreciation as much of a risk. Everybody wins, until the music stops… and Reserve Bank governor Glenn Stevens seems to be promising to keep that music playing.

So where does that leave the theory of Purchasing Power Parity? Most economists would take refuge in the caveat “in the long run”. It’s not that Purchasing Power Parity is wrong, it’s just taking a back seat to the carry trade for now. Eventually it will re-assert itself. Perhaps. In the meantime, Australians travelling abroad will be making the most of their buying power.

Data sources: exchange rates from OANDA, iPod Touch prices from Apple, bond rates from Bloomberg.

* The US price excludes tax, while the other countries include GST/VAT etc. To provide a fair comparison, the US price has been grossed up by 6%, a mid-range sales tax rate.

UPDATE: Thanks to Andrew for the comment about sales tax. The post has been updated accordingly.

How old is the Mule?

According to one automated blog analyser, I am rather older than I thought I was:

stubbornmule.net is probably written by a male somewhere between 66-100 years old. The writing style is academic and upset most of the time

The gender is correct and academic writing style I can accept, but I am not so sure about being upset most of the time. Generally I am quite happy while writing the blog!

A Delicate Balance

3-way BalanceEver since Julia Gillard managed to wangle the support of two of the three country independents and scrape through to a second term in government, speculation has focused on how long the arrangement can last…and not only in the media but also on the Mule Stable.

Challenging though the road ahead may be for the new government, with so many different interests to juggle, I am of the view that Labor will do whatever they can to hold on to power. Even if they are unable to pass “crucial” legislation, they would be very unlikely to go to the polls early lest they lose the election. After all, if they did not have the courage to trigger a double dissolution when they failed to pass emissions trading legislation to combat the “greatest moral challenge of our time”, it is hard to see what issue could be important enough to them to jeopardise their power.

As for the independents, another election would risk their own new-found power. Furthermore, in siding with Labor they have not really promised very much. All they are committing to is to pass supply and to support the government in the event that no confidence motions are brought against it. On each and every particular piece of legislation they are free to horse-trade once more and potentially vote against the government. Also, as Bob Brown recently pointed out, there is nothing to stop the independents and the Greens backing legislation initiatives brought forward by the Liberals. So there really is no good reason for the independents to withdraw their support from Labor.

Without the numbers, the Liberals and Nationals are powerless to bring on an early election. So, this unlikely new coalition government is likely to be here to stay. The only scenario I can see that could undo Labor is a by-election. If one of the MPs supporting Labor were to fall under a bus, retire, disgrace themselves and resign or in some other way leave the Parliament, the Liberals would have the chance to win the by-election and chance the numbers on the floor. Failing that, I would expect to see Labor ruling for a full term.

What do you think? While it may take some time to see the result, this seems like a good opportunity for another poll on the Mule, so have your say!

(polls)

Protovis now working in Chrome and Safari

Thanks to everyone who responded to my experimental Protovis post*, whether in the survey, via twitter or in comments on the post. It quickly became clear that my trick for including the code to generate the chart completely failed to work in Chrome and Safari browsers. I still do not fully understand why that is, but I have now worked out a completely different approach to the problem which (fingers crossed) seems to work in more browsers, although I still cannot vouch for all versions of Internet Explorer.

So here is the chart one more time. I hope it now works for (almost) everyone!

[pvis src=”http://stubbornmule.net/scripts/pv/test.js” img=”/blog/wp-content/PV-CDO-circles.png” height=”125px”]CDO deals: total and recycled[/pvis]
I will also be updating the howto post very shortly to explain my new technique.

UPDATE: at the moment, this trick is not working on mobile devices. It should now be working on mobile devices except for Android. The only remaining problem is IE, but I think that will not be possible. I will instead try to make it fail more gracefully on IE.

* Protovis is a javascript data visualisation library being developed at Stanford, which allows the creation of interactive charts on web pages.

Getting Protovis working on WordPress

When I started experimenting with Protovis*, I quickly found that getting it to work in a WordPress blog was rather fiddly. With a lot of help from Google (and this page in particular), I managed to piece together what needed to be done, but since I did not find any explanations specifically focused on Protovis in WordPress, I thought it may be useful for others attempting the same thing if I summarised the steps involved. Most readers will not have the slightest interest in this, so I will not expect many of you to keep reading!

First of all, if you are hosting your blog on WordPress.com, give up now! These instructions will only work if you have a self-hosted installation of WordPress.

1. Download Protovis and unzip it on your server it a convenient location. I put it in a folder called “protovis”, accessible from the root of the webserver.

2. Ensure your headers include a pointer to the Protovis script. How exactly you do this, depends on your theme, but since I am using Thesis, it’s quite straightforward: under Site Options > Additional Scripts, I added the following code.

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
 <script type="text/javascript" src="/protovis/protovis-r3.2.js"></script>

3. Wrap your Protovis code up in a function and save it in a .js file on the server. For example, here is the code I used to produce the chart in the last post. You will see that I wrapped everything up in a function called “cdodraw”. I saved the file in the folder /script/pv.

4. Edit your post in HTML mode and use the following code to load and call your function.

<script src="/scripts/pv/cdodraw.js" type="text/javascript"></script>
<script type="text/javascript+protovis"><!--
cdodraw();
--></script>

You should replace “/scripts/pv/cdodraw.js” with the location of your own Protovis chart code and replace “cdodraw()”. With the name of your own function. Note that the first script command has type “text/javascript” and the second “text/javascript+protovis”. This is important!

Part of the reason for the difficulty is that WordPress has a tendency to mash up the text you enter, which is fine most of the time, but not when you are trying to write Javascript. An alternative may be to try the Text Control plugin, which allows finer control over WordPress’s mashing of your text. I have not tried the plugin myself, so I cannot be sure how well it works.

Good luck, and let me know how you go! If you have any suggestions on how to do this a better way, please let me know. Better still, you could write a WordPress plugin to make it all much easier.

UPDATE: it appears that this function-wrapping trick does not work for Google Chrome or Safari. I’m looking into it!

FURTHER UPDATE: I could not work out why the approach described here does not work for Chrome or Safari, so instead I got it working by creating a custom shortcode that slurps in a javascript file and includes it in the post. I am in the process of wrapping this up in a plugin to save others the trouble of working out how to do it. For those who cannot wait, here is the code I used:

function sProtovis($atts, $content = null) {
 extract(shortcode_atts(array('src' => '#'), $atts));
 return '<script type="text/javascript+protovis">'."\n".file_get_contents($src).'</script><noscript>Scripts disabled -- cannot display chart!</noscript>'.'<p align="center"><strong>'.do_shortcode($content).'</strong></p>';
}
add_shortcode('protovis', 'sProtovis');

It still relies on the Protovis code already being added into the header (as described above). In the plugin, this will no longer be necessary.

PLUGIN: pv-loader is now available on github.

* Protovis is a javascript data visualisation library being developed at Stanford, which allows the creation of interactive charts on web pages.

Experimenting with Protovis

A couple of weeks ago I gave a talk on using graphics in R. During the question session, someone asked whether I had tried using Protovis, a javascript data visualisation library being developed at Stanford. It was an easy question to answer: no!

However, a bit of subsequent investigation revealed that Protovis has been developed very much in the spirit of Leland Wilkinson’s book The Grammar of Graphics, which I am currently reading, so I have decided to experiment with it here on the blog.

The charts I generate with R are all static images, while a tool like Protovis allows for user interaction which opens up some interesting possibilities. Compared to R, which I have been using for around 10 years, Protovis presents a double challenge: not only do I have to come to grips with Protovis itself, but I will also have to learn some basic Javascript programming. So, I expect it to be a slow journey.

As a tentative first step, I have reproduced the CDO chart from a recent post ranting about bubble charts. At first glance, it is essentially identical to the chart I produced using R. However, if you hover your mouse over the points on the chart, you should see the figures appear! It is by no means perfect (for example, it would probably look better if single points appeared, rather than every point on the chart and it could do with a legend), but it’s a start and I will persevere.

[pvis src=”http://stubbornmule.net/scripts/pv/test.js” img=”http://stubbornmule.net/blog/wp-content/CDO-circles.png” height=”125px”]CDO deals: total and recycled[/pvis]

Producing scripts using a Javascript library does have its drawbacks. For a start, it means the chart will only be visible when scripts can be run, so if you are reading this in an email or an RSS news reader, you will probably not see very much and will have to visit the page on the blog to see it. Even then, some of you may use script-blockers such as NoScript which will also break the chart (mind you, you can trust the Mule, so you could always whitelist this site!). Finally, I believe that some older browsers (such as IE6) will not support Protovis. It would be useful to see how many people can or cannot see the chart, so please let me know using this poll whether you can see the chart.


(polls)

Getting Protovis to work on the blog was a little fiddly, so for anyone interested, I have also written up a quick guide to using Protovis on a WordPress blog.

UPDATE: Reports in so far indicate that the chart is not working in Google Chrome or on mobile devices. More work to do it would seem!

Keynes on Economics

I have always enjoyed the way John Maynard Keynes had with words. He was responsible for many a bon mot, such as “in the long run we are dead” (skewering the idea of long-run equilibrium in economics), “It is better to be roughly right than precisely wrong”, “Capitalism is the astounding belief that the most wickedest of men will do the most wickedest of things for the greatest good of everyone” and (my favourite) “Markets can remain irrational a lot longer than you and I can remain solvent”.

Today I read a rather scathing piece on the performance of economists in the lead up to and throughout the financial crisis, which included this rather longer but nevertheless brilliant quotation from Keynes.

The completeness of the [orthodox] victory is something of a curiosity and a mystery. It must have been due to a complex of suitabilities in the doctrine to the environment into which it was projected. That it reached conclusions quite different from what the ordinary uninstructed person would expect, added, I suppose, to its intellectual prestige. That its teaching, translated into practice, was austere and often unpalatable, lent it virtue. That it was adapted to carry a vast and consistent logical superstructure, gave it beauty. That it could explain much social injustice and apparent cruelty as an inevitable incident in the scheme of progress, [with] the attempt to change such things as likely on the whole to do more harm than good, commended it to authority. That it afforded a measure of justification to the free activities of the individual capitalist, attracted to it the support of the dominant social force behind authority. But although the doctrine itself has remained unquestioned by orthodox economists up to a late date, its signal failure for purposes of scientific prediction has greatly impaired, in the course of time, the prestige of its practitioners. For professional economists…were apparently unmoved by the lack of correspondence between the results of their theory and the facts of observation—a discrepancy which the ordinary man has not failed to observe, with the result of his growing unwillingness to accord to economists that measure of respect which he gives to other groups of scientists…

John Maynard Keynes, The General Theory of Employment, Interest and Money (1936; London: Macmillan, 1964) 32–3

I have a copy of the General Theory, which I have only skimmed. One day I really should read the whole thing. In fact, there’s even a Kindle edition for $3, so maybe that day is not too far away…

Photo credit: Wikimedia Commons.