Saturday, September 30, 2006

How Yahoo Calculates the Adjusted Closing Price

For calculating adjusted prices, there are commonly two kinds of adjustments to consider -- stock splits and dividends. Stocks splits are straightforward. Since a stock split doesn't change the intrinsic value of the company, you recalculate historical per-share data (like stock price) to reflect the latest number of outstanding shares. Everyone seems to agree on how to do that, but adjusting for dividends is a different story.

There are situations where you may or may not want dividend-adjusted prices. For example, using adjusted prices makes it much easier to calculate the rate of return for a long-term investment (a stock held for years) since dividend payouts are folded into the adjusted prices. However, percentage profit and loss calculations of a short-term trade could be skewed by adjusted prices. That most likely wouldn't matter much for a trade happening right now, but it could profoundly affect backtesting results, especially for time frames that were years ago. So depending on your objective, you will need to decide whether or not you want to use dividend-adjusted prices and what kind (more below).

Not all charting sites adjust their charts for dividends. For example, StockCharts.com adjusts for dividends, but BigCharts.com and Prophet.net don't. Interestingly, Yahoo charts don't adjust for dividends, but Yahoo historical prices do provide a single adjusted closing price that includes both splits and dividends. Yahoo's technique for calculating the adjusted closing price looked a bit strange to me when I first saw it. I was expecting the dollar difference between the actual close and the adjusted close to stay the same for stocks that never split. But that's not how they do it.

There are two general approaches on how dividend adjustments are calculated. The first approach, described in this Investopedia article, is simply to subtract the dividend out of the stock price going back to the IPO and adjusting the dividend adjustment for stock splits along the way. It's as if the dividend never existed in the company. This approach is simple and gives accurate absolute profit and loss numbers when calculating the return from holding a stock long-term, over several dividend distributions. But there is a problem -- due to the effect of inflation, it's possible that the dividend adjustment will cause some adjusted historical prices to go below zero. Once that happens, percentage rate of return numbers are trickier to calculate, and negative stock prices in general don't make sense intuitively.

The second approach involves calculating adjustments in percentage terms instead of absolute dollar value. Yahoo uses this type of approach for its adjusted closing price. It avoids the negative adjusted stock prices but as a result skews profit and loss calculations. There is probably more than one way to apply percentage adjustments, so depending on the exact technique, results would vary. I looked closely at Yahoo's adjusted prices and came up with what I believe is their formula. Here it goes..

Yahoo's adjusted close calculation goes like this:
  1. For the latest available trading day, the actual closing price and the adjusted closing price are the same. (Base case)
  2. For every other day ("today"), determine what percentage today's closing price is over yesterday's closing price, excluding the effect of a dividend and/or a stock split, if today is the ex-date.
  3. You calculate yesterday's adjusted close as being the same percentage down from today's adjusted close as the percentage calculated in step 2.
  4. Repeat steps 2 and 3 for all other historic days.
Expressed as a formula:

A-1 = A0 + A0( ((P-1/S) - P0 - D) / P0)

where
  • A0 is today's adjusted price. A-1 is yesterday's adjusted price.
  • P0 is today's actual price. P-1 is yesterday's actual price.
  • S is the split ratio, if today is a split ex-date. For example, a 3-to-2 split means S is 1.5. S is 1 if today is not a split ex-date.
  • D is the actual dividend, if today is a dividend ex-date. D is 0 when not a dividend ex-date.
In the case of Yahoo, the D term in the above equation is the tricky part. It turns out that Yahoo reports dividend amounts in split-adjusted terms. So you have to unadjust the dividend amount before using it in the above equation! You can either multiply the Yahoo-reported dividend amount by the cumulative split factor, or you can get the actual dividend amount from another web site like earnings.com.

I ran a couple spreadsheets using that formula and was able to calculate exactly the same adjusted closing prices that Yahoo has. Great! Now I can use the same formula to get adjusted prices for the open, high, and low prices. Then it's onward to building more advanced technical analysis screens!

Wednesday, September 27, 2006

Searching EDGAR

Use this link to search for SEC DEF 14A filings for the month of Sept 2006.

Insidenewswire.com has an interesting summary of insider activity for the day.

Tuesday, September 19, 2006

CME Housing Futures

