(Reuters) - After a seven-month stall, Wall Street's bull market looks back on track, thanks to Amazon.com Inc AMZN.O, Alphabet Inc GOOGL.O and other high-flying technology and consumer discretionary companies.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., August 21, 2018. REUTERS/Brendan McDermid

The widely followed S&P 500 .SPX stock index rose as much as 0.57 percent on Tuesday to 2,873.23, putting it above its previous record high of 2,872.87 on Jan. 26, although it failed to close above that high.

Closing above the January record would mean that the benchmark index ended a correction on Feb. 8, according to some investors.

Bolstered by quarterly earnings reports and a rise in stock buybacks, the S&P 500 has gained over 2 percent in the past month.

Confirmation that the bull run remains alive comes on the day the S&P 500 matches its longest rally in history, 3,452 days between November 1990 and March 2000, according to S&P Dow Jones indices. On Wednesday, it could claim the title of longest ever.

Following its January high, the S&P 500 slumped 10.2 percent over two weeks, just meeting many investors’ definition of a market correction and raising fears that nearly a decade of gains on Wall Street might be over.

Since then, Wall Street has splintered: Small caps have soared thanks to deep corporate tax cuts, while companies exposed to global trade have underperformed, with some investors worried about U.S. President Donald Trump’s feud with China and other trading partners over import tariffs.

After steep drops in February and March, the S&P 500 inched slowly back toward record highs as sweeping tax cuts sent earnings sharply higher and provided cash for companies to buy back more of their shares and invest in new capital.

Nearly 80 percent of S&P 500 companies reported June-quarter earnings per share above Wall Street’s estimates, compared with a 64 percent beat rate in a typical year, according to Thomson Reuters I/B/E/S.

The S&P 500 is outperforming other major indexes globally for the year since May, and has not looked back. It ended Tuesday up 0.21 percent at 2,862.96, helped by consumer discretionary companies.

Fueled by Amazon, Microsoft Corp MSFT.O, Alphabet and other high-growth tech and consumer stocks, the Nasdaq has surged 14 percent in 2018, far outperforming the S&P 500's 7 percent rise.

“A lot of it is earnings,” said Liz Young, senior investment strategist at BNY Mellon Investment Management in New York. “The technology stocks continue to drive things. We’ve waited for that theme to go away but it hasn’t.”

The Russell 2000 index .RUT of small companies hit its own record highs on Tuesday, while the S&P 500 materials sector .SPLRCM this year has lost 2 percent.

The S&P 500 has been trending higher since early 2009, providing a gain of over 300 percent for investors who stayed on for the entire ride.

Some investors worry that the market is at risk of a sell-off if the few top-shelf stocks that have driven it higher in recent years lose steam.

“One of the areas of concern is that there’s still a relatively narrow breadth in the market in terms of leadership. So you want to take that into account,” said Oliver Pursche, chief executive of Bruderman Brothers in New York.