AlgoGen

Features
Sign up

The effects of dodging the worst days

In which we examine how our bottom line changes if we were able to avoid the worst trading days

A bad day in the markets

A bad day in the markets

Fidelity has previously published ideas for disciplined investors, looking at the effects of missing the markets' best performing days. In short, missing the top 10 days cuts your investment returns in half. This should put the buy and hold investor at ease holding their assets through volatile periods. The research is available here.

But what about holding through the worst performing days in the market? How much are we sabotaging our portfolios by holding when the market is losing ground?

Let's look at the returns of various ETFs.

First we need to load some data. For this purpose, we'll examine the last 15 years. That's about the number of years that I could have been investing.

val logger = LoggerFactory.getLogger(etf.ticker)
val startDate = LocalDateTime.now().minusYears(15)
val data = loader.download(etf).dropWhile { it.datetime.isBefore(startDate) }

First we create a logger to communicate our results. Then we define the research period to be 15 years. And finally we download the ETF data and drop all rows before our start date.

Next we want to get access to the close prices of the asset.

val closePrices = data.map { it.close.toDouble() }
closePrices.toChart()

SPY

SPY

We're not interested in the nominal value but rather in the daily returns of the ETF.

val dailyReturns = closePrices.asReturns()
dailyReturns.toChart()

SPY daily returns

SPY daily returns

Moving on, we'd like to create an equity curve representing a $10,000 buy and hold investment. This is the equity curve that we'll use as a baseline.

val equity = dailyReturns.equityCurve(10_000.0)

And now the important bit - we'd like another equity curve with $10,000 invested, but this time we'll remove the 10 worst trading days from the data.

val topLosers = dailyReturns.sorted().take(10)
val returnsWithoutTopLosers = dailyReturns.filter { !topLosers.contains(it) }
val equityWithoutTopLosers = returnsWithoutTopLosers.equityCurve(10_000.0)

Let's see it

val dataset = listOf(
    equity.toXYSeries("Buy & Hold"),
    equityWithoutTopLosers.toXYSeries("Removed worst losers")
).toDataset()
dataset.toChart()

SPY without its worst losing days

SPY without its worst losing days

SPY - Buy and hold: 30136
SPY - Without top losers: 71134

This pattern holds true for other ETFs:

QQQ without its worst losing days

QQQ without its worst losing days

QQQ - Buy and hold: 75613
QQQ - Without top losers: 165811

IWM without its worst losing days

IWM without its worst losing days

IWM - Buy and hold: 31591
IWM - Without top losers: 85848

Now if there was only a way to predict the worst market days...


Interested in more? Check out:

Crypto bear markets and leverage

We look at the effect of investing in the top 10 cryptos during a bear market.

Crypto bull runs and leverage

We look at the effect of investing in the top 10 cryptos during a bull run.

The Effects of holding ETFs with leverage

Trading with leverage can be risky because gains and losses are magnified. This post explores the magnitude in change of gains and losses.

MetaTrader 4 Keltner Channel

The source code for a custom MT 4 Keltner Channel indicator

Join the AlgoGen community

Sign up
Blog

Risk Disclosure:

Trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones' financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Hypothetical Performance Disclosure:

Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown; in fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk of actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all which can adversely affect trading results.

© AlgoGen 2021 All rights reserved.