Timing Entries and Exits based on Profits and Drawdowns

We previously looked at a couple of popular “buy the dip” strategies – one based on SMA crosses and another based on drawdowns – and showed how they underperform a systematic daily SIP. Further, we showed how a daily SIP is not that different from a monthly SIP here. These studies were based on maximizing the terminal asset size. i.e., a strategy was labeled superior if it accumulated the maximum number of units of an index, mutual fund or stock. They weren’t trading strategies trying to maximize profits but investment strategies looking to maximize assets. Here, we turn our gaze to a strategy that lies in between investment and trading – exiting based on profit-booking and re-entering.

Book profits and re-enter

We often hear media pundits asking their followers to “book profits and re-enter at a lower level.” We wanted to see if it can be quantified systematically. What exactly does it mean in numbers? Is it better than buy and hold? So, we setup a backtest:

  1. Start with a long
  2. Once the long reaches a profit threshold, exit.
  3. Stay out of the market until a drawdown point has been reached and then re-enter.
  4. Do this for NIFTY 50, MIDCAP 100 and SMLCAP 100 indices.

Results

The tables below collate returns for 10-year rolling windows.

NIFTY 50
NIFTY MIDCAP 100
NIFTY SMLCAP 100
‘BH’ indicates buy&hold.
‘RET_SEN’ and ‘RET_MAX’ are the scenarios that produce the best returns, respectively.
‘IR_SEN’ and ‘RET_IR’ are the scenarios that produce the best information ratio and its corresponding returns, respectively.

As you can see, there is no clear winner here. However, there are some configurations that seem to repeat. For NIFTY 50, it appears to be 35%:10% i.e., sell once returns have reached 35%, re-enter on a 10% correction. For MIDCAP, you could probably go with 70%:10% and for SMLCAP, 80%:15%. Below are their respective cumulative and yearly return charts:

NIFTY 50

NIFTY 50 entry/exit
NIFTY 50 yearly

MIDCAP 100

MIDCAP 100 entry/exit
NIFTY 50 yearly

SMLCAP 100

SMLCAP 100 entry/exit
SMLCAP 100 entry/exit

Applying the strategy to MIDCAP and SMLCAP seem to have some merit. However, when you look at the yearly returns chart, it is obvious that a bulk of the out-performance came from just two or three years of the ~20 year dataset. Another key observation here is that these strategies do not offer any significant downside protection. Also, these back-tests do not incorporate the tax impact and transaction costs of these strategies.

Takeaway

“Book profits and re-enter at a lower level” may sound like a nice thing to do but there is no consistent rule that can be applied that can justify the added costs and tax impact.

Code and more charts on github.

ETF Premium/Discount to NAV

Every Exchange Traded Fund (ETF) in India has a mutual fund counterpart. From a regulatory point of view, only mutual fund asset management companies can setup ETFs and an ETF is a special type of mutual fund that happens to trade on a stock exchange. This dynamic allows us to compare ETF closing prices (or last prices, pick your poison) with the corresponding mutual fund NAV to gauge the premium or discount that the ETF is trading at the exchange over the fund.

The calculation is fairly straightforward, it is simply CLOSE/NAV-1. A positive number implies that the ETF is trading at a premium. A negative implies a discount.

Imagine a scenario where you buy an ETF when it is trading at a premium, say, 5%. Suppose the index that it is supposed to track is up 5% and you decide to bank it. You open up your trading terminal and Whoa! The price of the ETF has barely moved. This is because the premium has collapsed and has taken your paper profits along with it.

Think 5% is too much of a difference? Think again. Here is a box plot of the premium/discount of various ETFs over the last year:
mf etf premium discount of closing prices BOX plot
The red dots on the charts are outliers. The black line in the middle is the average. Ideally, you want the box to be narrow with no red dots.

The differences cannot be explained away by the popularity of the underlying indices. For example, have a look at NIFTYBEES (from Reliance) and NIFTEES (from Edelweiss.) They both track the tremendously popular NIFTY 50 index but only the former has decent volumes and hews closer to NAV.

Also, the premiums/discounts vary widely. EQ30 is a glaring example of how widely off the mark an ETF could trade.

Investors who use ETFs to create asset allocation portfolios should be especially aware of this phenomenon. A rebalance could very well wipe out mark-to-market profits if it doesn’t take this into account. Moreover, this is not something that is typically modeled in backtests.

Here is a chart of the daily premium/discount over the last one year for the ETFs used in our EQUAL-III Theme:
EQUAL III portfolio premium/discount

Forewarned is forearmed!

Code and charts are on github.

The Path Dependency of SIP Returns

