BTC/GBTC arbitrage

There are certainly worse things to wake up to:

Bitcoin blowing through $8K this morning.

Cryptotwitter has been full of anticipation the past few days. The bitcoin halving is just days away, and people are going mad with predictions on how price action will go. Is the halving priced in? Will there be a post-halving dump? Will less-efficient miners get priced out of the market?

On top of that, QE actions by the fed (money printer go BRR) has everyone convinced that $100,000 BTC is not just possible, but is very probable at this point. Some are predicting it before the end of the year, with others on a more conservative projection between now and the next halving.

Personally, I’ve been watching this upward channel curve for about two weeks now.

There’s a couple of important trend lines here to note. We’ve just breached the mega-dump that took place March 12. I’ll be looking to see if we breach the upward channel and test the next resistance at 9200. The green and red lines running up from the left is the multi-year trend line from August 2016. Getting back above this would be very significant, and would indicate that BTC has fully recovered from the COVID panic. This trendline intersects the higher curve on May 31st.

The news feed in Trading View is already full of coverage about this event; most of CT hasn’t woken up yet I’m guessing. Taking a look at arbitrage opportunities for trading with GBTC shows a couple opportunities. The GBTC estimator shows a price of $8.86, there’s been some pre-market activity at 8.75, which would have been a maximum of $111 in potential profit. It looks like most of this would have been taken by fees, as there were several orders for 200-300 shares.

Now that the timkpaine/TDAmeritrade project is moving forward with websockets, I’ll be adding additional functionality to my estimator. Right now it only pulls yesterday’s equity data and crypto markets via a REST call. With websockets, the program will be able to monitor price action, and take action on any deviations as they occur. This may take me a while, since we still need to develop the TDA functionality, integrate the new CCXT library, and figure out how to do asyncio calls properly. The opportunity here isn’t huge, but will make a good demonstration of my coding abilities. And if we make $20-100 day on moves like these, then that’s a bonus, right?

GBTC Estimator Update

I spent some time this weekend working on my GBTC price predictor. The original idea behind this tool is to take the price action of BTC while the market is closed and use it to predict what will happen to the price of GBTC after the market opens. The original implementation uses the last close price of GBTC, and the price of BTC at the same time, then calculates the premium. It then retrieves the current price of BTC, then uses the calculated premium to determine what the current price of GBTC should be. It’s rather rudimentary, but serves as a quick and dirty calculator.

My hunch is that there are huge arbitrage opportunities to be found within the price action, especially when there are big moves in BTC’s price action. The big unknown, however, is the GBTC premium. The actual underlying value of a GBTC share is 0.009BTC, but the actual trading price fluctuates around 0.0012, so there’s some possibility to take advantage of this spread. We’re talking about the possibility of potential dollars in share price.

GBTC premium. NAV is <0.0009.

For example this morning, our calculation, based on the price of BTC at $7157, is that GBTC should be at $7.98-8.01 range. Here’s the current premarket spread.

The 7.82 bid order was quantity 800 about half an hour before open. Here’s the chart about five minutes after open.

The difficulty that we’re facing right now is matching the price action between the equity, GBTC, and the underlying crypto, BTC. For our inital purposes, it was enough to use the daily OHLCV data for the equity, and hourly data for the crypto. We only needed to track the crypto price at market close to get our initial premium value. But to do a proper arbitrage bot, we’ll need minute-by-minute data. This presents problems, since all of our work through the TDAmeritrade API has been via the REST API, and this work will involve streaming data via websockets, and likely some async programming.

It would be nice to be able to see the intraday price action of the GBTC premium. Right now our free-tier TradingView account only gives us the daily interval, so being able to chart this ourselves is one of our priority. From there we can calculate some sort of moving average and standard deviation to determine when a price is out of band, and represents an arbitrage opportunity. It might be possible to configure something similar with TradingView, but since they don’t support TDA brokerages, we would be subject to a fifteen minute delay on the GBTC data. There’s also the cost factor. As an OTC listing, GBTC trades still have fees associated with them, so any arbitrage situations will have to be large enough to offset the trade.

I’ve got lots of changes that I need to make to the code; right now I’m running into some testing issues related to monkeypatching out the API calls. I’m planning on doing some real time charting using the Bokeh library, and this will have it’s own set of issues, I’m sure.

Estimating GBTC price from BTC after-hours activity

Grayscale Bitcoin Trust (GBTC) is the name of a publicly traded OTC investment product listed on the public OTC markets. It’s a way for US investors to take a position in Bitcoin through brokerage and retirement accounts like IRAs. A lot of OG crypto-types scoff at the prospect of purchasing such an asset, since you don’t actually control the BTC or the private keys, but for some this is an attractive option, or an only one. I’ve been personally taking positions in GBTC over the past 3 or so years through my retirement IRA. One of the most underlooked qualities of GBTC through an IRA is that all transactions are tax-free. I can take profits in my IRA at any time without worrying about tax liability, which is not something I can say for my actual crypto holdings.

Two of the downsides of GBTC is that Grayscale takes a two percent management fee. This isn’t a big deal to me because of the expected gains in a bull run. The other is that there is a premium on GBTC over the underlying asset value. Each share of GBTC represents .00096884 Bitcoin, but the GBTC’s price is usually 30-10% higher than the value of the underlying asset.

One of the main differences between the equities and crypto markets is the fact that crypto is 24/7. Often, during times when BTC has made a big price movement, I’ve wondered what the corresponding change in the price of GBTC would be (and in my portfolio!) So, I have written a small Python package to calculate this that I call GBTC Estimator.

I have it setup to get public BTC prices from Gemini (via the excellent CCXT package). Right now it’s using IEX’s daily GBTC data (and required an IEX API key), so it only has access to daily OHLCV (open, high, low, close, volume) data. We take the close price of GBTC, and divide it by the price of BTC at the same time (4PM EST) to come up with the actual BTC per share. This number is then used with the current BTC price to come up with the estimated GBTC value.

This current version is run from the command line and returns the estimated price as well as the difference from the last close in dollars and percentage. I have plans to put this up as a website that updates automatically, but first I think I’m going to do some backtesting to see how accurate this is. I think there may be some arbitrage opportunities to be found here. I’ve already started refactoring and will have more updates to follow.