What happened 

Shares of the big-data software company Palantir (PLTR -0.37%) gained as much as 5.8% today after the company announced that the Department of Homeland Security renewed a five-year contract with the company. 

The good news for the tech stock was slightly overshadowed as market indices fell on ongoing worries about the U.S. economy and inflation. Palantir's stock was up by 2.8% as of 3:20 p.m. ET. 

So what 

Palantir's stock initially got a boost this morning after the company said that the Department of Homeland Security renewed its contract to support Homeland Security Investigations (HSI) using the company's software. Palantir said the contract is worth $95.9 million over a five-year period.

A person looking at a phone.

Image source: Getty Images.

"Every single day, HSI personnel use Palantir's software to execute their mission of investigating and disrupting major criminal networks that threaten our national security and undermine our critical infrastructure," Palantir USG's president, Akash Jain, said in a press release.

Investors were clearly happy with the company's latest contract renewal, but they were also processing the broader market's fall today. The Dow Jones Industrial Average was down by 0.8% this afternoon, and the S&P 500 slid 0.6% as investors continued to react to the Federal Reserve's 75 basis-point hike last week. 

The Fed is trying to tame inflation -- currently at a nearly 40-year high -- and its commitment to more rate hikes in 2023 has some investors worried that the federal bank's moves will tip the economy into a recession.

Some Palantir investors may have had those concerns on their minds even as the tech stock announced its latest contract renewal.

Now what 

Palantir's stock has fallen 25% over the past three months, and the the most recent significant price drop came after the company reported its second-quarter (which ended June 30) financial results.

While the company's sales beat Wall Street's average estimate, Palantir reported a loss of $0.01 for the quarter, compared to analysts' consensus earnings estimate of $0.03 per share. 

While the company's share price will still have to weather some of the broader market volatility, today's share-price jump shows that some investors are still betting that brighter days are ahead for this tech stock.