Infinite Decay Trade: Preliminary Data Ingestion and Next Steps

I’ve decided “Infinite Decay” would be a good name for the trade strategy outlined in the previous blog post  about shorting bear call spreads on inversely-correlated leveraged ETFs to take advantage of the following:

  1. Underlying: Beta slippage of leveraged ETFs
  2. Underlying: Decay from futures roll yield
  3. Negative correlation of ETFs (neutral underlying neutral exposure)
  4. Options: Theta decay
  5. Options: Implied Volatility premium

This post will outline preliminary work I’ve completed with some comments regarding technical, trading, or financial aspects, and tangible next steps to pursue.

A. Completed: Preliminary Data for Tickers

Wrote a bit of Python code (Git Repo below) to connect to the Interactive Brokers API to pull down closing data for the preliminary Exchange Traded Notes (ETNs) to investigate.

  • Gold: $NUGT / $DUST
  • Natural Gas: $UGAZ / $DGAZ
  • Energy: $ERX / $ERY
  • Small Cap: $TNA / $TZA
  • NASDAQ: $TQQQ / $SQQQ
  • SP500: $UPRO / $SPXU
NUGT vs. UGAZ
Comparison of $NUGT vs. $DUST
  1. Data
    Data goes back to the start of these tickers, but will need to take various slices to reflect market and macroeconomic regimes
  2. Missing Data
    A bit of processing needed to process the data stream from the IB API since some dates were missing. Missing entries were filled with the closing prices of the previous close, with percent gain set to zero
  3. Index
    The “Index” column starts at an arbitrary 1,000,000 on the first day of data to simulate an outright long position. Can adjust accordingly
  4. Google Docs
    I’ve uploaded into the Folder: Infinite Decay the following:
    – Raw data files from IB with the ticker names
    – Processed versions combining the pairs: Pair – < Bull Ticker > & < Bear Ticker >

B. Open Source Code

I’ve decided to open source as much of my code as possible so that I can be as useful as possible to anyone I interact with. I take the view that there are no real lasting secrets ideas in the markets and that long-term consistent profitability is ~100% execution.  Even if you can somehow emulate execution blindly with all secrets at a certain point in time, the markets continuously evolve so much that your ideas, trade strategies, and code will need to be updated anyways. Essentially, it’s not first-order competence as in what your trade strategy is or what code you wrote, but second-order competence at how well you can adapt the strategy and write better code, and even third-order competence as in how “fast” you can iterate and improve.

The code will be staged at in this GitHub repo:
https://github.com/postbio/infinite_decay

  • Python Code
    It provides working Python code to connect to the Interactive Brokers API, which works with either TraderWorkstation and/or IB Gateway clients. Much more to write here that could involve a series of blog posts. Beyond the scope of this post, but I might write some tutorials if requested, along with more documentation of the code.
  • Preliminary Uses
    Main function: Downloads historical tick data given various parameters such as functions, time frames, etc. for the leveraged ETF tickers above, along with code that processes and normalizes that data to be uploaded to the Google Doc  Folder: Infinite Decay

C. Immediate Next Steps

  1. Research ETN Fundamentals
    Compile larger list of inversely correlated tickers and skim all the prospectuses of Exchange Traded Notes, for example, $UGAZ / $DGAZ to see if there’s any hidden bombs I should be worried about
  2. Additional Ticker and Options Data
    Download and normalize relevant ticker and associated options data such: volume (important!), daily implied volatility, and historical volatility for the tickers above and rank in terms of liquidity.
  3. Specific Market Understanding
    General reading of the markets and futures markets of the commodity or area that these ETNs and futures track
  4. People and Blogs
    Start following traders in this general strategy and/or these markets, and compile list of blogs or articles.

D. Additional Thoughts

My initial thinking on this particular strategy involves symmetrical options spreads to take advantage of the decay, but was also thinking of further improvements. Will need to be very open-minded in related strategies to adapt to market conditions

For example, take an outright short position in the underlying while buying cheap and long far out of the money options position as a cheap hedge. This might be necessary if the options markets are not very liquid, in terms of large bid-ask spreads or low volume or open interest.

Don’t count out the possibility of temporarily modifying the trade if given a very strong reason, such as a large market shock, either via biasing the trade one way or taking an outright uncovered long position Bullish or Bearish the market.

Author: postbio

Trading blog

Leave a comment