Skip to main content

I've Gone Mad (and Created a Trading Algorithm)

It was around 2 in the morning, and I hadn't slept in days. I was feeding a baby a bottle with one hand while holding my phone in the other. My wife had just given birth to twins a few days earlier. I was looking at the state of my investments. The chart on my screen looked like this:


When the startup I worked for was acquired in 2014 I had received a $200k windfall. Being clueless about investing, I spent an hour investigating options and then chose to put it all into a robo-advisor. Over the next few years I kept adding money as the shares from the acquisition vested. The results weren't bad10.6% annual returns. But I had underperformed the market and that didn't sit well with me.

I want to get to the next rung on the wealth ladder. The lifestyle I desire requires wealth of around $10M net worth. I want a house on the water in Florida and a boat. Now don't get it twisted: this isn't something I need. It's certainly not going to make me happy. I know damn well that money doesn't buy happiness. But I still want that boat.

Risk On

I spent that night, and a bunch of nights afterwards, researching investment strategies. I realized pretty quickly that stock picking was a bad idea. I dropped $100K into crypto, but there are too many unknowns to invest any more there. I decided to just stick with a stock market index, but add some risk via leverage.

I did the following:

  • Withdrew everything from the robo-advisor
  • Invested 50% into a 90/10 portfolio
  • Invested 50% into TQQ (3x daily leveraged Nasdaq 100)

And then this happened:

TQQQ shot up 45% over the next 5 months! Those were incredible results, but it was a bumpy ride! There was a maximum drawdown of 22%. That's something a normal investor would only experience during a pretty major market correction. There were days when I'd be up or down 5%. I thought it was thrilling. I loved the big ups and downs.

Backtesting

I may be crazy, but I'm not stupid. I'm willing to take on big risk for big returns, but I need to know that the odds are in my favor in the long run. So I decided to backtest TQQQ to see how it would have performed over the long run in the past:


This is pretty incredible and terrifying at the same time. One dollar invested in 1985 would have been worth $6000 by 2000. And then it all came crashing down when the dotcom bubble popped. But it still managed to somehow climb back out of the hole eventually and has had a great run recently. There's actually another big crash in 2008 that you can only see using a logarithmic scale:


Being the madman that I am, I look at this chart and see opportunity. I'm not crazy enough to simply buy and hold this. I'd be just asking to get wiped out. Instead, I have to find a way to tame this wild beast. I decided to create a trading algorithm. I am a software engineer after all. I started backtesting a bunch of strategies to see if I could find one that provided this kind of upside but with less downside. I ended up finding one that really stood out.

The Algorithm

I'm not going to give away the algorithm. At least not the details. I'll provide a high level overview though:

  • Holds long-only positions in futures contracts. I love futures due to capital efficiency, liquidity and extended hours.
  • The "money maker" is NASDAQ 100 futures
  • Hedges are T-Bond futures and VIX futures
  • Positions are rebalanced daily
  • Variable leverage based on recent market conditions
This isn't a market-neutral strategy or anything. I still have to ride the waves of the market. There will be good times and bad times. But hopefully the good times will outweigh the bad times. I was able to find solid data for these products going back to 2007. Here's what the backtest looks like:



You never know what the future holds, but I like my odds based on the backtest. The strategy was able to survive a global financial crisis, taper tantrum, flash crash, and a global pandemic. I'm crazy enough to bet one million dollars on this.

Why The Blog?

This blog is for me. I don't actually expect anyone to read it. Having this down in writing will help me stick to my guns. I'm not going to post frequently. I'll provide monthly checkins and maybe some other tidbits here and there. Maybe someone will stumble upon it and enjoy watching me lose a million dollars? It's bound to be entertaining one way or another! 


Comments

Popular posts from this blog

Up and Down

  March was up and down. Stocks made a strong rally, but bonds got killed. Implied volatility dropped dramatically, but realized volatility remains high. Meh.

Down Bad

Well, here's the first of my monthly updates. It's a doozy! After launching the algorithm in late October, things were pretty great for a while. I almost doubled my equity over the coarse of a few weeks. And then things turned south. Even though stocks did OK, bonds were a huge drag in December. And then stocks had one of the worst months ever. Right now I'm in a 70% drawdown  and 40% below starting equity .  Obviously not a great time, but it's not totally unexpected. January was one of the worst months ever for a stocks/bonds portfolio, so I'm just happy to still be alive! Hopefully things get turned around in time for the next monthly update!

Condition is Stabilized

After a terrible, no good, very bad January things started to stabilize in February. Hedges started to show negative correlation again. Stocks are still stuck in the mud and volatility is very high. Hopefully after the Fed starts the rate hikes people will start feeling bullish again. None of this matters. I'm just along for the ride. I observe the movements of the algorithm but I don't change anything. Right now my emotions tell me I should buy a bunch of oil and wheat because commodities are skyrocketing. I'd probably end up as a bag holder once sentiment flips and people start selling off. Like a Vulcan I choose to suppress my emotions and rely upon logic to guide me.