Stocks posted strong gains for a second day Thursday after President Bush announced an agreement with mortgage firms to freeze interest rates for five years, an effort aimed at helping subprime borrowers facing steep increases in adjustable rate mortgages.

That was good news for mortgage lenders like Countrywide Financial and other financial stocks like E*Trade with large subprime exposure. The mortgage market crisis has roiled financial markets for months and led to multiple Federal Reserve interest rate cuts  with the possibility of another rate cut next week.

Weaker than expected sales at Target added to the case for another rate cut, but the Fed will have to weigh that evidence against a persistently strong labor market, more evidence of which could be seen in the government's monthly jobs report due out Friday morning.

Some of the Nasdaq's biggest names, including Intel, Apple, Google, Dell and Research In Motion, posted gains of 2.4% or more. Dell was up 2.6% after signing up Best Buy as its latest retail partner, even though the company's shares were hit last week on concern about lower margins because of its growing consumer and retail efforts.

Analogic surged 18% on its results, and Hoku Scientific gained 20% on a financing deal for a polysilicon plant.

The Nasdaq rose 42 to 2709, for a two-day gain of 90 points. The S&P rose 22 to 1507, and the Dow soared 175 to 13,619. Volume declined to 3.42 billion shares on the NYSE, and 2.02 billion on the Nasdaq. Advancers led by a 26-7 margin on the NYSE, and 22-8 on the Nasdaq. Upside volume was 84% on the NYSE, and 80% on the Nasdaq. New highs-new lows were 105-102 on the NYSE, and 102-157 on the Nasdaq.