Day 370 of 1000: Creating My Own hedge Management System

I’m undertaking a 1000-day reinvention project, blogging here daily to track my progress. In Sunday Planning, I plan for the week ahead.

Graduation day is behind me, and my retinal surgery is 11 days from now. This week, my focus will be on creating a spreadsheet system or possibly web app to run locally for tracking my trades including my new bucketed put hedging strategy.

I have been tracking trades with a combination of googlefinance calls and entering data such as options deltas manually but (1) that’s prone to errors and (2) it’s a hassle. So going forward I’m going to import positions data that I download from Schwab. Eventually I may use Schwab’s API to automatically grab the information.

I’m looking forward to this project. It’s fun to build software that improves your life and the activities in it, and this will be a vast improvement over what I’m doing.

How to build it

I’ve already experimented with building a couple trading tracker and recommendation systems, one in Google Sheets and one as a local web app. I used Gemini to build the first and Claude for the second (can’t remember which models of either). But now I’m under the impression that Claude is super-expensive for coding? And not sure if I need a premium version of Gemini to do this project?

The web app was easier to use in that it could import files right after I downloaded them right from my Downloads folder. For the Google Sheet, I had to first upload the files to a Google Drive folder, a small extra step. I’m planning to update the tracker each day about an hour after the market has opened so that I can get fresh updates such as for options premiums, deltas, and more.

It’s not a huge deal to take that extra step of uploading the files after downloading, and it’s easier for me to update a spreadsheet than a local web app.

So I’m starting with a Google Sheets based implementation.

I started building it

With Gemini’s help, I started building the spreadsheet.

I have three sheets so far:

  • Ledger – generated by importing Schwab positions downloads. Includes a record for each open position and calculates “delta dollar” exposure for each position, negative for a short position and positive for a long. (Note that means short puts generate long delta dollars!)
  • Tickers – for each ticker in the Ledger, I associate the ticker with a hedging instrument, either $QQQ for tech and growth, $SPY for broad market beta, $XLE for energy, $GLD for precious metals, and $TLT for fixed income. I don’t have industrial metals and mining assigned to their own bucket, so have put them in with $SPY for now.
  • Hedge Manager – sums up long delta dollars per hedging ticker and separately sums up shorts (from long puts or short sales of stocks). Then I compute a ratio of shorts (the hedges) to longs. For each category I have a target hedge percent, mostly 30% but less for fixed income. I calculate how much delta dollars I need to add or subtract to get back to the specified hedge percentage. This means I will sell the hedge when it gets too rich or sell the long if vice versa. Or alternatively, add hedges or add longs, to get back into balance.

I am severely underweight on short energy positions which is killing me, and overweight on $QQQ and $SPY hedges. I will begin adjusting tomorrow but not going to do it all at once. Will slowly work my way towards my desired ratio of short to long positions.

And how will I adjust?

  • I can sell out of energy positions though I’m loathe to do so as they are so far depressed right now. They are likely to fall further if a deal is signed this weekend though. I bet they will bounce back up over the summer but how long do I need to wait for that? And meanwhile, I’m trying to be more disciplined about my system.
  • I can add more longs to growth and broad market beta. Or adjust the short positions for less hedge exposure.
  • I’m also over-hedged on $GLD, so need to dial that back. And have no hedges for fixed income as of yet. So may do something there.

The free version of Gemini has worked great for this. It makes a lot of mistakes but I think I caught them all as we moved step-by-step forward.

And other things to do

I have a few other things to do this week –

  • Get an x-ray of my shoulder and lab work before I may have a steroid injection. May have “frozen shoulder.”
  • Take my daughters to the airport for their Hawaii trip.
  • Lunch with a friend on Thursday.
  • Schedule movers to grab some furniture from my mom that she’s giving to me.
  • Schedule my dog with the vet for his annual exam.
  • Keep reading Anna Karenina and watching the miniseries to go with it.
  • Keep up with home and garden maintenance

All I really want to do is work on my trading system, but must balance that out with attention to other aspects of life.