Money Flow Index Strategy

Money Flow Index Strategy (MFI) | Backtest Analysis

Understanding volume and price, and how they can influence the market, is very important in trading. Since volume is the measure of activities in the market, traders can use the information provided to increase the probability of their trades. A great indicator that combines price action and volume is the money flow index. Now, what is a money flow index?

The money flow index (MFI) is a momentum indicator that measures the flow of money into and out of a security over a specified period of time by combining price and volume data. It oscillates between 0 and 100 and shows overbought and oversold conditions in the market. The indicator can be used for predicting potential price reversal points in the market.

This article focuses on the money flow index and how traders use it in their trading. At the end of the article, we provide a backtest of the strategy.

What is the money flow index?

The money flow index indicator or simply the MFI oscillator is a popular trading indicator used for predicting reversals in the market. It is used to gauge the buying and selling pressure within security. Just like conventional momentum-based indicators, the MFI oscillates between 0 and 100 and shows overbought and oversold conditions in the market.

One interesting thing about the MFI is that it does not consider only price but also includes volume. In fact, it can be considered a volume-weighted Relative Strength Index indicator because its formula is similar to that of the RSI but with volume added to the mix.

The MFI generates signals similar to those seen on several other technical indicators. This consists of producing oversold and overbought signals as well as the common bullish and bearish divergence signals. The overbought signal is given whenever the indicator is above 80, while the oversold signal is generated when the indicator is at 20 or below.

A bullish divergence MFI signal would occur when the price is creating lower lows or in a downtrend and the MFI is creating higher lows or in an uptrend. In the same way, a bearish divergence MFI signal would occur when the price is creating higher lows or in an uptrend, while the MFI indicator is creating lower lows or in a downtrend. To spot a divergence, you can employ the use of trendlines on both price and the indicator.

The money flow index indicator is commonly used to trade reversals. For this, traders typically look for a cool-off in momentum in an uptrend as the indicator reaches the overbought level or when a bearish divergence signal is generated to know that the uptrend may soon turn to a downtrend. On the flip side, traders will look out for a cool-off in selling pressure in a downtrend when the indicator approaches the oversold level to anticipate an upward reversal.

Money flow index formula

The mathematics behind the money flow index is a bit complex. To get the indicator reading, we have to:

  1. Determine the typical price. This is gotten by adding the high, low, and close and dividing by three. If the typical price for today is less than that of the previous day, this indicates a negative money flow. Whereas if today’s typical price is greater than yesterday’s typical price, then we have a positive flow.
  1. Calculate the raw money flow. It is computed as the product of the typical price and volume.
  1. Next, calculate the money flow ratio as the positive money flow of a given period divided by the negative money flow of a given period.
  1. Finally, the money flow index is calculated as follows:

Calculating this manually can be quite confusing especially if you are not the type who loves mathematics. This is just to help you understand the principles of generating the figures on your indicator. The indicator is usually built into most trading platforms and simply plots the line when attached to a trading chart.

What is the best money flow indicator?

People usually confuse the Chaikin money flow (CMF) oscillator created by Mark Chaikin and the money flow index created by Avrum Soudak and Gene Quong. The similarities between the Chaikin money flow oscillator and the money flow index end with the idea that they are both commonly used by active traders to monitor the flow of money and/or momentum.

While CMF is based on price data alone and uses two exponential moving average to estimate price momentum, the MFI combine price and volume data in calculating market momentum. Both indicators are good in their own way, and which is best depends on how the trader wishes to use them. However, some traders may prefer the MFI because it includes the volume data in the calculation.

Is the money flow index a good indicator?

The performance of an indicator is dependent on many factors.

Most importantly, the techniques of the user would be a determining factor. In general, the MFI is a reliable indicator that helps to tell you the direction of money flow in a given security.

For instance, if you are long a stock and suddenly the MFI is dropping to lower levels, this could mean that more people are cashing out of the stock and may indicate a change in trend — alerting you to plan to exit. Same way, it can give you confirmation when looking to buy a stock. A rising price with a rising MFI simply tells you that more money is flowing into the given security.

