Saturday, July 31, 2010

Evaluating a scheme buffer - gnu.emacs.help | Google Groups

Evaluating a scheme buffer - gnu.emacs.help | Google Groups


> I would like to write an emacs function to evaluate a buffer that it
> in scheme mode; let's call it eval-scheme-buffer . Even better would
> be to write a function eval-buffer that evaluates a buffer in whatever
> mode the buffer is in (like Common Lisp). I am using inferior modes
> here.

> How is this done?

Have a look at inf-lisp.el where lisp-eval-region and others are defined.

Naive Bayes classifier - Wikipedia, the free encyclopedia

Naive Bayes classifier - Wikipedia, the free encyclopedia

A Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem (from Bayesian statistics) with strong (naive) independence assumptions. A more descriptive term for the underlying probability model would be "independent feature model".

In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is unrelated to the presence (or absence) of any other feature. For example, a fruit may be considered to be an apple if it is red, round, and about 4" in diameter. Even if these features depend on each other or upon the existence of the other features, a naive Bayes classifier considers all of these properties to independently contribute to the probability that this fruit is an apple.

Thursday, July 29, 2010

Magic Formula Investing: Will It Work? - The Finance Buff

Magic Formula Investing: Will It Work? - The Finance Buff

The problem with this magic formula is that it does not prevent you from selecting losers. It’s a pure statistic method which, as far as we are concerned, is open to further improvement.

Determining which stocks are undervalued or which are justly beaten up, is a very difficult task, which we believe is best executed by people who know the company very well, the insiders. What’s even more important about inside tradings is that when executives bought shares in their own companies, the stock tended to outperform the total market by 8.9% over the next 12 months. Conversely when they sold shares, the stock underperformed the market by 5.4% (Nejat Seyhun, a renowned professor and researcher in the field of insider trading at the University of Michigan).

Wednesday, July 28, 2010

Net Working Capital Strategy: Historical Perspective « Stableboy Selections

Net Working Capital Strategy: Historical Perspective « Stableboy Selections

Economics of green energy

Why did Warren Buffett pay $44bn for a ticket to ride? - Telegraph

Saw this interesting comment about wind and solar energy (not written by Buffett, though):

Let's not forget that energy storage is quickly becoming a piece of the energy puzzle. As a company which stores and transports unsold energy from wind and solar producers, the train is our "Supertanker", bringing the energy in SeaLift containers to our facilities via road, rail, barge and ship.

Tactical use of stored wind and solar energy is expensive, however, it requires about $360 per linear foot to put in high voltage transmission lines, so even the current $500 per Kwh cost of storage would be competitive, though not very profitable. As the cost of storage is expected to be 1/3 of the current cost in 3 to 5 years, the more volume you can move, the more energy you can deliver-all without nuke, gas or coal plants being built. Many energy "farmers" would otherwise remain "off-the-grid". After storing this energy it can be moved anywhere it is needed and can fetch a higher tariff, like from a wind farm into a major metro area. Perhaps as Mr Buffett owns a mid-American power utility and a chunk of GE and BYD Cars (China), he is also thinking about the future of transportable green energy (which could also power the train BTW) and its by-products.

Tuesday, July 27, 2010

Evaluating a scheme buffer - gnu.emacs.help | Google Groups

Evaluating a scheme buffer - gnu.emacs.help | Google Groups

> I would like to write an emacs function to evaluate a buffer that it
> in scheme mode; let's call it eval-scheme-buffer . Even better would
> be to write a function eval-buffer that evaluates a buffer in whatever
> mode the buffer is in (like Common Lisp). I am using inferior modes
> here.

> How is this done?

Have a look at inf-lisp.el where lisp-eval-region and others are defined.

Take the ROCE road to bypass debt - Intelligent Investor

Take the ROCE road to bypass debt - Intelligent Investor

How do you tell a good company from a bad one? It’s a fundamental question every investor must come to grips with and there’s no easy answer because each company is different. However, if asked to nominate just one financial ratio, many would select return on equity, or ROE as it’s commonly abbreviated.

We looked at ROE and its stablemate, return on capital employed (ROCE), in the second of a three-part series on ‘corporate metabolism’ starting in issue 169. Both can be indicators of economic strength. A company with a high return on its invested capital is more likely to generate better returns for its owners. Generally speaking, that’s because it will require less capital to maintain or grow its business.

