Stock index futures pointed to a fourth day of gains on Thursday, the day the Federal Reserve ends its massive bond buying program, as the market rallies into the end of the quarter.

The S&P 500 has gained more than 3 percent in its best three-day run in three months as the Greek parliament adopted austerity measures to avoid a debt default. Lawmakers were set to approve detailed austerity and privatization bills on Thursday.

Much of the recent rally has been attributed to end-of-quarter window dressing by fund managers, who sell losers and buy winners to make their portfolios look better. The S&P 500 is down 1.4 percent this quarter.

A lot of this is quarter-end, said Frank Lesh, a futures broker at FuturePath Trading LLC in Chicago. We have seen a good amount of window dressing and marking up prices.

There will be some profit-taking on this move, but more likely it comes in next week, he said.

S&P 500 futures added 3.5 points and were above fair value, a formula that evaluates pricing by taking into account interest rates, dividends and time to expiration on the contract. Dow Jones industrial average futures gained 32 points, and Nasdaq 100 futures rose 6.5 points.

The Federal Reserve ends its $600 billion bond-buying program, known as QE2, on Thursday and has not offered any hints of more monetary easing. Markets were volatile in May and June, partly on concerns about QE2's end.

Citigroup and Bank of America-Merrill Lynch upgraded eBay Inc to buy after the Federal Reserve said third-party networks like its PayPal unit will not be regulated like payments networks.

The shares rose 4 percent to $32.10 in premarket trading after jumping over 6 percent on Wednesday.

The S&P 500 retook its April low at around 1,295 this week, putting a floor under the market, but analysts said it could struggle to pass back above its 50-day moving average at around 1,316.

The S&P 500 is off 4.1 percent after falling as much as 7 percent since the end of April .

The number of Americans filing claims for unemployment benefits barely fell last week, the government said, suggesting the labor market was struggling to regain momentum.

The Chicago PMI is expected to show activity in the U.S. Midwest slowed in June. The data comes at 9:45 a.m. EDT (1345 GMT).

(Reporting by Edward Krudy; editing by Jeffrey Benkoe)