Here are the dangerous forces at work that could shut down this market rally

  • The stock market seems to move higher every day relentlessly, regardless of unsettling events like North Korea detonating a hydrogen bomb.
  • "Blind money" flowing into passive funds and ETFs is the major driver behind the rally, pushing stocks higher, regardless of fundamentals.
  • When that money dries up it "will not be pretty."

The stock market seems to move higher every day relentlessly. It ignores events in doing so. The job numbers could be startling; the Fed may have shifted to a tightening policy; Congress might fail to pass positive economic legislation; or foreign developments could be unsettling; and, yet, the equity markets continue to plow higher. The key question is why is this happening?

The reason may be the new structure of the investment industry and what it means for investment.

The Investment Company Institute (ICI) publishes numbers showing how money flows into or out of the various funds it monitors. It noted that $193 billion was pulled out of actively managed mutual funds in the last quarter of 2016. Another $71 billion was taken out in the first eight months this year.

One would think this would cause stock prices to decline until one recognizes where the money is going. In the fourth quarter last year, $52 billion was invested into passively managed mutual funds. Another $162 billion went into these funds in the first 8 months this year. However, this is not all. Approximately $90 billion was invested into Exchange Traded Funds (ETFs) in the fourth quarter last year, and $79 billion more was invested in these funds so far this year.

Why does this matter?

As long as money flows into the markets, one might think it doesn't matter where it comes from. Yet, it does matter because not all investment styles are the same.

Money in actively managed mutual funds may be thought of as reasoned money. The managers of these funds assess market conditions. They analyze the companies they are considering investing in. They make decisions as to what they want to buy and when they want to buy it based on contact with multiple sources and after long internal discussions held internally. They adhere to the "Prudent Man" rules. They know what they want to buy and when they want to buy it because they have completed serious study on the subject.

This is not how investing is done in passive funds and ETFs. I call this blind money. Managers of these funds have created a mathematically driven method of investing. The have a fund indenture that sets the rules of what should be bought and computers are programmed to invest according to the "script." There are no discussions concerning what to invest in. There is no time spent investigating the individual companies to be invested in.

Perhaps, most importantly, there are no judgments made concerning when to invest. If the money comes in at 11:00 am it is going to be invested by 4:00 pm because it cannot be held out of the market. If some troubling event occurs, the money will be invested, irrespective of the event.

Moreover, if the investment causes the stocks targeted by the investment to rise, this triggers actions by others. Computers programmed to react to stock price movements and volumes may then begin putting more money in. Active managers may be impelled to act. The market moves higher even if North Korea detonates a hydrogen bomb. Nothing will stop it as long as money keeps pouring into blind money investment facilities.

So what?

While the good times keep rolling, and everyone is earnings sizable returns there is no "So what."

However, this period is very similar to the 1990s when money plowed blindly into Internet related stocks in what former Fed Chairman Alan Greenspan called "Irrational Exuberance." The 1990s boom ended when three events occurred. First, many new Internet concepts simply failed. Second, the economy fell into recession in 2000. Third, confidence in the markets waned and with it the desire to put new money to work buying stocks.

The current market boom would end if any of the following factors caused blind money to dry up. For example, the Trump agenda may not be executed. The Federal Reserve could dry up liquidity by shrinking its balance sheet too rapidly. The value of stocks driven by the boom might reach levels that simply would not justify further investment on a present value basis.

When confidence drops and money flows shift, the computers would act in reverse. They cannot call a bank for a short term loan to time the sale of stock. They must dump the issues into the market immediately. This will not be pretty if it happens. The probability of some event that causes a drop in confidence is high. The timing is unknown. When the computers reverse course, the decline will be sharp and short.

Commentary by Richard X. Bove, an equity research analyst at the Vertical Group and the author of "Guardians of Prosperity: Why America Needs Big Banks" (2013).

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.