For the past two years, most major media outlets have been running non-stop about what a disaster President Trump is, and how his mere existence is a threat to both citizens’ pocketbooks and liberty. Yet the economy has been booming, and lower taxes and fewer regulations not only meant more prosperity but more liberty.

The night Mr. Trump was elected, The New York Times’ economic columnist, Paul Krugman, famously predicted a stock market collapse with perhaps no recovery. As a young man, Mr. Krugman was a highly regarded economist who won a Nobel Prize, but in recent years has become an economic and political crank. If investors had followed Mr. Krugman’s stock market advice, they would have missed out on the more than 30 percent rise in the Dow-Jones index since Mr. Trump was elected.

It would be interesting to know how many of Mr. Krugman’s bosses at The New York Times sold their stock after the Trump election, or even bought more. If Mr. Krugman had been a registered investment adviser, rather an economic writer, he might have had clients attempting to sue him.

Fortunately, most Americans ignored Mr. Krugman’s advice and, through their purchases of shares in corporate America and beyond, drove both the markets and their own personal wealth to record levels. Few newspapers have been relentlessly more critical of President Trump than The Washington Post. Every day, the writers at The Post produce many articles as to why the end is near because of Mr. Trump. If one actually believed much of what appears in The Post and many other media, a person would probably be very fearful of investing in America.

The richest man in the world, founder of Amazon Jeff Bezos, owns The Washington Post. Mr. Bezos became the richest man under the Trump presidency from his ownership of Amazon stock, which has more than doubled in the last two years. Amazon may have invested more in America than any other company as it has been building the colossal infrastructure to support its rapidly growing sales.

An economy growing at 4 percent, as it is now under Mr. Trump, is of much greater benefit to Amazon than an economy growing at 2 percent, as it was under Mr. Obama. Yet, The Post opposed the Trump tax cuts and much of the deregulation which were of direct benefit to Mr. Bezos and the other Amazon stockholders.

There is a rational explanation as to why the owners of major media often act in ways seemingly contradictory to their public advocacy. Companies buy many different forms of insurance, such as fire insurance. The insurance is a cost to the business, but when a fire erupts, the company has already bought protection. Big businesses and wealthy individuals have been traditional targets of many in the political class.

In an earlier time, a Jeff Bezos would have had to endure an endless series of attacks, not because he had done anything wrong, but merely because he was so wealthy. There would have been calls to break up his businesses or severely regulate them. Mr. Bezos has been subject to relatively little of this, despite the amount of market power Amazon has amassed.

Mr. Bezos has bought himself political fire protection through his ownership of The Post. The Post writers know that there is little danger to them or the Bezos empire by attacking Mr. Trump and the Republicans, who are philosophically opposed to much regulation of business. By attacking Mr. Trump and the Republicans often about nothing and saying nice things about many Democrats (who tend to be pro-regulation, except when their donors are involved), Mr. Bezos and the others have bought themselves protection.

Entrepreneurs and investors are also much more likely to pay attention to data and real facts, rather than sensationalist headlines and scaremongering about the environment and science or whatever. For example, there has been a growing movement worldwide against vaccines, fueled by headlines from a few isolated cases that give rise to the belief that vaccines, in general, are unsafe. Parts of Europe are now experiencing an epidemic of measles, an easily preventable disease, which, according to the World Health Organization, cost nearly 90,000 lives in 2016. Fortunately, optimists are still willing to invest billions in pharmaceutical companies that benefit not only the investors but all of mankind.

Those who fret about global warming have lost much of their credibility because of gross overstatements, hyped by members of the media, often based on flawed models. Al Gore and others received much media attention when they predicted the end of Arctic sea ice by a decade ago. It not only didn’t happen, but sea ice is growing again. A new population survey of polar bears posted last week shows the numbers are increasing, not declining.

Most media reports on the environment only focus on the costs of global warming and not the benefits. For example, far more people die from cold rather than heat. Rising CO2 levels have resulted in greater farm yields. A new study in Nature reports that the global tree canopy cover increased by “2.24 million square kilometers (865,000 square miles) between 1982 and 2016.”

Those who are successful investors tend to dig into the data and facts, looking for the green shoots of optimism. Those who run on emotion tend to see only disaster and not opportunity. Not a formula for happiness or personal prosperity.