What are the best Money Flow Index settings and rules?

Now that we know what the money flow index is, and how it is calculated, let’s take a deeper look at the signal it generates. As we discussed earlier, the two basic signals that are produced by the MFI are the overbought and oversold trading signal, and the bullish divergence and bearish divergence trading signal. Let us take an individual look at these trading signals.

According to the indicator rules, the market is in an overbought condition whenever the MFI approaches a level of 80 or higher. When this occurs, traders look for opportunities to go short in the market in anticipation of a bearish correction. On the other hand, the market is oversold when the indicator approaches the level of 30 or below. When this occurs, traders look for an opportunity to go long in anticipation of a rally.

However, some traders may prefer to use a higher level than 80 (e.g. 90) as an overbought threshold and lower for oversold (e.g. 10). Although there is nothing wrong with choosing a preferred level, the market most times do not reach this level before a correction. The 80/20 level is the generally used threshold for most markets.

The oversold and overbought trading signal works very well in a market trading within a well-established range. You should be careful when using the MFI oversold and overbought trading signal when the market is moving in one direction with strong momentum. As a rule, you should trade in the direction of the trend; counter-trend trading is not suitable for most traders, especially beginners. So, in an uptrend, use the oversold signal to know when a pullback is about to end so you can ride up the next impulse wave. In a downtrend, use the overbought signal to know when a rally is exhausted so you can ride down the next impulse wave.

As for the settings, the default lookback period is 14 days. However, it can be set to a lower and higher number. Generally, just like other indicators, a higher look-back period gives fewer signals and can be more reliable, while a lower look-back period generates many signals, many of which are false signals. However, the right setting would depend on the market and the strategy you are using. Different markets may require different settings. The only way to know the best setting for the market you want to trade is to code your strategy and backtest it.

MFI Trading Strategy

Let us use all the principles we have learned so far (at least in theory) to create a trading strategy for the Money Flow Index oscillator.

To avoid complicating things, we will create a strategy using some of the basic criteria for entering and exiting positions. This strategy will make use of two main components. The first is the presence of an oversold and overbought condition on the MFI indicator. The second is the formation of a bullish engulfing pattern for a long trade and a bearish engulfing pattern for a short trade. What we are trying to accomplish here is to take advantage of short price extremes in the market. Let us dive further into the rules of the strategy now.

For a buy trade, the following criteria must be met:

  • The market should not be in a strong trend, but instead, in a relatively range-bound condition.
  • The MFI indicator should be at a level of 20 or lower.
  • There should be an existence of a bullish engulfing candle in the prior candle on the price chart.
  • When the above conditions are met, a buy order can be placed immediately following the completion of the bullish engulfing pattern.
  • Stop loss should be placed below the low of the candle before the bullish engulfing candle.
  • The target can be set in a variety of ways. First, you can take 60% of the range from the prior candle’s low before the pattern and add it to your entry price. Secondly, you can exit once the indicator reaches an overbought level.

For a sell trade, the following criteria must be met:

  • The market should not be in a strong trend, but instead, in a relatively range-bound condition.
  • The MFI indicator should be at a level of 80 or higher.
  • There should be an existence of a bearish engulfing candle in the prior candle on the price chart.
  • When the above conditions are met, a sell order can be placed immediately following the completion of the bearish engulfing pattern.
  • Stop loss should be placed above the high of the candle before the bearish engulfing candle.
  • The target can be set in a variety of ways. First, you can take 60% of the range from the prior candle’s high before the pattern and subtract it from your entry price. Secondly, you can exit once the indicator reaches an oversold level.

MFI Stock Trading Strategy

In order to make sense of what has been discussed above, let us see how the MFI works on two different stock market security. First, we will examine the S&P 500, a popular benchmark of the US economy.

Money Flow Index Strategy
Money Flow Index in the S&P 500 Mini Futures.

