Billionaire hedge-fund manager George Soros lost nearly $1 billion as a result of the stock-market rally spurred by Donald Trump’s surprise presidential election.

But Stanley Druckenmiller, Mr. Soros’s former deputy who helped Mr. Soros score $1 billion of profits betting against the British pound in 1992, anticipated the market’s recent climb and racked up sizable gains, according to people close to the matter.

The two traders’ divergent bets are a stark reminder of the challenges even acclaimed investors have faced following Mr. Trump’s unexpected victory. Many experts had predicted a tumble for stocks in the wake of the election, but instead the Dow Jones Industrial Average has climbed about 9% since Election Day.

Stocks have fallen broadly in the past couple of sessions, hurt in part by a reversal for smaller companies and the financial industry. A decline in both sectors helped push the Dow industrials down more than 150 points in the past two sessions.

For the past couple of years, hedge funds and other professional investors have complained that placid conditions made it difficult to generate trading profits. Brevan Howard Asset Management LLP and Moore Capital Management, both multibillion-dollar hedge-fund firms, are among those that managed to turn a losing year into a winning one after the election, according to people familiar with them.