Attention, bargain hunters! Whether you're looking for department-store brands at half price, or a Foolish investor searching for companies with the right business model for uncertain times, TJX (NYSE: TJX) is the place to be.

This off-price retailer, parent of the T.J. Maxx and Marshalls stores, among others, reported that its fourth-quarter earnings per share were up 17%. It capitalized on the one-two punch of penny-pinching shoppers seeking name-brand merchandise at reduced prices, and a struggling retail sector looking to unload excess goods on discount stores.

This powerful combination made for a great fourth quarter, as same-store sales were up 4%, on top of 5% gains from the same quarter last year. Even more striking is the fact that not a single one of TJX's seven concepts had lower comps during the quarter -- in sharp contrast to comp sales declines at both trendy apparel retailers like American Eagle Outfitters (NYSE: AEO) and private-label stores like Kohl's (NYSE: KSS).

The key to profitability was gross margins, which expanded by 150 basis points on opportunistic buying and occupancy leverage from the sales growth. Also, a favorable settlement of interference by computer hackers helped margins by 40 basis points. While this mistake was a bitter pill for the company, it may actually be helping sales -- TJX craftily offered discount vouchers to affected customers.

Inventories ended the quarter very clean, flat with the previous year on a per-store basis. Management credits much of its success last year to lean inventory, leaving plenty of open-to-buy dollars available for the next hot bargain. This is a big advantage for TJX, as even vigilant retailers like J.C. Penney (NYSE: JCP) suffered during the holidays from overstocked shelves, and the inevitable markdowns that follow.

In contrast with its clothing, TJX's stock does seem a little pricey, with a trailing P/E of 12. But excluding costs from the database hackers adds $0.26 to 2007 EPS, bringing the trailing P/E to a more reasonable 16. And TJX does expect to earn $2.20 to $2.25 for 2008, making the forward P/E an even more attractive 14.3.

Bargain-hunting investors can find quality apparel retailers like Macy's (NYSE: M) at lower P/E ratios right now. But TJX looks to have found a formula that works in good times and bad, making its slightly premium price tag justifiable. This is one retailer investors should toss into their shopping carts.

For related Foolishness: