Tuesday, August 31, 2010

DrRacket: Getting started with classes

#lang racket

;;;; A simple example of defining and using classes in Racket
  
(define point%
  (class object%
    (super-new)
    (init-field (x 0) (y 0))
    (define/public (radius)
      (sqrt (+ (* x x) (* y y))))))

(define p (make-object point%))
(set-field! x p 3)
(set-field! y p 4)
(send p radius)
(get-field x p)

Sunday, August 29, 2010

TMF: Re: Pyad talks cyclicals / Value Shares

TMF: Re: Pyad talks cyclicals / Value Shares

Discussion of F&C Asset Management.

A filter

Here's a filter I saw on the MFI Yahoo group:

Try Jamie Gritton's backtester

http://www.backtest.org/

Under "Screen Builder" enter the following inputs:

Market cap > $50 million (mcp > 50)
PE bottom 25% of companies (cpe bottom 25%)
ROA top 25% of companies (nin/tas top 25%)
Starting month = January
Holding period = 12 months
Timeliness = 1-5

The average annual returns for the period 1989 through 2009 are:

S&P 500, 10.8%
Little Book Table 6.1 plus updates from website, 21.7%
Gritton screen above, 19.0%

See if you can add/modify the screening criteria to achieve a higher return. 

A few of suggestions for better perspective: 

1.  In order to get apples-to-apples comparisons try to get about the same number of companies passing the screens.  In general, you don't want to compare screens that pass 5 companies with screens that pass 50 companies.

2.  Run 12 month screens starting in January, April, July and October and average the results.

3.  Run the opposite conditions to see the change from the top tier to the bottom tier.  For example,
cpe bottom 25% and nin/tas top 25%--> CAGR = 15
cpe top 25% and nin/tas bottom 25%---> CAGR = 9
 
I hope this is helpful.

Wednesday, August 25, 2010

Creating tables in Racket webserver

I'm starting a journey into creating websites using DrRacket. Sometimes its documentation is a little opaque. If you're looking to create tables that look like this:
then you can do it using the following code:
#lang web-server/insta

(define (start request)
  `(html (head (title "Table test"))
         (body
         
          (h1 "Example 1")
          (p "The most basic of tables:")
          (table (tbody
                  (tr (td "one") (td "two"))
                  (tr (td "three") (td "four"))))
         
          (h1 "Example2")
          (p "Let's add some attributes: a table border, some cell spacing, and a width and background colour to one of the cells:")
          (table ((border "1") (cellspacing "10"))                 
                 (tbody
                  (tr (td ((width "100") (bgcolor "#FF6699")) "one") (td "two"))
                  (tr (td "three") (td "four"))))
            
         
          )))

Monday, August 16, 2010

FT - the puzzle behind the valuations of bule chips

Quoting from John Plender in the FT on Wed 11-Aug-2010:
Market behaviour is singularly unfriendly to conventional investors at presetn. Asset prices, whether of equities, bonds or alternative investments such as commodoties, go up and down in lockstep in a Pavlovian response to central bankers tweaking the monetary tap. Yet when prices goe down, many investors feel that nothing looks that cheap.

The obvious expception, I would argue, is that of quality stocks in the US and much of Europe, which are not on demanding ratings. ... It is as if, he [Jeremy Grantham of GMO] says, there is an extra and unusual force working againgst them. ... The first concerns population."
His first explanation is a bit daft, so I omit it.
The second explanation is that institutional investors have been following the strategy of the Yale Endowment by putting more of their portfolios into private equity, hedge funds and real estate, while within their equity investments they have been increasing exposure to foreign equities. Hedge funds, of course, are not paid to buy Coca-Cola, while private equity firms do not invest in big companies with hallowed brands.Old fashioned blue chips ... are being liquidated to pay for this portfolio shift.

This is fine, as far as it goes, but the puzzle can also be approached from another angle - that of the dwindling number of investors whose strategy involves buying low and selling high. ... Then there are the momentum traders, fund managers who follow short-term trends to minimise their business risk as opposed to maximising clients' returns. Paul Woolley ... has shown how such fund management principal-agent issues contribute to mispricing and market inefficiency.

Sunday, August 15, 2010

FT - House price affordability

According to the FT on We 11-Aug-2010:
In 2008, the median house in England cost seven times the median annual income, nearly double the ratio a decade earlier

Public Git Hosting - sbcl/llvm.git/blob - README.LLVM

Public Git Hosting - sbcl/llvm.git/blob - README.LLVM

Old Nabble - clisp-list - libffcall

Old Nabble - clisp-list - libffcall

Inverurie retailers

I paid a visit to Inverurie today, Sunday, at 10.30am, to see how the retilaers were doing. My main port of call was Inverurie Business Park, which had the retailers Acorn, Argos, Currys, Halfords, Homebase, Lidl . there were a couple of vacant retail units. I was particularly interested in Halfords from an investment viewpoint.

I noticed two things about all the units: they were clean, but fairly empty; Currys particularly so.


Acorn Pet Centres is a pet food retail chain. It also sells pet toys. It doesn't sell pets; except for fish and rats. It is a privately owned company.

Argos is owned by Home Retail Group.

Currys is owned by DSG International. I noted that an LG 32" 1080p LCD TV cost £349. A Samsung 46" 1080p LED back lit TV sold for £1199.

Homebase is owned by Home Retail Group. I noted that a smooth buff paving slab 400x400mm cost £2.99 each.

Lidl is German company.

I walked around the rest of Inverurie, and made the following notes.

Poundland is a British based variety chain. It is owned by an American company. It was quite busy.

Superdrug was closed.

Marks & Spencers mainly sold food, and it was not that busy.

Tescos was doing reasonable business, though, and seemed the most successful business out of all that I visited. It even sold windscreen wiper blades.

Spotting Profitability With ROCE

Spotting Profitability With ROCE

Thursday, August 5, 2010

Influence: The Psychology of Persuasion: Amazon.co.uk: Robert Cialdini: Books

Influence: The Psychology of Persuasion: Amazon.co.uk: Robert Cialdini: Books

"Influence", the classic book on persuasion, explains the psychology of why people say "yes" - and how to apply these understandings. Dr. Robert Cialdini is the seminal expert in the rapidly expanding field of influence and persuasion. His thirty-five years of rigorous, evidence-based research along with a three-year program of study on what moves people to change behavior has resulted in this highly acclaimed book. You'll learn the six universal principles, how to use them to become a skilled persuader - and how to defend yourself against them. Perfect for people in all walks of life, the principles of "Influence" will move you toward profound personal change and act as a driving force for your success.

Human DNA as C code

Human DNA as C code

Very funny.

Wednesday, August 4, 2010

BATS - ROE

I thought it would be interesting to break down the last 10 years of BATS (British American Tobacco). Presented below is a list of years, together with the median ROE of its last 3 years:


YEAR    ROE%
2003    29.2
2004    32.2
2005    32.2
2006    31.3
2007    31.3
2008    31.3
2009    32.2
2010    37.2

As you can see, BATS has enjoyed high returns on equity, which seem to be getting even better. As you might expect, its share price has done rather well over the period. Over 10 years to 1 Aug 2010, the Footsie returned -17% (dividends excluded), whilst the share price over the same period rose 448% (dividends also excluded). The PER started out at 9, and has since risen to 13. So some of the increase is due to the PER re-rating. Nevertheless, the share price has done well on account of the rising earnings of the company, assisted by the high ROE.