As you can see from the chart above, the market trend is not that strong. Note the highlighted point on the chart where the indicator showed an overbought signal, the market was in a steady uptrend, which was soon followed by a correction when the bearish engulfing pattern surfaced. This can offer lots of trading opportunities to short-term traders.

MFI Gold Trading Strategy

The same principles can also be applied to Gold or currency trading. See the chart of Gold below and identify the reversal point.

Money Flow Index strategy example
Money Flow Index in Gold.

You can see on the above chart that there was a reversal on every highlighted point that follows the strategy. Understanding the flow of money in and out of a given security can you give you insights that can add more accuracy to your trades.

In summary, the money flow index is a great timing tool when used in the right manner. It adds the vital volume component in calculating price momentum, which could make it a more reliable method of determining market momentum. Whether or not the indicator can make money depends on how it is used. The only way to know if a money flow index strategy can make money is to backtest it.

Money Flow Index strategy – backtest

Let’s do a backtest of the strategy with trading rules and settings. We make the following trading rules:

Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________ Click Here To Get Access Click Here To Get Access To Trading Rules

We tested different values for the best settings for the MFI indicator, and it seems like a short lookback period is best (on stocks).

We would argue that these trading rules are as simple as it gets. But does simplicity work?

The strategy works well on S&P 500, but first let’s instead look at the performance of Pepsi (PEP):

Money Flow Index (MFI) strategy

Since 2000, it was 581 trades, and the average gain was 0.42%, more than enough to offset any costs related to commissions and slippage. The win rate was 71%, and the profit factor was 1.8.

Perhaps more interesting is the annual return of 10.4%, which is higher than the buy-and-hold return of 9.8% annually. The strategy is invested only 39% of the time; thus, the risk-adjusted return is a solid 26%.

The result for SPY is in the same ballpark as PEP:

Money Flow Index (MFI) strategy backtest

CAGR is 10.6% (vs. 9.7% for buy and hold) and it’s invested 35% of the time.

Let’s backtest both PEP and SPY as one portfolio. Whenever PEP or SPY gets a signal, we allocate 100% to the position, thus ignoring any other signal if we have a position. These two are pretty correlated, though.

The backtest returned the following equity curve:

The strategy had its best time in the 1990s but has taken off again during the last five years. CAGR is 15%, and it’s invested 48% of the time.

How does the strategy perform on gold (GLD)? Not good, to say the least:

Money Flow Index (MFI strategy performance

That was to be expected. Mean reversion doesn’t work on commodities. This doesn’t invalidate our strategy whatsoever. You can’t expect a strategy to work on every asset class.

List of trading strategies

We have written over 1000 articles on this blog since we started in 2012. Many articles contain specific trading rules that can be backtested for profitability and performance metrics.

The trading rules are compiled into a package where you can purchase all of them (recommended) or just a few of your choice. We have hundreds of trading ideas in the compilation. The code we have used in this post is included.

The strategies are taken from our landing page of EOD strategies.

The strategies also come with logic in plain English (plain English is for Python backtesting).

For a list of the strategies we have made, please click on the green banner:

These strategies must not be misunderstood for the premium strategies that we charge a fee for:

FAQ:

What is the Money Flow Index (MFI) and how does it work?

The Money Flow Index (MFI) is a momentum indicator that combines price and volume data to measure the flow of money into and out of a security over a specific period. It oscillates between 0 and 100, indicating overbought and oversold market conditions. The MFI is useful for predicting potential price reversal points.

How is the MFI different from other momentum indicators?

The MFI stands out by incorporating both price and volume data. It can be considered a volume-weighted Relative Strength Index (RSI) because its formula is similar to RSI, but with the inclusion of volume. This distinguishes it from conventional momentum-based indicators.

What signals does the MFI generate, and how can traders use them?

The MFI generates signals such as overbought (above 80) and oversold (at 20 or below). It also produces bullish and bearish divergence signals. Traders use these signals to anticipate potential reversals in the market. For example, an overbought condition may suggest a bearish correction is imminent.

Similar Posts