Random Walk Trading Strategy

Random Walk Trading Strategy – Understanding and Backtest Example

Burton Gordon Malkiel in his famous book — A Random Walk Down Wall Street — popularized the random walk model of the financial markets. According to him, the market moves randomly and its direction cannot be predicted with technical or technical analyses. But is the market truly random, and what is a random walk trading strategy?

A random walk trading strategy is a strategy that is, as the name implies, based on random numbers and inputs. As you’ll see in this article, even presumably solid trading strategies can be made solely by random entries and exits.

The Random walk theory is a financial market model that assumes that stock prices move in a completely unpredictable way. With no degree of predictability in the movement of stock prices, it means that stock prices are random thus using historical prices to forecast future price movements is futile, as changes in stock prices have the same distribution and are independent of each other. The random walk strategy demands that you invest in a diversified portfolio, preferably a broad market index fund.

In this post, we take a look at the random walk concept and how to apply it to trading. At the end of the article, we make a backtest of the strategy.

(We recommend Burton Malkiel’s book. It’s a good book about investing and lets you understand more how markets work.)

What does the random walk trading strategy mean?

Random Walk Theory

Random walk theory is a financial market model that assumes that stock prices move in a completely unpredictable way. In other words, the future price of each stock is independent of its own historical and current price movement and market reactions to news about the stock are random. This hypothesis assumes that all forms of stock analysis — technical, fundamental, and sentiment analyses — are unreliable and pointless.

With no degree of predictability in the movement of stock prices, it means that stock prices are random. Thus using historical prices to forecast future price movements is futile, as changes in stock prices have the same distribution and are independent of each other.

A stock that is priced at $50 today can sell for $70 or $30 tomorrow, and there is no way of knowing which way it would go. According to this theory, the stock price movement is like the toss of a coin — it could come up head or tail, and you cannot know which side it would be.

Since the past movement or trend of a stock price or market cannot be used to predict its future movement, it is pointless trying to analyze how the price might move in the future. If stocks take a random and unpredictable path, then all methods of predicting stock prices are futile in the long run. So, one may be better off making random entries and exits, and this is the random walk trading strategy.

The random walk trading strategy assumes there is a 50% probability that the stock price will rise then there is a 50% probability that the stock price will fall. And as such, it is difficult to beat the market. Even if that is true — that stocks have a 50% chance of rising or falling, a study of the broad market index, such as the S&P 500 index, shows that the market has a tendency to go up over the long run, in spite of the short-term fluctuations. We have made a separate article that covers the “overnight trading edge“.

If that is the case, a random walk trading strategy that only buys an index ETF might present a good way to make money off the market.

How a random walk trading strategy works

The application of the random walk theory in trading is that you don’t put all your eggs in one basket, as at every point in time, the stock has a 50% chance of rising or falling. If you risk all of your hard-earned cash on that single stock, if the stock’s price falls, you lose money, and if it rises, you gain money. Since the movement is random, you don’t know when it’s going to rise or fall, and your ability to gain or lose is tied to that one stock.

The best strategies can be found in our….

Strategy Shop

Backtested trading strategies

With the random walk trading strategy, you spread out your risk in a bunch of different stocks instead of putting it all into a single stock. So, when one stock performs poorly, another stock might perform better and counteract the loss from the poorly performing stock. This minimizes your chances of losing everything and may also lead to more returns in the long run.

The key takeaway from the random walk trading strategy is to stop trying to time the market and instead, use the powers of risk diversification to our advantage.

We have in previous articles covered the difficulty of timing the market (if you’re a long-term investor):

Efficient market hypothesis – a random walk

You may be wondering how the random walk theory relates to the efficient market hypothesis. Let’s find out.

According to the random walk theory, share price movements are caused by random and unpredictable events.

For instance, how the market reacts to unexpected events depends on how investors perceive the event, which is random and unpredictable too. As a result, trying to analyze and time the market is a futile adventure.

The efficient market hypothesis (EMH), on the other hand, theorizes that asset prices reflect all information available in the market, so it is not possible to find any edge in the market, let alone beat the market. The EMH is classified into three distinct tiers:

  • Weak Form EMH: In this version, all past information, such as historical trading prices and data regarding volume, is reflected in the market prices. So, there is no need to perform technical analysis to find an edge.
  • Semi-Strong EMH: In this version, all public information, including news and company earnings, available to all market participants is reflected in the current market prices.
  • Strong Form EMH: In this version, all public and private information, even the knowledge of insiders, is reflected in the current market prices.

Obviously, the random walk and efficient market theories are based upon different assumptions — the former assumes that the market is random, while the latter assumes that the market is efficient. However, both hypotheses arrive at virtually the same inference, which is that it is nearly impossible to consistently outperform the market. They both support passive investing in broad market index funds over active trading strategies.

