Author: shyam

Buying the Dip

Introduction

We often hear about “buying the dip.” What exactly is a dip? Is buying the dip better than a daily SIP?
Read: introduction

Using drawdowns to time purchases

What happens if you buy an index only when it is trading 10% below its previous 100-day peak?
Read: Systematic Buy-the-Dip

Using SMA crosses to time purchases

When a lower SMA (say, 3-day) crosses an upper SMA (say, 200-day) an uptrend is identified. What if one only buys when such a crossover occurs?
Read: Systematic Buy-the-Dip, SMA crosses

SIP frequency

Which one is better? Daily SIP or monthly SIP?
Read:StockViz: Daily vs. Monthly SIP

USDINR and Dollar Indices

Introduction

The FRED publishes the following indices along with USDINR (DEXINUS):
DTWEXB: Trade Weighted U.S. Dollar Index: Broad
DTWEXM: Trade Weighted U.S. Dollar Index: Major Currencies
DTWEXO: Trade Weighted U.S. Dollar Index: Other Important Trading Partners

Can the spread between USDINR and these indices be traded?

Introduction: Part I, Part II

Back-test on daily returns

Should you bet on convergence, divergence of momentum?
Read: Part III

Back-test on weekly returns

Does the daily-return series analysis carry through to weekly returns?
Read: Part IV

Market Cap Deciles

Introduction

Quantitative deciling of stocks based purely on market-cap makese sense.
Read: Market Cap Deciles

Exhibits

Some charts and observations on the different deciles.
Read: II and III.

Investing

Investing in deciles through Themes.
Read: Investing in Micro-caps

Mutual fund portfolio

The number and total weightage of stocks in a mutual fund portfolio belonging to different deciles.
Read: Fund Portfolios and Market Cap Deciles
See: Overlap Tool

Pair Trading

Linear regression

Examining linearity between two stocks – linear regression and interpreting results.
Read: Relationship between a pair of stocks

Co-integration

How do you conclude that a pair of stocks move together?
Read: Bank Nifty vs. HDFC Bank and ICICI Bank

Finding Pairs

Correlation, spreads and co-integration.
Read: Finding Pairs to Trade

Hedge ratio

Hedge ratios, spreads and significance.
Read: The Bank Nifty – ICICI Bank Pair

A pair trading strategy

A simple trading strategy: buy the spread if it is one standard deviation below the average and sell the spread if its is one standard deviation above the average.
Read: Backtesting a Pair Trading Strategy

USDINR and Dollar Indices, Part IV

Please read Part I for the introduction, Part II for a study of the spread between USDINR and the dollar indices and Part III for a spread-trading back-test on daily returns.

Weekly vs. Daily

In our previous posts, we used daily returns to setup the analysis. However, analyzing daily series on currencies and commodities is problematic. They trade 24/7 in a global marketplace and “closing” prices for commodities and currencies are hard to pin down at a granular level across markets. One way to ameliorate this issue is to use a weekly or a monthly series instead.

Here are the plots of the spreads and p-values from the adf-tests applied to weekly returns:
USDINR.DTWEXB weekly spread
USDINR.DTWEXM weekly spread
USDINR.DTWEXO weekly spread

The back-test results mirror that of the daily series, with bets on momentum carrying through on the USDINR and DTWEXM pairs:
USDINR weekly spread trading backtest

This gives us more confidence in our back-tests. We end our series with the following caveats:

  1. Trading the spread involves trading both legs (as discussed in Part III.)
  2. One can only buy a currency by selling another. i.e., buying USDINR implies going long USD and short INR.
  3. Using the above analysis, if a trade involves buying USDINR in one of the legs, it does not inform anything on relative valuation of USD or INR.

Code and charts on github.