Damodaran Online: Home Page for Aswath Damodaran

Damodaran Online: Home Page for Aswath Damodaran

I am a Professor of Finance and David Margolis Teaching Fellow at the Stern School of Business at New York University. I teach the corporate finance and equity valuation courses in the MBA program as well as occassional short-term classes around the world on both topics. I received my MBA and Ph.D degrees from the University of California at Los Angeles. My research interests lie in valuation, portfolio management and applied corporate finance. My papers have been published in the Journal of Financial and Quantitative Analysis, the Journal of Finance, the Journal of Financial Economics and the Review of Financial Studies, though I am sure that the list of people who have read these articles is a short one.

DrRacket: Obtaining the contents of the clipboard

It's as simple as doing this:
(send the-clipboard get-clipboard-string 0)

Monday, July 26, 2010

Wapedia - Wiki: Office suite

Wapedia - Wiki: Office suite

Alternatives to MS Office.

Webs - Make a free website, get free hosting

Webs - Make a free website, get free hosting

Create your own website for FREE!

Buying Defensive Stocks

Buying Defensive Stocks

A defensive stock is normally associated with a company that belongs to an industry or market sector that is unaffected by business cycles. That is to say, consumer demand for their products or services exists no matter how good or how bad the economy is performing.

Defensive stocks are the opposite of cyclical stocks - whereby the financial health of cyclical companies move in-sync with the health of the economy. That's why these stocks are also referred to as non-cyclical stocks.

Investing in Cyclical Stocks

Investing in Cyclical Stocks

For any value investor schooled at the feet of Benjamin Graham, it's understood that when buying a stock, you want its price-to-earnings ratio -- the measure of a stock's price to its profits -- to be as low as possible. In his classic investing opus Security Analysis, Graham wanted stocks whose P/E ratio was less than 40% of the average P/E for all stocks over the past five years. For Graham and value investors, it was in the low price-to-earnings realm that you found your "margin of safety."

The trick with buying a cyclical stock, however, is to catch the wave just after it's crashed into the shore and the stock price has been annihilated by the end of the boom cycle. You want it when its P/E ratio is high.

Huh? Didn't we just say that low-P/E stocks had the greatest margin of safety? Well, with cyclicals, the reverse is true.

Sunday, July 25, 2010

Dream about hell

I had a strange dream last night. A wretched man was lying down on his back. Another man had his hands wrapped around his ankles. He explained that even merely tickling the wretched man would cause the flesh to fall off of him. I'm not sure if the wretched man was a denizen of Hell, or a ghost. It reminded me of a story about Hell where victims are crushed, or have their bodies sliced.

Saturday, July 24, 2010

How To Invest Like Warren Buffett And Peter Lynch

Here's an interesting YouTube vid "How To Invest Like Warren Buffett And Peter Lynch":
http://www.youtube.com/watch?v=a-q17Ag0Ojc

Warren Buffetts general strategy is supposedly outlined in it. Here's what Buffett looks for, allegedly, according to the vid:
- consistent earnings pattern over 10 years - look for earnings predictability for the future - which should be steadily increasing earnings
- high ROE over 10 years
- debt which can be repaid within 2-5 years out of the earnings of the company, which is an interesting take on financial leverage

Unfortunately, he doesn't mention what PE ratio is acceptable. I suspect that it's higher than the usual "bargain bucket" prices that value investors are interested.

Despite the vid title, Lynch isn't really mentioned.

Monday, July 19, 2010

Small companies look relatively cheap

I decided to have a look to see how the price of small companies compared to large companies. I obtained the median PE of companies whose market cap was in the range £100-200m, and compared them with the median PE of companies in the Footsie. Here's what I discovered ...

There are 130 companies in the £100-200m market cap range. The median PE is 9.
My database returned 98 companies in the Footsie (maybe a slight anomoly because there should, of course, be 100 of them), and I obtained a median PE of 13.

So large caps are 44% (=13/9) "more expensive" than small caps. Interesting, no?

Wednesday, July 14, 2010

Tuesday, July 13, 2010

Crystal Amber Fund - Home

Crystal Amber Fund - Home

Welcome to Crystal Amber Fund
An activist fund taking stakes in undervalued companies and taking action to enhance value.

