Sunday, December 26, 2010

Warren Buffett on Gold

Following up on gold, here are a couple of interesting perspectives on gold from the world's most famous investor.
Gold gets dug out of the ground in Africa, or someplace. Then we melt it down, dig another hole, bury it again and pay people to stand around guarding it. It has no utility. Anyone watching from Mars would be scratching their head.
And another:
You could take all the gold that’s ever been mined, and it would fill a cube 67 feet in each direction. For what that’s worth at current gold prices, you could buy all — not some — all of the farmland in the United States. Plus, you could buy 10 Exxon Mobils, plus have $1 trillion of walking-around money. Or you could have a big cube of metal. Which would you take? Which is going to produce more value?”

Thursday, December 23, 2010

Is gold a good investment at these prices?

Here (pdf) is a balanced viewpoint by Howard Marks of Oaktree. You can suspect a bona fide attempt to look at all sides of the argument, when he starts with:
In 1952, Noah S. “Soggy” Sweat, Jr., a member of the Texas House of Representatives, was asked about his position on whiskey.  Here’s how he answered: 
If you mean whiskey, the devil’s brew, the poison scourge, the bloody monster that defiles innocence, dethrones reason, destroys the home, creates misery and poverty, yea, literally takes the bread from the mouths of little children; if you mean that evil drink that topples Christian men and women from the pinnacles of righteous and gracious living into the bottomless pit of degradation, shame, despair, helplessness, and hopelessness, then, my friend, I am opposed to it with every fiber of my being.  
However, if by whiskey you mean the oil of conversation, the philosophic wine, the elixir of life, the ale that is consumed when good fellows get together, that puts a song in their hearts and the warm glow of contentment in their eyes; if you mean Christmas cheer, the stimulating sip that puts a little spring in the step of an elderly gentleman on a frosty morning; if you mean that drink that enables man to magnify his joy, and to forget life’s great tragedies and heartbreaks and sorrow; if you mean that drink the sale of which pours into Texas treasuries untold millions of dollars each year, that provides tender care for our little crippled children, our blind, our deaf, our dumb, our pitifully aged and infirm, to build the finest highways, hospitals, universities, and community colleges in this nation, then my friend, I am absolutely, unequivocally in favor of it.  
This is my position, and as always, I refuse to compromise on matters of principle. 
Sweat’s response shows, depending on how you look at it, either how views can diverge on a given subject or how differently a tale can be spun.  Thus it serves well to introduce the topic of this memo: gold.  
And a little further on:
My view is simple and starts with the observation that gold is a lot like religion.  No one can prove that God exists . . . or that God doesn’t exist.  The believer can’t convince the atheist, and the atheist can’t convince the believer.  It’s incredibly simple: either you believe in God or you don’t.  Well, that’s exactly the way I think it is with gold. Either you’re a believer or you're not.
 It is a great read. Check it out.

Friday, December 17, 2010

Least Squared or Absolute Errors

It is almost impossible to escape linear regression: the act of fitting straight lines through scattered data.

The question of whether it is more appropriate to use minimization of squared or absolute error to determine the straight line, popped up yet again in a recent reviewer comment.

It feels "natural" to use least-squared error, since we have all done it so many times. However, it should be borne in mind that the popularity of this criterion usually arises from the convenience it affords, and not because it lays any special claim to uncovering the truth.

Here is a nice post (+comments), which explores the issue more fully. To nudge you to check out the post, here is a fascinating picture.

Friday, December 10, 2010

Renaming Linux files in bulk using wildcards

Until yesterday, I was completely unaware of a useful linux utility called rename. In its place, I used either mv, or mv embedded in a shell script. But clearly, it is a cleaner way of renaming files in bulk.

And it is never to late to discover a useful tool.

Here is one situation where rename is handy. If you had a bunch of files file1, file2, ..., file500, and you wanted to pad zeros to rename these files to file001, file002, ..., file500, you could do that easily with:

rename file file00 file?
rename file file0 file??

or alternatively using regular expressions:

rename ’s/file/file00/’ file?
rename ’s/file/file0/’ file??

It essentially has the following syntax

rename oldname newname *.files
rename "regex-rule" files


Check out these tutorials which explain the rename command with some examples.

One tip I discovered is that the regex syntax works well with Debian based distros (like Ubuntu). Since my desktop at work runs CentOS (RedHat based), it doesn't work quite as well (the other syntax works just fine).

To circumvent the problem, you could download the rename.pl file and run it as shown here.

Thursday, December 2, 2010

Links:

(i) Ten questions science must answer: Another top-ten list on some of most enduring scientific questions, compiled this time on the occasion of the 350th anniversary of the Royal Society. Somewhat superficial.

(ii) Are complex economic models the answer?: Aswath Damodaran offers a counterpoint to a recent WSJ piece on the need for more complex economic models.
To those who believe that complex models with more variables are the answer to uncertainty, my response is a paper by Ed Lorenz in 1972, entitled Predictability: Does the flap of a butterfly's wing in Brazil set off a tornado in Texas?, credited with creating an entire discipline: chaos theory. In the paper, Lorenz noted that very small changes in the initial conditions of a complex models created very large effects on the final forecasted values. Lorenz, a meteorologist, came to this recognition by accident. One day in 1961, Lorenz inputted a number into a weather prediction model; he entered 0.506 as the input instead of 0.506127, expecting little or no change in the output from the model. What he found instead was a dramatic shift in the output, giving rise to a Eureka moment and the butterfly effect.

(iii) The sayings of Mikhail Zhvanetsky: Some precious one-liners. Not all are new, and some may have priority issues. But fun anyway. Here are some:
  • I drive too fast to worry about cholesterol.
  • The highest degree of embarrassment? Exchanged glances in a keyhole.
  • Of two evils, I choose the one I haven’t tried before.
  • Good always wins over evil. Hence, the winner is always good.