When dark clouds appear on the horizon, it's wise to grab an umbrella, even if the sun is still shining overhead. You'll want to be prepared in case a heavy rain is on the way. I think this is a good metaphor for investors to heed.
The stock market is performing well, with the S&P 500 (^GSPC 0.32%) near its all-time high. However, some warning signs are readily apparent. The ratio of total stock market capitalization to GDP (commonly referred to as the Buffett Indicator) is also at a record high -- and above a level that Warren Buffett referred to as "playing with fire." The latest employment numbers are worrisome. Inflation is creeping upward. And the full brunt of the Trump administration's tariffs has yet to be felt.
If putting money in the stock market right is the equivalent of going outside with dark clouds on the horizon, what's the "umbrella" for investors? Buying stocks that are poised to perform well even if the overall market sinks. With that in mind, here are my picks for the best stocks to invest $1,000 in right now.

Image source: Getty Images.
1. Vertex Pharmaceuticals
I think taking nearly half of an initial $1,000 and buying one share of Vertex Pharmaceuticals (VRTX -1.03%) is a smart move. This biotech stock should deliver exceptional returns, regardless of what the stock market does.
Vertex doesn't have to worry about economic turbulence affecting its revenue and profits. Doctors will prescribe its cystic fibrosis (CF) therapies without missing a beat for a simple reason: There aren't any other approved drugs that treat the underlying cause of the rare genetic disease.
Likewise, the commercial launch of Vertex's newest drug, Journavx, should gain momentum come rain or shine. Journavx fills a key void in treating acute pain. It's highly effective, but isn't addictive like opioids.
Vertex's late-stage pipeline also gives investors several lottery tickets with great odds. The drugmaker is evaluating inaxaplin as a treatment for APOL1-mediated kidney disease. Povetacicept's first targeted indication is another kidney disease, IgA nephropathy. Zimislecel holds the potential to cure severe type 1 diabetes.
I think all of these drugs could be huge winners for Vertex if phase 3 testing goes well.
2. Dominion Energy
To paraphrase an old car commercial, Dominion Energy (D 0.62%) is not your father's utility stock. Its share price is low enough that you can scoop up three or four shares and still have enough left to buy the last stock on our list.
Don't get me wrong, though: Dominion has all the advantages your parents or grandparents would expect from a utility stock. And like most utility stocks, Dominion also pays an attractive dividend. Its forward dividend yield currently stands at 4.37%.
Dominion's business is also rock-solid and protected from competition. The company provides regulated electricity service to around 3.6 million homes and businesses in three Southern states -- Virginia, North Carolina, and South Carolina. It also provides regulated natural gas service to roughly 500,000 customers in South Carolina.
One intriguing thing about Dominion is that it's outperforming the S&P 500 in what has become a pretty good year so far for stocks. Another is the company's solid growth prospects, driven partly by the demand for artificial intelligence (AI). Dominion's home state of Virginia hosts the world's largest data center market.
3. UnitedHealth Group
You might be surprised to see UnitedHealth Group (UNH -1.61%) on the list. But I view this stock as a great bad-news buy, with its share price below $250.
I won't try to sweep UnitedHealth Group's challenges under the rug. The company continues to experience higher-than-anticipated medical costs, especially with its Medicare Advantage plans. It's being investigated by the U.S. Department of Justice for its Medicare billing practices. And UnitedHealth's Optum Rx unit, like other pharmacy benefits managers (PBMs), is under intense political scrutiny.
However, I believe that all these negatives are more than baked into UnitedHealth Group's share price. The stock trades at 10.3 times trailing-12-month earnings, its lowest valuation since the aftermath of the Great Recession.
More importantly, I view the company's issues as temporary. I fully expect premium increases will enable the company to restore earnings growth next year. UnitedHealth Group has survived DOJ investigations in the past and come out on top. I don't think PBMs are going away, either.
If the stock market tanks, my hunch is that UnitedHealth Group will hold up better than most stocks because it's already oversold. And I predict the stock will rebound as it emerges from the shadows cast by its numerous challenges.