March 01, 2007

Indexing and Risk

Investment academics for the last few decades have preached the religion that the only way to win in investing is to diversify away your risk. In other words, they tell everybody to use indexing (and that sort of thing) instead of stockpicking.

To me, this seems a little bit defeatist, maybe even intellectually lazy, a way of saying "just put your money where everybody else has already put it." So my question is always, "what happens when everybody indexes their money?" What happens when everybody stops thinking and just starts to mimic the average as closely as they can?

In "Ahead of the Tape" in today's WSJ, Justin Lahart muses on the rocky market in the last day or two. And he proposes a hint of an answer to my question:

By deliberately investing in assets that have shown little correlation in the past, investors may be making those assets more correlated, says Craig Asche, executive director of the Chartered Alternative Investment Analysts Association. If investors find that, say, Pet Rock and corn-dog prices tend to be uncorrelated and decide to invest in both as a result, they will end up driving prices for the rocks and dogs up together.

Once everybody diversifies, is it a surprise when diversification doesn't work as well as it is supposed to?

Maybe investments shouldn't go where the money already is. Maybe us investors need to be thinking about where the money will have the biggest future impact.

Posted by David at 08:42 AM | Comments (2)

March 05, 2007

Boston is Expensive

We are cleaning up our house here in the suburbs of Philly to get it ready to sell. I don't think it is going to fetch a price comparable to what housing costs in Boston, though - Boston really is much more expensive.

Today I came across this graph that captures the situation well:

This was part of a report produced by the Pew Charitable Trusts comparing Philadelphia to the other cities in the chart. The report is an interesting read, providing a civic-minded take on the health of these seven old East-coast cities. They looked at the strength and makeup of the communities, trends in education, crime, and migration, and the state of governance and leadership.

Pew's summary on Boston: it is expensive to live there, the traffic is bad, and the gridlocked local governments make it hard to solve those problems. Otherwise, it is a fine place.

Posted by David at 11:03 PM | Comments (5)

March 11, 2007

Python String Functions

What use are python function decorators? Here is something fun: we can use them for speedy string templates. What follows is a further development of the templet python string-template idea. I find these techniques useful when building HTML and XML pages.

Here is a @stringfunction function decorator:

from templet import stringfunction

@stringfunction
def poem(jumper, jumpee="moon"):
  "The $jumper jumped over the $jumpee."

The @stringfunction decorator transforms "poem" into the following function:

def poem(jumper, jumpee="moon"):
  out = []
  out.append("The ")
  out.append(str(jumper))
  out.append(" jumped over the ")
  out.append(str(jumpee))
  out.append(".")
  return ''.join(out)

The decorator saves quite a bit of typing! In this implementation of @stringfunction, handy ${...} and ${{...}} syntax allows us to embed arbitrary python code, so we can make our templates as powerful as we need them to be. If we want to introduce complicated logic, our code can use "out.append(text)" to build up the string by hand.

The templates we get this way have all their parameters nicely-declared so they are easy-to-call and so misspellings get caught. These function templates are also far faster than the most popular template solutions, benchmarking more than four times faster than Django templates, python's string.Template templates, or the v1 templet classes. And we can use them by importing just one small python module, with no hacking of the import path mechanism or other major surgery.

Continue reading "Python String Functions"
Posted by David at 01:37 PM | Comments (11)

March 17, 2007

Still Waiting For A Wii?

Midna is our favoriteAnybody out there still trying to get a Wii?

My brother recently got a Wii. We mailed him all our extra games (Madden, Red Steel, and the rest of a big pile of games I had to buy in a bundle to get my Wii), so he is all set for gaming fun.

But he will have to buy his own copy of Zelda. We have been playing that game for about 100 hours (with the help of the hint book) and we are still not done. It is like watching the Fellowship of the Ring trilogy ten times over.

Zelda Twilight Princess is a good game. We sort of play it as a team, reading tips out of the hint book to each other, and the kids are very into the characters. Last weekend the kids xeroxed hintbook pages to make paper cutouts of Link, Zelda, Midna, Colin, Beth, Malo, Talo, Russel, and Zant. Why not? Just as fun as playing Gandalf and Frodo.

And the minigames.... Have any Zelda players out there beat RoalGoal yet?

So my brother got his Wii. But they still don't seem very easy to get. To get his, he had to visit several K-Marts early in the morning. I wondered if it would be possible to buy one "the normal way," so I visited EBGames the other day.

"No we don't have any. No Wii's. Come back in April."

I find this remarkable. It is three months past Christmas. The unobtainable Christmas hot-item TMX Elmo is easy to get. Yet the Wii is still absent everywhere.

Posted by David at 08:41 AM | Comments (4)

March 18, 2007

Politics in a YouTube World

The story behind this anti-Hillary video is fascinating. From yesterday's San Francisco Chronicle:

It may be the most stunning and creative attack ad yet for a 2008 presidential candidate -- one experts say could represent a watershed moment in 21st century media and political advertising.

Yet the groundbreaking 74-second pitch for Democratic Illinois Sen. Barack Obama, which remixes the classic "1984" ad that introduced Apple computers to the world, is not on cable or network TV, but on the Internet.

And Obama's campaign says it had absolutely nothing to do with the video that attacks one of his principal Democratic rivals, New York Sen. Hillary Rodham Clinton. Indeed, the ad's creator is a mystery, at least for now.

This is why 2008 won't be like "1984..."

Continue reading "Politics in a YouTube World"
Posted by David at 03:44 PM | Comments (1)

March 25, 2007

Bruce Sterling's Rant

How will the 21st century be different from the 20th? Will it be better?

The history of the last century was traced units of energy: it was all about kilowatts, barrels and megatons.

Maybe the history of the 21st century will be traced in bits. Instead of electrification and automobiles, the 21st century citizen is experiencing internetification and the incredible shrinking computer. But we are just at the start of harnessing the bit. What will be the power politics of the 21st century? What will trigger the wars of the next 50 years?

I found Bruce Sterling's SXSW's rant very entertaining. But I think it also provided a glimmer of insight on our future....

Continue reading "Bruce Sterling's Rant"
Posted by David at 08:17 AM | Comments (0)

March 27, 2007

Kid's Garden Bench

It's springtime! On Sunday the kids threatened to stay inside all day playing video games, but Dad had a different plan.

All winter long we have had a few pieces of extra lumber stacked outside the house just waiting to be used (they were left over from last year's treehouse project). So after breakfast I told the kids we were going outside to build something, and I sketched a picture of a garden bench.

Piper Lays Out The Alternatives

But as soon as she saw me drawing plans, five-year old Piper knew she could do better. So she grabbed her own piece of paper and drew some benches too. Instead of just drawing one bench, she drew two benches, complete with little arrows marked with dimensions (just like Daddy's, except with fantastical numbers).

"We can build either one," she explained, pointing to her two drawings. "A big grown-up bench with no arms" - her first drawing looked just like mine - "or a small bench with arms...."

Continue reading "Kid's Garden Bench"
Posted by David at 07:33 AM | Comments (1)