NEW YORK (TheStreet) -- Building on the morning's strong showing in U.S. new home sales for August, U.S. stocks rallied to reverse three days of declines. In the early afternoon, the markets strengthen their push, rising sharply and ending the trading day with solid gains.

The Dow Jones Industrial Average  gained 0.9% to 17,210.06. The S&P 500  rose 0.78% to 1,998.30. The Nasdaq  closed 1.03% higher to 4,555.22.

Watch the video below for a closer look at how U.S. markets ended the trading day Wednesday:

WATCH: More market update videos on TheStreet TV

KB Home (KBH) reported earlier Wednesday third-quarter earnings and revenue that missed analysts' estimates. The stock plunged 6.07%. Other housing stocks fell in sympathy with KB Home but trimmed losses after the release of the new home sales data.

In other corporate news headlines WednesdayCitizens Financial Group (CFG) raised about $3 billion in its initial public offering that was priced at $21.50 a share, below the expected range. The stock rose to $23.08 at the market close. 

Starbucks (SBUX)  advanced 1.87% on Wednesday after the coffee giant said it will buy the remaining 60.5% share of Starbucks Japan for about $913.5 million.

Starz (STRZA)  jumped 5.58% after a Los Angeles Times report said that executives with Rupert Murdoch's 21st Century Fox (FOXA) and Starz met Tuesday to discuss a possible acquisition of the premium cable movie service, a deal that could expand Murdoch's reach into homes across the country.

Walmart (WMT) has partnered with prepaid cards issuer Green Dot to begin offering mobile checking accounts to customers over 18. Shares rose 1.96%.

Pacific Investment Management Co. is being investigated by the Securities and Exchange Commission into whether the bond giant artificially boosted the returns of a popular fund aimed at small investors, The Wall Street Journal reported, citing people familiar with the matter. The Pimco Total Return ETF (BOND) has gained 3.22% over the past 52 weeks. The fund fell 0.27% on Wednesday.

Bed Bath & Beyond (BBBY) reported fiscal second-quarter profit of $1.17 a share, topping Wall Street estimates by 3 cents. The stock soared 7.4% in the regular session, but was down 0.04% in after-hours trading.

Following the massive data breach at Home Depot (HD) , reports of fraudulent charges are beginning to surface. Some are even draining bank accounts, according to UPI.

The SPDR Gold Trust (GLD) was trading lower by 0.47%.

-- By Andrea Tse and Kurumi Fukushima in New York

Follow @AndreaTTse