Despite their similar conclusions, both theories diverge in so many ways. Here is a table that shows the differences:

Efficient Market HypothesisRandom Walk Hypothesis
The market is assumed to be efficient, so market prices can neither be undervalued nor overvalued.The market is irrational and walks randomly in any direction it pleases at any point in time — doesn’t care whether you adjudge it overvalued or undervalued.
The theory assumes that the market corrects itself instantaneously once new information is made public.Movements are random, as participants’ reactions to any new information are random.

The problem with both theories is that they fundamentally contradict each other. If the market were hypothetically efficient, as proposed under EMH, then asset prices are rational, so market fluctuations are not necessarily random as claimed by the random walk theory.

On the other hand, if the random walk theory were valid, it implies that the market is irrational, which negates the proposal of the efficient market hypothesis.

Another issue with the EMH is the assumption that the market corrects itself instantaneously once new information is made public. But many times, share prices take time before stabilizing, especially for thinly traded securities. Whichever way, one cannot deny the influence of unexpected events. There are recognizable trends and behavioral patterns among market participants, such as momentum and overreaction, which can directly impact share prices.

Both the Random Walk Theory and EMH are based on strict assumptions that are unlikely to be realistic. And, as proven by many investors and traders, some go on to make spectacular track records over many decades. One of them is Warren Buffett. This is what he once said about the EMH:

I think it’s fascinating how the ruling orthodoxy can cause a lot of people to think the earth is flat. Investing in a market where people believe in efficiency is like playing bridge with someone who’s been told it doesn’t do any good to look at the cards.

What are the rules for the random walk trading strategy?

The key to the random walk trading strategy is diversification, which allows you to take advantage of the supposed randomness in the market. But how do you build a diversified portfolio of stocks? There are basically two ways of doing that:

  • Build a stock portfolio on your own: You can build a diversified portfolio of stocks by investing in stocks in different industries and sectors. The idea is to buy stocks that are not correlated so that when some are not performing well, others that are performing well would offset the losses. You should have a portfolio of more than 20 stocks in different industries and market sectors.
  • Invest in a broad market index ETF: An easier way to achieve diversification is to invest in a broad market index fund. A broad market index tracks the entire market, unlike a sector index that tracks only a market sector. A broad market index fund takes your money and spreads it out across a shared reasonable portfolio of the entire market, so your money is well diversified. With a broad market index fund, to lose all of your money, the entire market would have to crash. And, realistically, the likelihood of the entire market crashing is much lower than the risk of an individual stock crashing. Some of the popular index funds you can trade include:
  • iShares Core S&P 500 ETF (IVV)
  • Invesco QQQ ETF (QQQ)
  • Fidelity ZERO Large Cap Index (FNILX)
  • SPDR S&P 500 ETF Trust (SPY)

Pros and cons of the random walk strategy

There are many merits and demerits of the random walk investment strategy. The merits include the following:

  • Passive investing: The random walk strategy recommends passive investing, which does not require you to try to time the market or pick individual stocks you think may become winners. So, you remove the possibility of getting it wrong and simply move with the market. You invest and forget about it. Women have proven to be better investors than men, and the most likely reason is that they are not trying to be smart. They invest and forget about it.
  • Diversification: The random walk strategy emphasizes diversification as a way to reduce the risk of individual stocks performing poorly after buying them.

The demerits of this strategy include the following:

  • Systemic risk: Neither building a stock portfolio nor investing in an index fund removes systemic risk. The entire market can crash and you lose money. No amount of stock portfolio diversification can remove that risk. However, the best way to hedge against systematic risk is to have uncorrelated assets.
  • Unlikely to become rich, or at least require a lot of time: It is difficult to make a lot of money investing in an index fund unless you already have a lot of money. It takes decades to save and invest to make a decent nest egg. Many are dreaming of becoming a F.I.R.E.:

Charlie Munger, Warren Buffett’s friend, and partner, once said that the best edge in the market he and Warren have is that they are trying to get rich slowly, not quickly.

Where does it originate from? (History)

The random walk theory was first coined by French mathematician Louise Bachelier, who believed that share price movements were just like the steps taken by a drunk — unpredictable! But it was economist Burton Malkiel who made the theory popular through his book, A Random Walk Down Wall Street.

Published in 1973, the book explains that stock prices take a completely random path. As such, the probability of a share price increase at any given time is exactly the same as the probability that it will decrease. In fact, Malkiel argues that a blindfolded monkey could randomly select a portfolio of stocks that would do just as well as a portfolio carefully selected by professionals.

