When it comes to ETFs, be careful not to judge a book by its cover. For example, two “homebuilder” ETFs are posting very different performance numbers in 2012.

The iShares Dow Jones US Home Construction (NYSEArca: ITB) is up 43.6% year to date, while SPDR S&P Homebuilders (NYSEArca: XHB) has gained 26.2%. [Homebuilder ETFs Rally on Housing Bottom Calls]

An ETF outperforming a rival doesn’t automatically make it a better choice.

However, the performance disparity is a reminder that investors need to do their homework and understand how the tracking index works before deciding to buy.

ITB, the iShares ETF, is outperforming its State Street rival XHB because it has a larger allocation to “pure” homebuilder stocks rather than other subsectors associated with the residential housing market. The funds invest in traditional homebuilders as well as related companies such as Home Depot.

The current market favors ITB, but it has lagged XHB in previous periods.

One key difference between the two ETFs is that XHB follows an equal-weighted index, while ITB employs a market-cap-weighted strategy.

“Aside from homebuilders (which account for about 67% of total assets), this fund also holds building-materials and fixtures producers (19%), home-improvement retailers (9.5%), and furniture companies (5%). This fund contains 26 companies and is top-heavy, with the top 10 holdings accounting for more than 65% of total assets,” Morningstar analyst Robert Goldsborough wrote in a May 22 report on ITB.

“The homebuilders segment accounts for 29% of XHB’s total assets and is this ETF’s biggest industry weighting. Other significant weightings include the building-products manufacturers segment (26.5% of fund assets), home-furnishing retailers (17%), home-furnishing companies (12%), home-improvement retailers (9%), and household appliance makers (6.3%),” he added. “This fund holds 35 companies, and holdings are initially equal-weighted and then weights are adjusted to ensure liquidity and concentration requirements.”

ITB holds assets of $867.8 million and charges an expense ratio of 0.47%.

XHB is larger with $1.4 billion in assets and also has lower fees of 0.35%.

“Despite some obvious differences between the two funds, the performance of XHB and ITB is 98% correlated over the past five years,” Goldsborough noted.

Speculative homebuilder stocks have rallied sharply this year on hopes the battered housing market is finally on the mend. For example, Standard Pacific Corp. and PulteGroup are up 103% and 77% year to date, respectively, according to Morningstar. [Biotech, Homebuilder ETFs in Multiyear Breakouts]

iShares Dow Jones US Home Construction