Just about the time you think you may have finally figured out what the stock market is doing, it changes on you. (Richard Drew/AP)

Just about the time you think you may have finally figured out what the stock market is doing, it changes on you.

Today, let’s look at two actual examples and one possible example of this phenomenon: Apple’s share price, the alleged “Trump bump” and the battle between index funds and actively managed funds.

Apple first. Over the past year or so, I’ve had a lot of fun pointing out how Apple’s stock began to tank soon after it replaced AT&T in the 30-stock Dow Jones industrial average in 2015. Using numbers from Howard Silver­blatt, a senior index analyst at S&P Dow Jones Indices, I wrote several times about how Apple, which had been a hot stock, became the Dog of the Dow after it replaced AT&T on March 19 of that year.

I’d calculate how much higher the Dow would have been had Apple stayed out and AT&T stayed in. At one point, the difference was close to 300 points. The Dow would have topped 20,000 way before it did on Jan. 25 had the AT&T-Apple switch not taken place.

[The Dow’s climb to 20,000? Whoop de doo.]

But Apple has stopped barking. According to Silverblatt, as of Tuesday’s close, Apple ranked 13th among the 30 Dow stocks since joining the average. It’s up about 13 points during that period, compared with just under seven for AT&T. The net result: The Dow is about 40 points higher than it would have been without the Apple-for-AT&T swap.

That’s not a terribly impressive difference. But it’s a major improvement over the past few months.

Now let’s talk about the U.S. market as a whole and the alleged “Trump bump” shorthand used to explain its increase since the November election.

I say “alleged” because a president’s influence on the economy and the stock market is marginal. Unless, of course, a president does something brilliant (which hasn’t happened since President Trump’s inauguration) or something profoundly scary (which also hasn’t happened).

Stocks tanked sharply in the futures market the evening of Nov. 8, when it became clear that Trump was going to be the surprise winner, then bounced back sharply, closed higher on Nov. 9, and then kept going up.

But since March 1, the total value of U.S. stocks has fallen about $775 billion (2.85 percent), according to Wilshire Associates.

In other words, for the past six weeks, the Trump bump has gone thump. Read about the “Trump thump”? I didn’t think so.

As someone who has most of his net worth tied up in stocks, I’m rooting for higher prices. But I think that whatever happens is attributable to earnings, interest rates and the economy in the long run, and to market momentum over the short run.

I don’t attribute the gains I’ve made to Trump. And I won’t blame him for declines, unless he does something profoundly foolish and dangerous and sets off a selling panic.

Now to the index-active fund debate.

Index funds are the “in” thing these days, sucking up cash that’s pouring out of actively managed funds.

Because index funds seek to replicate an index rather than to outperform it, they’re less expensive to run than active funds, which incur serious expenses to hire stock pickers and analysts and frequently do lots of trading. Therefore, index funds collectively are lower-cost than active funds and will collectively outperform them.

[How Vanguard’s decision to forgo profit has paid off for investors]

But if you pick the right, relatively low-cost active fund, you can exceed indexes. That’s especially true in a down market because index funds by definition are 100 percent invested, and active funds have to keep cash reserves. In addition, active funds can invest in non-U.S. stocks, which U.S. index funds don’t do. If U.S. stocks begin to seriously underperform other markets, the index-active fund performance numbers could shift.

I generally recommend index funds to people who want to get into the market but don’t know how. And I’ve got far more money in index funds than in active funds. But in some small tests I’ve been running, active funds (which I won’t name) have caught up to the index funds against which I’ve pitted them.

Will the switch from active funds to index funds continue? Probably. But don’t be surprised if something happens to slow or even reverse the current trend. Because in the stock market, nothing is forever.

Read more:

Wall Street’s brutal arithmetic

Forty bucks, 40 years and proof that Jamie Dimon is right

What the Yahoo sale tells us about stock market bubbles