Our previous post on Lumpsum vs. SIP returns showed how, given the way returns are statistically distributed, lumpsums tend to perform better than SIPs. The analysis side-stepped a lot of issues with using a single market-price time-series by fitting the weekly returns of the index into a Generalised Lambda Distribution and then using that model to run a simulation. This may not seem “real” to most investors. Even through the weekly returns obtained by querying the model is from the same distribution as that of the index, it may not reproduce the exact path that the index took. In this post, we will present a simpler analysis that should be more intuitive.

Random sampling

Most SIP/DCA investors setup a monthly purchase and let it run for a period of time. So we will mimic that process by using monthly returns for our analysis. Moreover, instead of building a statistical model, we will just randomly shuffle the observed set of monthly returns to obtain a return series for our simulation. Each simulation will then end up having the same monthly returns but in a different (random) order. We then calculate SIP/DCA returns for each of those and plot them as a histogram.

Analysis

Here is how NIFTY 50’s randomized monthly SIP/DCA looks like:
NIFTY 50.monthly sip random shuffle
What the above chart means is that both SIP/DCA and lumpsum actual returns are path dependent. A re-ordering of the same monthly returns end up giving vastly different results. This also shows why even if a particular investment gives superior returns, individual investors can still end up with poor returns because of path dependency.

Below are the charts for MIDCAP and SMALLCAP indices:
NIFTY MIDCAP 100.monthly sip random shuffle
NIFTY SMLCAP 100 monthly sip random shuffle

*Key assumption here is that monthly returns are randomly distributed. But trend-followers would disagree on that point.

Code is on github.

Mutual fund portfolio overlap in UpSet charts

Mutual funds come in different shapes and sizes. Very often, fund investors end up being exposed to the same set of stocks even if they invest in different funds. And not only can there be significant overlap in mutual fund portfolios, some fund managers could be “hugging” the benchmark index. For example, a mid-cap fund could have too much of an overlap with the mid-cap index, effectively making it a more expensive version of an index fund. Therefore, it makes sense for investors to check the portfolio overlap of funds that they are considering not only with each other but also with index constituents.

A common way to visualize overlaps is with a Venn diagram. However, when you have more than five sets (portfolios,) a Venn diagram becomes hard to read. Enter UpSet charts. Here is an UpSet chart that our Overlap Tool creates for the HDFC Mid-Cap Opportunities Fund and SBI Magnum Mid-Cap Fund portfolios:
HDFC Mid-Cap Opportunities Fund and SBI Magnum Mid-Cap Fund portfolio upset chart

Key regions of the chart:

  • Bottom-left: size of each portfolio.
  • Bottom-right: the intersection under consideration.
  • Top-right: the size of the intersection.
  • Titles: Funds being analyzed and their portfolio disclosure dates.

In this example, to see the overlap between the two funds, search for the connection between the 1st and the 4th rows in the bottom-right region and look up – you will see the size of the intersection to be 4. i.e., the funds only have four stocks in common even through each one has more than 50 stocks in its portfolio.

We have included some common indices to help investors identify index-hugging as well. You can run the Overlap Tool here. For an intro to the other tools available on StockViz Tools, please read this post.

Is Skewness a Timing Signal?

We recently came across a post titled “IMPROVING THE ODDS OF VALUE” (link,) where the author uses the skewness of one-year daily returns to time the value factor. Here, we try to replicate/extend the original backtest.

Key differences

We had to make some tweaks to simplify the task:

  1. The original uses a one-year lookback period, we use a 220-day (trading days) lookback. [minor]
  2. The original uses the S&P 500 index, we use the SPY ETF. Our prices are adjusted for dividends. [minor]
  3. The original constructs a long-short value portfolio. i.e., an academic alpha portfolio. We use it to time the IVE ETF which tracks the S&P 500 Value Index. [major]

We expected the major premise of the original post – that you can go long value during periods of positive skewness and go into cash otherwise – to hold. And perhaps provide some marginal advantage while using it to time a long-only value ETF.

Results

We observed the exact opposite result. Going long IVE during periods of positive skewness under-performed going long IVE during periods of negative skewness. In the cumulative returns chart below:

  • the black and red lines are buy&hold IVE and SPY,
  • the green and blue lines are IVE returns when being long during periods of positive and negative skewness, respectively,
  • the cyan and purple lines are SPY returns when being long during periods of positive and negative skewness, respectively,

cumulative returns using skewness for timing (IVE/SPY)
Note how buy&hold vastly out-performs the timing portfolio.

Further, if you rotate into a liquid fund (earning risk-free returns) instead of going into cash (earning zero), the SPY returns being long during periods of negative skewness beat buy&hold SPY returns:
cumulative returns using skewness for timing with risk-free rate (IVE/SPY)

Perhaps, we are seeing these totally different results because we are long-only and the original back-test was long-short? We are not entirely sure.
Also, the out-performance we observed on SPY failed to replicate on the NIFTY 50 and NIFTY MIDCAP 100 indices.

Code, charts and backtest results for NIFTY 50 and NIFTY MIDCAP 100 indices are on github.