Stocks closed out the quarter with another positive day on Friday. The Dow Jones Industrial Average (DJINDICES:^DJI) advanced and the S&P 500 (SNPINDEX:^GSPC) closed at a record high.

Today's stock market

Index Percentage Change Point Change
Dow 0.11% 23.89
S&P 500 0.37% 9.30

Data source: Yahoo! Finance.

The tech sector ended a strong quarter with more gains today, and the Technology Select Sector SPDR ETF (NYSEMKT:XLK) added 0.7%. Gold and gold miner stocks lost ground today; the VanEck Vectors Gold Miners ETF (NYSEMKT:GDX) closed down 0.9%.

As for individual stocks, KB Home (NYSE:KBH) reported strong results and Tyson Foods (NYSE:TSN) was the top gainer in the S&P 500 on news of layoffs and an improved outlook for profits.

Stock prices and graphs.

Image source: Getty Images.

KB Home gives housing stocks a lift

Shares of KB Home soared 8.5% after the homebuilder reported its fifth straight quarter of beating expectations for revenue and earnings. Revenue in the third quarter grew 25% to $1.14 billion, and net income was up 28% to $50.2 million, resulting in earnings per diluted share of $0.51. Analysts were expecting the company to earn $0.46 per share on revenue of $1.12 billion.

Home deliveries were up 11% from last year and average selling price (ASP) grew 12%, compared with an 11% jump in ASP last quarter and a 6% increase in the first quarter. Profitability was strong, with housing gross profits up 23% and homebuilding operating income rising 49% to $76.7 million. Operating margin excluding inventory-related charges improved from 6% last year to 7.4%. Strong orders bode well for continued growth in the quarters ahead, with net order value increasing 15% and the backlog up 14%.

"We continued to make considerable progress on our three-year returns-focused growth plan with outstanding results in our 2017 third quarter," said CEO Jeffrey Mezger in the press release. "We posted double-digit increases in revenues and earnings, and generated measurable improvement across our key financial metrics."

KB Home's latest quarter comes in spite of declines in nationwide housing starts in July and August amid worries about labor shortages and the impact of hurricanes. But the company is clearly executing well, and following a surprisingly strong second quarter, the good news provided a boost to other homebuilder stocks as well.

Tyson Foods cheers investors with an improved outlook

Tyson Foods raised its earnings guidance for the fiscal year ending Saturday and announced layoffs of 450 people, and the stock shot up 7.6% today. The meat producer raised its guidance for adjusted EPS for the full fiscal year to a range of $5.20 to $5.30, up from previous guidance of $4.95 to $5.05, attributing the change in outlook to higher profits in its beef segment.

Given that Tyson's fiscal year ends tomorrow, the hike in guidance for the full year amounts to a pretty substantial boost for the current quarter. Adjusted EPS for the first nine months was $3.88, so the new guidance raises the outlook for the fourth quarter to a range of $1.32 to $1.42, a 22% increase at the midpoint from previous guidance and significantly above the $1.19 analysts had been expecting. 

"We are creating momentum behind our continuous improvement agenda as we know we can be even more efficient operators," said CEO Tom Hayes in the press release. 

Tyson is working to integrate recent acquisition AdvancePierre Foods, and the layoffs will be coming from corporate headquarters as the company pares redundancies and attempts to improve efficiency. Coming on the heels of a strong third quarter that beat expectations by a wide margin, investors are giving Hayes, who took the reins of the company at the beginning of the year, a big vote of confidence.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.