Starting in May 2006, the Chicago Mercantile Exchange started offering Housing Futures. There was a MarketWatch article in late May about it. The futures contracts are based on the S&P/Case-Shiller Home Price Indices, and the indices are currently calculated for 10 cities: Boston, Chicago, Denver, Las Vegas, Los Angeles, Miami, New York, San Diego, San Francisco, and Washington DC.

Even though I'm not planning on trading futures any time soon, following these particular futures could give an interesting read on where the housing market is going, since these indices are calculated based on recorded home sales prices and use a repeat sales methodology to try to isolate market changes (vs. change in value due to intrinsic property changes). Perhaps it will serve as a leading indicator for price performance of $HGX component stocks?

Monday, September 18, 2006

NAHB Housing Market Index

I was reading a Market Watch article on home builder confidence falling again in Sept. It mentions a housing market index produced by NAHB and Wells Fargo and how this index "has had a fairly good record of predicting the number of new homes started." NAHB has a web page for economic and housing data and it appears to give an excellent overview (they say "pulse") on how the housing and real estate market is doing overall and within each state.

Tuesday, September 12, 2006

Technical Analysis Reading List

I've been looking for an authoritative reading list for technical analysis and found one after wandering into Market Technicians Association, Inc. through an analyst's credentials. MTA is a non-profit organization whose stated mission is to "Educate the public and the investment community to the value and universality of technical analysis."

They have a rigorous, self-study certification program for technical analysis. To get certified, you need to pass three levels of testing (the final is an essay format) based on material you learn from studying the following books:

Level 1 (100 hours of studying)
Level 2 (140 hours)
Level 3 (160 hours)
That's a total of about 5400 pages of reading. To finish in 400 hours, it's about 4-5 minutes of study per page.

Tracking Oil Futures and Crack Spreads -- FTO, VLO

FutureSource.com has free premium charts for tracking futures prices. For example, for Oct 2006 delivery:
You can play with the URL to get different size charts, as big as you like. You can also do combinations with formulas like this:
For oil refining companies, the maximum possible profit is generally considered to be the revenue from selling gasoline and heating oil minus the cost of crude oil to produce them -- this is known as the "crack spread". The typical ratio in a crack spread is 3 barrels of crude oil produces 2 barrels of gasoline and 1 barrel of heating oil, which is known as the "3-2-1 Crack Spread". Since unleaded gasoline and heating oil are quoted in price per gallon, their prices need to be multiplied by 42 to get the price per barrel (42 gallons per barrel).

For most refineries, the crude part of the crack spread is the light, sweet variety. But two companies in particular have complex refineries that can handle a lot of heavy, sour crude instead, which is a lot cheaper than light, sweet crude -- FTO and VLO. Currently, San Joaquin heavy crude is about $53/B compared to $65/B for light-sweet. That $12 light/heavy spread is a source of additional profits for refineries specializing in heavy crude. Since most refineries use light, sweet crude instead, the prices of gasoline and heating oil are more strongly influenced by the price of light-sweet than heavy-sour. This means that companies like FTO and VLO can maintain excellent margins compared to companies that can only refine light-sweet, especially as the light/heavy spread widens -- i.e. as crude oil prices climb overall.

At the same time, when the price of crude falls, the heavy-light spread tends to narrow, thus decreasing the margins for FTO and VLO. So, if the price of crude continues to fall like it has for the last week, FTO's and VLO's stock prices may take an extra heavy hit, due to expectations of wider light/heavy spreads having previously been priced into those stocks.

Thursday, September 07, 2006

Homebuilders News

The homebuilders have been a somewhat news intensive group recently. Even with earnings downgrades, HOV and KBH both rocketed up during the day today, even after an opening downgap overnight. That consequently appears to have lifted the entire homebuilders industry group:

That image comes from a Yahoo comparison chart. See latest prices here.

BusinessWeek Online Hot Growth Stocks of 2006

In a previous blog entry, I mentioned the BusinessWeek Online Hot Growth Stocks of 2006 report, from the June 5, 2006 issue. It's a detailed report of 100 growth stock picks. I thought it'd be good to review this list to see how the hot growth stocks have done over the past three months, through the rough summer market.

Here's the Yahoo summary and the technical charts (long load time). Most of these growth stocks have ended up in down or sideways trends since early June. When I eyeballed the charts, only 16 out of 100 stood out as having a "hot growth" uptrend for the 3-month period starting in June:
  • NILE +13%
  • PSPT +15%
  • CTSH +11%
  • HITT +21%
  • WIRE +13%
  • ANST +14%
  • QSII +25%
  • LOJN +17%
  • BOOM +15%
  • VCLK +16%
  • VTIV +14%
  • DRIV +22%
  • TRMB +14%
  • HLX +18%
  • MCRS +14%
  • LMS +18%
