Optimism among small companies in the United States improved in February, snapping a five-month losing streak that was the longest in two decades on brighter views of future conditions.

The National Federation of Independent Business optimism index rose to 101.7 from a two-year low of 101.2, according to a report March 12. Five of 10 index components improved, including views about the current environment for expansion and capital spending plans.

The measure is showing signs of stabilization after the government shutdown and remains at a historically elevated level despite cooling from a record 108.8 in August. “Now that the government is funded, owners should be getting back to business with the rebound in consumer sentiment,” survey authors William Dunkelberg and Holly Wade said in the report.

Stephanie Keith/Bloomberg News

“Earnings trends took a hit as a million laid off workers and others affected by the shutdown cut back on spending.” While some indicators point to a softer start to this year, including the March 8 jobs report showing February payrolls growth was the weakest in more than a year, consumers remain upbeat amid a resurgent stock market and steady job gains. Americans are the most confident about current conditions in 18 years, Conference Board surveys show, and the Bloomberg Consumer Comfort gauge is at the highest level since late 2000.