Z Score Altman Z Score - The Insolvency Predictor - Credit Guru

Z Score Altman Z Score - The Insolvency Predictor - Credit Guru

In the early 60's Edward Altman, using Multiple Discriminant Analysis combined a set of 5 financial ratios to come up with the Altman Z-Score. This score uses statistical techniques to predict a company's probability of failure using the following 8 variables from a company's financial statements:
The ones in Green are from the Income Statement and the ones in Red from the Balance Sheet

How to invest like Peter Lynch - MSN Money

How to invest like Peter Lynch - MSN Money

Browse for books

Browse for books

Bookmooch: give books, and receive them for free.

Sunday, July 11, 2010

anti-telemarketing EGBG counterscript

anti-telemarketing EGBG counterscript

The Direct Marketing sector regards the telephone as one of its most successful tools. Consumers experience telemarketing from a completely different point of view: more than 92% perceive commercial telephone calls as a violation of privacy.
Telemarketers make use of a telescript - a guideline for a telephone conversation. This script creates an imbalance in the conversation between the marketer and the consumer. It is this imbalance, most of all, that makes telemarketing successful. The EGBG Counterscript attempts to redress that balance.

Saturday, July 10, 2010

TMF: Lie, damn lies, and statistics / Investment Strategies

TMF: Lie, damn lies, and statistics / Investment Strategies

I was on the lookout for "good companies", and maybe not so good. "Good" is usually defined as "high returns on capital" - but I've looked at a few companies, and I'm amazed at how many cruddy ones have high ROCEs. Some ROCEs look bizarre - too true to be good, as my old Physics teacher would sometimes say.

I decided to have a look, instead of at ROCEs, which seemed to throw up some suspiciously high numbers, and looked at operating margines. I looked at median margins for, usually, the last 10 years, and the margins now. I also looked at the share price rise, the PE "then", and the PE "now". I also recorded the dividend yield. I selected a ragtag bunch of companies that had crossed my path for one reason or another. Well, here's some stats:


EPIC OPER SHARE PER YLD
MARGIN PRICE THEN NOW %
% CHNG
MED NOW %

AZN 27 35 2 29 8 3 AstraZeneca
BA. 9 10 -22 18 7 5 British Aerospace
BATS 10 31 404 9 13 8 Brit Amer Tobacco
BAY 5 -2 -47 32 NA 0 Brit Airways
BLT 22 24 595 12 12 3 BHP Billiton
BP. 10 10 -40 16 6 6 BP (who could resist including that)
BWY 17 6 -16 6 23 0 Bellway
CLLN 1 2 137 15 9 4 Carillion
FCAM 24 21 -82 23 8 11 F&C Asset Management
GSK 31 32 27 30 9 5 Glaxo
NICL 10 17 96 7 16 3 Nichols (they make Vimto)
TSCO 5 5 85 22 12 3 Tesco
XTA 23 19 -5 14 8 0 Xstrata (miners)



It's very interesting to get some historical perspective on this, and a mix of inductries.

It's a very mixed bag of companies and results, which makes it very interesting to look at. I think one thing is very clear: don't overpay for a business! Look at AZN and GSK. They've had huge operating margins - around 30% - but have been medocre performers (AZN is up just 2% in 10 years, and GSK only 27%. That's a measly capital appreciation of just 2% pa). This is explained by the drastic re-ratings that their PERs have undergone, going from 30 to about 9. Look at their operating margins, though. Despite the fears of cheap Indian copycat drugs, they are still earning operating margins in the 30% range. At PERs in single digits, they look quite undervalued looking at the kind of margins they earn.

The miners are quite interesting, too. BLT and XTA have operating margins in the 20's, which seems quite high considering that I heard that margins on miners are quite low. Special mention should also go to BP. It's margins are at about median for its decade. It's lost about 40% of its value over the decade, as the PE has gone from 16 to 6. No prizes for guessing for why that is.

What's also interesting to look at are the bad earners. Companies like BAY and CLLN are really bad at generating profits, and TSCO is no dynamo, either. Difficult to imagine that BAY was on a PE of 32 all those years ago. It doesn't look like it was an "especially" bad year for them, either; a possible source of distorted PE ratio.

