Stocks rose as market bulls saw a buying opportunity after the threat of North Korea pulled Wall Street lower for three days straight.

The Dow Jones Industrial Average climbed 0.08% on Friday, Aug. 11, the S&P 500 gained 0.13%, and the Nasdaq added 0.64%.

Still, the main indexes have not yet recouped losses sustained over a three-day stretch of red ink earlier this week. The S&P 500 sank 1.7% from Tuesday to Thursday, the Dow fell 1.1%, and the Nasdaq dropped 2.4%. Those losses dragged the S&P 500 down 1.5% for the week, its worst such showing since the week ended March 24. 

Global markets have been on edge since Tuesday, when President Donald Trump warned North Korea of severe retribution should the authoritarian state proceed with any more missile tests or threats. Trump said that further threats would be met with "fire and fury like the world has never seen."

He doubled down on those remarks on Thursday, suggesting that perhaps his rhetoric wasn't harsh enough. And in a Friday morning post on social media site Twitter, Trump wrote: "Military solutions are now fully in place, locked and loaded, should North Korea act unwisely. Hopefully Kim Jong-un will find another path!"

Trump's threats have escalated since reports broke at the beginning of the week that North Korea had successfully produced a nuclear warhead that could fit inside its missiles. The U.N. Security Council voted unanimously on Saturday, Aug. 5, to impose new sanctions on North Korea after Pyongyang conducted several missile tests.

North Korea has since threatened to launch missiles at the U.S. territory of Guam, and the country previously threatened "all-out war, wiping out all the strongholds of enemies, including the U.S. mainland."

Tom Elliott, international investment strategist at deVere Group said that "in all likelihood, the North Korea problem will persist for years to come, with the U.S. and increasingly China attempting to contain and restrain Kim Jong-un. He knows that any use of missiles -- nuclear-tipped or not -- against the U.S or one of its Asian allies, risks a retaliation that will lead to the end of his family's rule of the country. Therefore, there is a high probability that the current tension will ease off and the recent flight into defensive stocks will reverse."

Among individual stocks, J.C. Penney Co. Inc. (JCP)  slid 17% after reporting a far worse quarter than expected. The retailer's net loss of 20 cents a share was 2 cents deeper than a year earlier. An adjusted loss of 9 cents a share was twice as bad as analysts' expected.

Not good.
Not good.

Penney's $2.96 billion of sales did beat analysts' $2.84 billion estimates, but same-store sales declined by 1.3%. For the full year, J.C. Penney reiterated adjusted earnings guidance of 40 cents to 65 cents a share, wrapping estimates of 49 cents. 

Meanwhile, Snap Inc. (SNAP)  tumbled 14% after posting a deeper-than-anticipated loss and weaker user numbers over its second quarter. The messaging-app company reported a net loss of $443.1 million, far wider than $115.9 million a year earlier.

On a per-share basis, a net loss of 16 cents a share came in deeper than consensus by 2 cents. Revenues rocketed 153% higher to $181.7 million, yet still fell short of estimates by $5.13 million. Average revenue per user more than doubled to $1.05, up from 50 cents a year earlier. That also missed estimates of $1.07.

Snap had 173 million daily users during the quarter, a 4% increase from a year earlier, while analysts were hoping for 175 million users.

Among other techs, record second-quarter earnings and revenue from Nvidia Corp. (NVDA) weren't enough to prop the stock up Friday. The chipmaker's shares fell more than 5% despite profit of $1.01 a share, higher than the consensus of 70 cents a share and the eighth-straight quarter of better-than-expected earnings.

Nvidia's sales rose 56% to $2.23 billion, exceeding estimates of $1.96 billion. Gaming revenues also increased 52% to nearly $1.2 billion, with games such as the Call of Duty and Star Wars franchises contributing a healthy boost to the top line.

Elsewhere in the market, Nordstrom Inc.  (JWN)   rose slightly after exceeding profit and sales forecasts over its recent quarter. The department-store chain reported earnings of $110 million, or 65 cents a share. That was lower than a year earlier when Nordstrom had reported $117 million, or 67 cents. Analysts had anticipated 64 cents a share in profit.

Revenue increased 3.8% to $3.79 billion, beating consensus by $40 million. Same-store sales were a particular bright spot. That measure increased 1.7%, a surprise to analysts looking for a 0.5% drop. Nordstrom also bumped up the low end of its full-year earnings forecast by a dime to $2.85. 

Lastly, Blue Apron Inc. (APRN) declined by 0.4% after SunTrust Robinson Humphrey downgraded the stock to "Hold" from "Buy." 

Blue Apron has been falling since Thursday after reporting earnings for the first time since going public on June 29. The meal-kit company posted a steeper-than-consensus loss as the number of customers declined. Blue Apron also reported delays at its Linden, N.J., factory.

Blue Apron IPO day.
Blue Apron IPO day.

In raw materials, West Texas Intermediate crude was higher on Friday, though worries over oversupply persisted. The Paris-based International Energy Agency said in its regular Monthly Oil Market Report that there would be "more confidence that rebalancing is here to stay if some producers party to the output agreements were not, just as they are gaining the upper hand, showing signs of weakening their resolve."

OPEC's combined production increased by 173,000 barrels per day to nearly 32.9 million barrels in July. 

The IEA also raised its global oil-demand forecast. The group anticipates demand will rise by 1.5 million barrels a day -- higher than the 1.4 million increase forecast last month. The IEA said "producers should find encouragement from demand, which is growing year-on-year more strongly than first thought."

A weekly read showed U.S. rigs drilling for oil increased by 3 to 768 in the past week, according to Baker Hughes. Domestic drilling activity had fallen by one in the previous week.

In economic news, U.S. inflation trends remained soft in July, with consumer prices coming in weaker than expected. The Labor Department reported that consumer prices increased 0.1% in July, half the anticipated increase.

Core prices, excluding food and energy also rose 0.1%, though at a slower-than-forecast pace. Consumer prices over the past 12 months have risen 1.7%. On Thursday, the Labor Department said the July Producer Price Index unexpectedly declined. Soft inflation could give the Federal Reserve pause in its path to tighter monetary policy.

More of What's Trending on TheStreet:

If you liked this article you might like

Dow Jumps Over 300 Points, Posting Its Fifth Straight Day of Gains

Dow Jumps Over 300 Points, Posting Its Fifth Straight Day of Gains

Do Robust Earnings for Tapestry and Michael Kors Signal a Retail Turnaround?

Do Robust Earnings for Tapestry and Michael Kors Signal a Retail Turnaround?

Investors Learned One Valuable Lesson Watching the Dow's 1,175-Point Crash

Investors Learned One Valuable Lesson Watching the Dow's 1,175-Point Crash

Retail Stocks Lose Post-Holiday Mojo, Get Swept into Market Meltdown

Retail Stocks Lose Post-Holiday Mojo, Get Swept into Market Meltdown

This Black History Month on Wall Street

This Black History Month on Wall Street