The rest were down, flat, or not convincingly up enough to be "hot" IMO. But judge for yourself. There are only a few other stocks beyond these 16 that had a borderline 9-10% gain for the 3 months, though with a lot of volatility.

Wednesday, September 06, 2006

Online Book - Strategies, Sectors, and Economic Indicators

I was wandering through web searches looking for information on the 10-year Treasury Note ($TNX) and the 3-month Treasury Bill ($IRX), and came across a free online book titled Investment Strategies Using Stock Market Sectors, by George Dagnino. Dagnino mentions in Chapter 1 that he has experience managing $4 billion over a variety of asset classes.

I've just started reading the book, and so far Dagnino seems to recommend a very realistic, hype-free approach to the stock market, though with the occasional shameless plug for one of his books and his newsletters. Similar to Alexander Elder's book Trading for a Living, Dagnino emphasizes the importance of money management through a disciplined investment process where risk is constantly re-evaluated and the hallmark of a successful investor is predictable and stable returns. He also devotes some chapters to economic indicators and how they relate to stock sectors and business cycles. This looks like a good intro to financial markets.

Monday, September 04, 2006

$TNX and $HGX

I was reading a MarketWatch article on the housing sector and learned about $TNX and $HGX.

The $TNX is CBOE's 10-Year Treasury Note Yield Index. Since the value of the index is the 10-year yield, the annual yield is simply the index value divided by 10. So a current index value of 47.26 means an annual 4.726% yield on the 10-year Treasury Note. This annual yield is very important for the housing market, because it is the traditional benchmark for mortgage rates. Changes in mortgage rates affect cost of construction and qualification of buyers, and rising rates can lead to increasing mortgage defaults and foreclosures.

The $HGX is PHLX's housing sector index. It includes the top homebuilders plus some top construction supply companies -- quotes for HGX components, sorted by descending market cap.

On the technical chart, $HGX formed a head-and-shoulders top from Jan 2005 through May 2006 after having been in a multi-year uptrend. The distance from the head to the neckline suggests that, based on price patterns, $HGX has yet to go down to the 170 area. That represents a 17-18% decline from today's $HGX value of 206.12. I'm not sure that's realistic, given how low the P/E ratio of the homebuilders has gotten -- industry average P/E is 6.8! It seems too speculative to bet on either direction at this point. With such a low P/E, value investors have reason to buy. But the recent price action doesn't say yet that the downtrend is dead; there are lower highs amidst higher lows, forming a pennant pattern.

Saturday, September 02, 2006

Oil Sands and Oil Shale

I've been reading articles about oil sands and oil shale and companies developing technologies for extracting crude oil from them. For background see, about oil sands and about oil shale.

In North America, the largest oil sand deposits are in Alberta, Canada. A local regulatory group keeps a list of companies operating in the oil sands. For stock investment, some interesting companies are:
  • Suncor Energy (SU). In addition to producing 265,000 barrels per day of synthetic crude from oil sands, Suncor also recently announced the opening of Canada's largest ethanol plant. Suncor's fundamentals look strong, especially recent sales and EPS growth.
  • EnCana Corp (ECA) also has oil sands operations, but currently averages only 153,470 barrels per day in production. EnCana's fundamentals are still reasonably strong.
For oil shale, there are currently only 3 companies left who are still in contention for lease contracts with the U.S. Bureau of Land Management:
There is also a technological development from Raytheon Company (RTN) and CF Technologies involving a new technique for enhancing recovery of oil from shale reserves using radio frequency combined with supercritical fluids (article).

Friday, September 01, 2006

CFCP - 10% Stock Dividend

Coastal Financial Corp. (CFCP) will soon be paying a 10% stock dividend and restating past earnings as a result of the dividend. Ex-date is Sep 6. This is an unusual company in that they have a history of paying 10% stock dividends, this latest one being the 7th time. There wasn't much of a move in CFCP's stock price on Aug 24 or 25, around when the 10% dividend was announced. The stock is thinly traded, with an average daily volume of about 30,000 shares. Today's trading was 12,558 shares.