BWY is a bit of an interesting company - it's a housebuilder. It's median operating margin is actually not so bad, at 17%. It's PE is currently 23 - but that's due to current low earnings.

Tuesday, July 6, 2010

An 'Eat Well, Sleep Well' Portfolio - 03/06/2010

An 'Eat Well, Sleep Well' Portfolio - 03/06/2010

15 income picks to put your mind at rest.

Decent income shares should permit an investor to both eat well and sleep well, reckon portfolio managers and stockbrokers Collins Stewart Wealth Management. And the emphasis is on both eating well and sleeping well, it stresses.

Because merely picking the highest yielders isn't a strategy for sleeping well, it notes. "While indiscriminate holders of last year's highest yielders may now be grating white truffle on to every meal, they will undoubtedly have arrived here tortuously underslept," the firm observes, wryly.

When Collins Stewart ran its 'eat well, sleep well' screen last summer, just nine stocks were thrown up, four of which the firm the firm discarded for either company-specific or sector-specific reasons.

Economics Explained In 90 Seconds - 03/06/2010

Economics Explained In 90 Seconds - 03/06/2010

STARTER-PACK - My personal Common Lisp "newbie" guide

STARTER-PACK - My personal Common Lisp "newbie" guide

STARTER-PACK - My personal Common Lisp "newbie" guide



Abstract

This is an attempt to help Common Lisp newcomers getting started. The aim is to quickly set up a comfortable working environment which includes a couple of useful and/or popular open source libraries. It is targeted at the Microsoft Windows platform (but see below) and obviously heavily influenced by the author's personal preferences.

If you're using this document and the accompanying application, I'd like to hear from you. Whether you like it or not, feedback is always appreciated. See my homepage for my email address.

Sunday, July 4, 2010

Correlation of ROEs from year to year

In "The Little Book That Beats The Market", Greenblatt assumes that a good ROCE one year implies a good ROCE next year. To test this hypothesis, I took 30 companies from the Footsie (the first 30 alphabetically), and recorded their EPIC code, ROE1 (ROE for the latest year) and ROE0 (ROE for the year before that). I then plotted ROE0 against ROE1. Here's the graph:
As you can see, there's a lot of correlation. So companies doing well continue to do well, and companies doing badly continue to do badly. Here's the raw data:

EPIC    ROE0    ROE1
AAL    25    9
ABF    9    9
ADM    52    52
AGK    26    28
ARM    9    9
AU.    13    14
AZN    46    29
BA.    18    30
BARC    4    5
BATS    37    40
BAY    -18    -16
BG.    24    15
BLND    8    5
BNZL    27    26
BP.    28    13
BRBY    24    26
CCL    12    8
CNA    20    26
COB    14    22
CPG    18    21
CPT    51    51
CSCG    5    3
DGE    43    51
EMG    24    11
ENRC    32    13
EXPN    35    29
GFS    15    29
GSK    73    61


Understanding Insurance companies

General Insurers (aka Nonlife insurance) - e.g. RSA - defensive stocks that generally do well in a recession. Tend not to invest in equities.

Life Assurers -e.g. Aviva - tend to follow the stock market more closely and invest in a lot in equities. The issue policies that pay out a lump sum in the event of someone's death.

fit-PC is Fanless, Quiet and Green - SlipperyBrick.com

fit-PC is Fanless, Quiet and Green - SlipperyBrick.com

The fit-PC is designed as a small, quiet and eco-friendly computer that fits into a niche where most computers do not. The computer is about the size of a paperback book at 120 x 116 x 40 mm and weighs only 450 grams. It also runs almost silently since it doesn’t require any cooling fan.

The case of the fit-PC is dust and splash resistant and also acts as a heat sink to prevent the machine from getting to hot, negating the need for cooling fan altogether. This also will cut down on your electric bill since it only draws about 5 Watts of power. The company advertises it as a maintenance-free PC designed to run 24/7.

The box comes pre-loaded with Linux but it has the hardware to support Windows XP if you want. The specs include a 40 GB hard drive (this has to make a little noise), two 100 Mbps ethernet ports, an SXGA graphics controller with 1920 x 1440 resolution, 2 USB 2.0 ports, audio in/out, an RS-232 serial port should you decide to have it power your home automation, an AMD Geode LX800 CPU at 500 MHz and memory consisting of (and limited to) 256 MB DDR.