NEW YORK, JULY 2 -- The stock market bounced back from the declines of the past two sessions with a sharp rally today.

Trading was relatively quiet on the eve of the three-day Independence Day weekend.

The Dow Jones average of 30 industrials, which had fallen 37.15 points Tuesday and Wednesday, climbed 26.94 to 2436.70. The average closed out the week with a net loss of 0.16.

Volume on the New York Stock Exchange came to 154.93 million shares, against 157.04 million in the previous session.

Analysts said buyers were encouraged by strength in the dollar in foreign exchange, and an accompanying decline in open-market interest rates.

E-II Holdings led the active list, trading at 15 on volume of more than 4.2 million shares. The company, a group of businesses formerly owned by Beatrice Cos., went public with an offering of 28 million shares at 15.

Gainers among the blue chips included Union Carbide, up 1 3/4 at 30 3/8; International Business Machines, up 1/4 at 164 1/4; General Electric, up 1 at 55, and American Telephone & Telegraph, up 3/4 at 29 1/8.

Advancing issues outnumbered declines by about 5 to 3 on the NYSE. The exchange's composite index added 1.31 to 171.83.