The random walk hypothesis is related to the efficient market hypothesis, an earlier theory posed by University of Chicago professor William Sharp. Malkiel’s book is frequently cited by those in favor of the efficient-market hypothesis, as both theories agree it is impossible to outperform the market. Whether you agree or disagree with the theory, we strongly recommend reading the book.

However, while the EMH argues that the market is efficient and all of the available information will already be priced into the stock’s price, random walk implies that the market is irrational.

Sharp and Malkiel tried to show that it is impossible to exploit mispriced stocks consistently because price movements are mostly random and driven by unforeseen events. They are of the opinion that, due to the short-term randomness of returns, investors would be better off investing in a passively managed, well-diversified fund. And the evidence is pretty strong against the small retail investor: they, as a group, underperform massively, but also because they do cognitive mistakes (buy tops and sell into panics).

Random walk strategy example

The most well-known practical example of random walk theory was the experiment performed in 1988 by the Wall Street Journal. The Journal sought to test Malkiel’s theory by creating the annual Wall Street Journal Dartboard Contest, where they pitted professional investors against darts for stock-picking supremacy. In the experiment, a total of 140 contests were held, and Wall Street Journal staff members played the role of the dart-throwing monkeys.

The results showed the experts won 87 of the contests and the dart throwers won 55. However, when compared to the Dow Jones Industrial Average (DJIA), experts were only able to beat the DJIA in 76 contests, which is not a statistically significant difference. Reacting to the result, Malkiel suggested that the experts’ picks could have benefited from the publicity jump in the price of a stock that tends to occur when stock experts make a recommendation.

Since the experts could only beat the market half the time, when you consider management fees, it becomes clear that investors would be better off investing in a passive fund that charges far lower management fees.

Random walk trading strategy backtest

In spreadsheets and trading programs, you can easily make a strategy that enters randomly. We use Amibroker to backtest (read our Amibroker review), and it takes just a couple of minutes to make a backtest with trading rules and settings.

We make the following trading rules for our random walk strategy backtest:

Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 400 ARTICLES WITH BACKTESTS & TRADING RULES

Our first backtest is done in stocks (S&P 500 – SPY). The equity curve looks like this:

Random walk trading strategy
Our random walk trading strategy performs pretty well on stocks (S&P 500).

The equity curve looks good, but the main reason is the tailwind from stocks. The trading statistics and historical performance metrics are good: The average gain per trade is 0.37%, the profit factor is 1.7 (profit factor example), and the max drawdown is 13% (how to calculate a drawdown in trading). All in all, not too bad for a completely random entry 12 times per year.

Let’s make a second backtest on the gold price. To make it simple we use the gold price ETF with the ticker code GLD.

The equity curve looks like this:

Random walk trading strategy backtest
The random walk strategy doesn’t perform well on the gold price (GLD)

We were not able to replicate the positive result in GLD that we had in stocks (S&P 500). The average gain is a negative 0.08%. The GLD result needs to be compared to the positive drift in the gold price over the backtesting period, thus making the result even more miserable.

Do you want Amibroker code or the rules in plain English?

The Amibroker code for the random walk strategy can be purchased. It’s included in the product described below:

We have made the trading rules for our best free trading strategies available for a small fee. If you are Python trader we believe our database is a potential goldmine (you can read more about Python trading – backtesting and examples). Additionally, all strategies come with code. For a full list of the 150 different strategies, please press the banner below:

Random walk trading strategy – ending remarks

Most of the price action in any financial market is random, thus making short-term trading difficult.

Luckily, there are still possibilities, and we believe the best route is what we are doing on this website: we make strict trading rules to quantify and backtest. If we find anything that works, we incubate it. If it is validated, we trade it live. You can read more about backtesting in our course:

We believe the best market to trade is the stock market. The reason is simple: you have an edge in the “constant” drift upward in the form of inflation and productivity gains. There is no coincidence that our random walk trading strategy managed to produce decent results simply by entering randomly.

FAQ:

How does a random walk trading strategy work?

The strategy involves diversifying risk across multiple stocks to mitigate losses from poorly performing stocks. The application of the random walk theory assumes a 50% probability of a stock price rising or falling at any given time. By spreading investments across various stocks or using a broad market index fund, the strategy aims to take advantage of market randomness.

What are the rules for the random walk trading strategy?

The key rule is diversification, either by building a diversified portfolio of stocks across different industries or investing in a broad market index ETF. The strategy assumes a 50% probability of stock prices rising or falling, emphasizing passive investing and risk diversification.

How is the random walk theory related to the efficient market hypothesis (EMH)?

Both the random walk theory and EMH suggest that it is nearly impossible to consistently outperform the market. While the random walk theory asserts that market movements are random, the EMH argues that asset prices already reflect all available information, making it difficult to find an edge in the market.

Similar Posts