U.S. stocks rallied Thursday, with the Dow industrials hitting a record high, as several consumer-oriented companies, including McDonald's Corp. (MCD), reported earnings that topped estimates.

The Dow Jones industrial average climbed 95.57 points, or 0.81 percent, to a record close of 11,947.70. The Dow also hit an intraday record high at 11,959.63.

Click here to visit FOXBusiness.com's Investing Center.

The Standard & Poor's 500 Index gained 12.88 points, or 0.95 percent, to close at 1,362.83. The benchmark index touched a new 5 1/2-year high of 1,363.76 during the session.

The Nasdaq Composite Index rose 37.91 points, or 1.64 percent, to close at 2,346.18. The Nasdaq is now only about 29 points within reach of its 2006 high of 2,375.54, set on April 20.

Warehouse club Costco Wholesale Corp. (COST) and motorcycle maker Harley-Davidson Inc. (HOG) also announced forecast-beating profits.

"Everyone's big concern has been that the economy has been riding on the back of the consumer and that high gas prices would get them to stop spending, but at least we know that they are still going to McDonald's and Costco" said Eric Kuby, chief investment officer at North Star Investment Management Co. in Chicago. "And it hasn't just been the cheap goods. You had Harley with good earnings and that's an expensive discretionary item."

The Nasdaq's outperformance has been helped by lower oil prices, prompting traders to shift their allocations to beaten-down tech shares, according to David Straus, a portfolio manager with Johnston Lemon Inc. in Washington.

"Remember that tech stocks got washed out in June and July and that was an incredibly unloved sector. Now if you look at earnings going forward, they look pretty good on a price-to-earnings basis," Straus said.

Also helping the Nasdaq was Costco, the heaviest-weighted gainer in the index. Costco's stock rose 7.7 percent, or $3.83, to $53.90 after the company said fourth-quarter profit rose, beating its lowered forecast.

McDonald's shares rose 2.4 percent, or 98 cents, to $42.23, while shares of Yum Brands Inc. (YUM), the operator of the Pizza Hut, KFC and Taco Bell chains, gained 8.3 percent, or $4.51, to $59.08, after reporting better-than-expected earnings.

The two companies helped push the S&P 500 index of restaurant shares up 3 percent.

Harley-Davidson shares advanced 2.7 percent, or $1.73, to $64.88 on the New York Stock Exchange.

The Beige Book, an anecdotal report on economic conditions from the Federal Reserve's 12 district banks, gave stocks an extra boost after it showed U.S. economic activity grew since last month, but not so much as to stir inflation worries.

Trading was active on the NYSE, with about 1.56 billion shares changing hands, below last year's daily average of 1.61 billion, while on Nasdaq, about 2.05 billion shares traded, above last year's daily average of 1.80 billion.

Advancing stocks outnumbered declining ones by a ratio of almost 4 to 1 on the NYSE and by more than 3 to 1 on Nasdaq.

Click here to visit FOXBusiness.com's Investing Center.