The Hobbit Hole

In a hole there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.

3/29/2006

Scheme in Haskell

Filed under: Programming — bilbo @ 8:51 am

This too is more a note to self, and a bit of a plug for another blog.

This guy is interesting and has several good articles on programming, though I think this is my favorite so far.

Scheme in 48 hours using Haskell. Brilliant. I love Haskell, and I love Scheme. I feel like someone just figured out how to put the creme filling into the cupcake.

I haven’t gone through it yet. Way too much to do, but it’s on the short list. I’m thinking I might port it from Haskell to Clean, as Clean generates really fast code for a functional language, much faster than GHC for Haskell.

Still, that’s all in the future. The GMTL (man, I hate that name, but I don’t know what else to call it) is coming along. I’ve just about finished the generalized inversion code. Next is the special inversion code for orthonormal matrices and then the specialized conversions from euler angles and quaternions to matrices.

Reading: Jonathan Strange & Mr. Norrell. Not anywhere near finished, but the first hundred pages are really good.

3/22/2006

Magic Formula Investing

Filed under: Uncategorized — bilbo @ 11:31 am

Well, this is more a note to self than anything. I recently finished The Little Book That Beats the Market. It’s not on the MBA list, but it was an easy read. A well justified diversion.

The basic premise is to buy companies that are undervalued and hold on to them until the market catches up to them. Through a diversification of 20-30 companies, you’ll end up with a much higher return than the market average while mitigating most of the risk.

To validate this, Mr. Greenblatt ran his formula through the market data of the last 17 years. It’s not as long as many other systems have used. CANSLIM in particular has run over 50 years of data. Still, 17 years is pretty good.

It’s not surprising what he found. Buy enough cheap companies and eventually the market will correct the value of those companies, meaning you make money. The trick is finding “cheap” companies and then diversifying enough.

For those of us with less patience and market savvy, he gives a step by step process:

  1. Go to magicformulainvesting.com
  2. Choose a low end market cap and get a list
  3. Buy 5 to 7 of these companies. They are listed in alphebetical order, not by ranking of the formula, so choose among them, not just the top ones.
  4. Repeat this every two to three months until you own 20 to 30 stocks.
  5. Hold each stock for a year. (Note: if this isn’t a retirement account, then follow the advice in the book regarding when to sell.)
  6. Repeat.

The thing that isn’t explicit is how often to refresh the list. Do I get an initial list of 30, then just buy from that list, or every time I buy new stocks, do I generate a new list? I’m guessing generate a new list every time you buy.

The magic formula itself is a simple ranking system. It finds the “cheapest” stocks by looking for stocks with a high return on capital and a high earnings yield.

Return on Capital = EBIT*/(Net Working Capital + Net Fixed Assets)

Earnings Yield = EBIT / Enterprise Value

Each company was ranked by each criteria individually, and then a composite rating was generated from summing the individual rankings. Pretty simple stuff.

Ultimately, a method that beats the market means that it returns on average better yields than the S&P 500 over a period of time. So, what were the returns like for this method?

If you include all stocks of reasonable size, meaning market cap > $50 million, the last 17 years returned an average 30.8%. If you included only the largest 1000 stocks (market cap > $1 billion), to the average return was 22.7%. Not as good, but definitely beats the market.

The real key is longevity. During certain sampling periods the magic formula did indeed return negative results. It still beat the market, but it didn’t always make money. But, if the sampling period was lengthened to 3 years, the magic formula never lost money. It also means that it requires a 3 year commitment.

I’m going to try it. I have a bit of my retirement account set aside, and I plan on starting this April. I’ll keep you updated on the progress of my portfolio.

*Earnings Before Interest and Taxes

3/15/2006

Amazon Source Code Control?

Filed under: General — bilbo @ 3:14 pm

Wow, I’ve never heard of Amazon S3.  Storage available dirt cheap.  First thing I thought of was why hasn’t someone built a Subversion interface to this thing?  Or perhaps some other sort of source code control?

Or perhaps a blogging engine on the thing?  I don’t know.  Sounds too good to be true.  Maybe it’s not as cost effective as I am believing it to be.  I’d have to run the numbers.

3/14/2006

Emacs

Filed under: Programming — bilbo @ 12:54 pm

I use Emacs. It’s supposedly the editor for smart people.

All of the greatest engineers in the world use Emacs. The world-changer types. Not the great gal in the cube next to you. Not Fred, the amazing guy down the hall. I’m talking about the greatest software developers of our profession, the ones who changed the face of the industry. The James Goslings, the Larry Walls, the Paul Grahams, the Jamie Zawinskis, the Eric Bensons. Real engineers use Emacs. You have to be way smart to use it well, and it makes you incredibly powerful if you can master it. Go look over Paul Nordstrom’s shoulder while he works sometime, if you don’t believe me. It’s a real eye-opener for someone who’s used Visual Blub .NET-like IDEs their whole career.

I don’t feel that smart. I will admit to its transcendental quality. It is the 100 year editor. It will long outlast most other tools.

As much as I admire it, I find that I use different tools for different jobs. I admit I could probably do all of these in Emacs, but some of these tools are so incredible, why would I want to? I mean, they were written for a purpose. My tools for writing (not running or debugging), depending on what I’m writing, are the following:

Some people might see the lack of Microsoft products in the above and assume that I am anti-MS or somesuch. They would be wrong. I just don’t have the money to buy the tools they offer.

In other words, use the tools that work best for the job. I’m interested to hear what you use.