How I use AI to solve crypto to stock market price analysis
Bitcoin vs MicroStrategy vs 3x leveraged MicroStrategy ETF
While the early shock over the seemingly God-like abilities of large language models has faded, the modern AI tools we have available are still incredibly powerful.
And I wanted to spend a little time with you outlining one way I use Claude 3.5. This is the tool released in June 2024 by Californian start-up Anthropic, a rival to OpenAI’s ChatGPT.
As a lifelong fan of free open-source programs it takes a lot for me to pay for a service on the internet.
But I was willing to fork out £18 a month for Claude 3.5 on the recommendation of my friend who runs his own agency. He uses it daily, he says, for creating large amounts of online content that would normally be produced by SEO writers.
AI has already removed the lowest paid, lowest quality content mill writing jobs. These are often young writers just getting their start, charging a maximum of perhaps 5p per word. It’s sad, but it is perhaps just the way of the world.
Turkeys voting for Christmas
I hate using AI as a writing aid. I could, theoretically, plug some unordered thoughts into Claude 3.5 and have it bash out 500 words, but it feels too much like cheating, considering this is my profession. Is it any different to using AI for coding tasks? Perhaps not. But I have my pride.
And there is much talk at the moment about the ‘AI woodchipper’. Poverty-stricken authors and writers making less and less from their craft are being lured into selling their books and articles for use as AI training models.
HarperCollins is asking authors to sell their books to the AI woodchipper
This is the equivalent of turkeys voting for Christmas; people directly accelerating the degradation of the market price paid for their particular skillset.
However.
There are skills I don’t personally possess in coding and data analysis that I find it useful to use an AI assistant for.
AI saves time and energy
If economics is the study of the allocation of scarce resources, then economists must know this: the most valuable limited resource on earth is not gold, or Bitcoin, or even money. It is time.
Time is the only thing we spend which we can never get back. So to find a time-saving tool that can answer complex, personalised questions? That’s a major bonus.
Say for example I’m using GIMP (the free open-source photo editor that does everything Adobe Photoshop does, but for the princely sum of £0) to touch up a chart, and I can’t recall how to use a certain tool.
GIMP — which is just about to get its first major update to version 3.0, after 20 years in version 2.0 — was a godsend to me in the early years as a picture-editing journalist when I couldn’t afford Photoshop.
Before AI like ChatGPT or Claude became widely available, if I had a problem I couldn’t solve, I would Google my question, and just pray.
I’d usually end up trawling Quora or StackExchange or Youtube, hoping to run into a post from someone who had not only:
Faced the exact same problem I had
but crucially, also:
Phrased their question and answer in precisely the way I had, so it was discoverable to me when I typed my desperate plea into Google.
These lost hours disappear with AI tools like Claude 3.5.
That’s the real key. Instead of having to rely on nice friendly strangers on a graphic design or internet software forum — who may not reply exactly when I want them to, because they have their own lives — I can ask my AI tool.
It’s like having a (very polite and patient) coding and content assistant in your pocket. It never refuses to answer a question. And it never sleeps.
AI for crypto to stock market data analysis
For this experiment into the abilities of Claude 3.5 for helping with my crypto to stock market price analysis, I wanted to compare the prices of three key assets: Bitcoin (BTC), MicroStrategy (MSTR) and a 3x Leveraged MicroStrategy ETF (LMI3).
The reason? To test which crypto-linked asset produces the greatest returns over time.
But I immediately faced a problem. Bitcoin is available to buy and sell seven days a week, while the two other investment products I want to compare: MicroStrategy, and the 3x leveraged MircoStrategy ETF, are only available to buy and sell five days a week, Monday to Friday.
You can’t make a chart comparing two or three assets if your dates and prices don’t match.
And whether we’re comparing Bitcoin to MicroStrategy, or the daily prices of any other cryptocurrency (Ethereum, Solana, XRP, etc) to any other stock prices (Shell, Nike) we’d face the same issue.
This is guaranteed to make your head explode. Unless you trawl internet forums to find some kind soul to fix it. Or, just ask an AI bot that can aggregate that knowledge for you, immediately.
Initially I asked a friend of mine, Steve, who is an extremely talented software developer, but you can’t keep going back to them with daft questions about where to write code, or have lengthy real-time conversations about what you might have done wrong and ask them to fix it on the spot.
So I asked my AI tool:
I would like to produce a chart in Google Sheets, which requires that the three columns, containing prices, have matching dates. Because there are Bitcoin prices on 7 days of the week, and MicroStrategy and 3x leveraged MicroStrategy ETF prices on only 5 days of the week, the three columns do not match. What would you suggest?
It’s weird, but I always end up being just as polite to a machine as I would to a person.
How Claude 3.5 solved my problem
As any fule kno, if you’re self-taught and you come across a problem, you find a workaround. The issue comes with not knowing what you don’t know, and hence being unable to ask the right questions.
So how did Claude AI explain it?
Why Bitcoin Charts Need Special Treatment (Claude AI wrote these five paragraphs)
When comparing Bitcoin to stocks or ETFs on a price chart, analysts face a unique challenge: Bitcoin never sleeps, but stock markets do. Bitcoin trades 24/7, generating price data for all seven days of the week. Meanwhile, stocks and ETFs only trade Monday through Friday during market hours.
This mismatch creates a problem when trying to plot both assets on the same chart. Imagine trying to line up two rulers where one has all seven days marked, while the other only shows weekdays – the marks won't align properly. Without matching dates, charting software can't accurately compare the two assets.
The solution involves using a technique called "price forwarding." When a stock market is closed (weekends and holidays), we carry forward the last known price from the previous trading day. Think of it like a placeholder that says, "If someone wanted to buy this stock right now, this would be the price." This allows us to create a continuous line on the chart that can be compared directly with Bitcoin's uninterrupted price movement.
Why does this matter? Without proper price alignment, charts can be misleading or impossible to create. For investors trying to understand how Bitcoin performs compared to Bitcoin-related stocks or ETFs, accurate visual comparisons are essential. Many trading strategies and investment decisions rely on understanding these relationships correctly.
This solution ensures that when you look at a chart comparing Bitcoin to any stock market instrument, you're seeing an accurate representation of their price movements relative to each other, even though they operate on different schedules.
Comparing Bitcoin vs MicroStrategy vs 3x Leveraged MicroStrategy ETF
Claude AI was able to help me solve my initial problem: that I was unable to directly compare the prices of Bitcoin (BTC), MicroStrategy shares (MSTR), and the 3x Leveraged MicroStrategy ETF (LMI3).
It did this by suggesting I add a few snippets of code to my Google Sheet of columns where the dates and prices did not match.
=QUERY(
{
Sheet1!A2:A,
Sheet1!B2:B,
VLOOKUP(
Sheet1!A2:A,
FILTER(
{Sheet1!A2:A, Sheet1!C2:C},
NOT(ISBLANK(Sheet1!C2:C))
),
2,
TRUE
)
},
"SELECT * WHERE Col1 is not null ORDER BY Col1",
1
)
Initially I didn’t even know where to write these formulas to make them run. It turns out I didn’t need Google App Script: I could just write these formulas directly into a cell.
It suggested writing a QUERY function in order to:
Find the nearest available stock price for each Bitcoin date
Filter out blank rows
Sort everything by date
And now, when creating my charts
Bitcoin prices will show all dates
Stock prices will show the last available price for weekends/holidays
The approximate match in VLOOKUP will use the most recent stock price for weekend dates
This effectively carries forward the last available stock price until the next trading day
This makes sure I can compare apples to apples and means I can actually make a visual comparison.
AI never works first time
I had to spend around an hour running these formulas, tweaking them, and going back to Claude AI for alternative solutions. Some issues came because of the formatting of dates on my Google Sheets. Some were just mistakes the AI made, or assumptions I made that were incorrect.
But we got there in the end, and I think I’ve saved a decent amount of stress and a bucketload of time in future by working this out.
So: comparing Bitcoin, MicroStrategy and a 3x leveraged MicroStrategy ETF
Some concepts and jargon to quickly break down first.
We all know what Bitcoin is.
ETF stands for Exchange Traded Fund. It’s an investment product usually issued by a bank or asset manager, that holds an underlying asset — like gold, or Bitcoin. Investors can buy and sell shares in an ETF in exactly the same way as they would buy shares in a company, like Shell (LON:SHEL) or Nike (NYSE:NKE).
What is MicroStrategy?
MicroStrategy is a US business software intelligence company run by Michael Saylor.
It also happens to own 331,200 Bitcoin at an average purchase price of $39,292. This is the most Bitcoin owned by any public company.
Since 2020 the company has been hoovering up the original cryptocurrency in vast amounts, and now owns around 1.5% of the total 21 million Bitcoin supply.
With a total spend of $16.5bn on Bitcoin, the company has an unrealised profit of $13.7bn. Its holding of 331,200 Bitcoin is worth $30.2bn at today’s market price of $90,480.
Investors often now buy shares in MicroStrategy as a proxy for buying Bitcoin.
It’s still difficult and confusing to buy Bitcoin directly. So, investors who are not crypto experts still tend to prefer holding MicroStrategy shares over Bitcoin.
And in the UK there are also higher tax penalties for selling crypto than there are for selling shares in tax-free accounts like ISAs. UK crypto investors can’t put their assets into Stocks and Shares ISAs or Lifetime ISAs, like they can with stocks and bonds.
What is a 3x leveraged MicroStrategy ETF?
The 3x leveraged MicroStrategy ETF I chose for this experiment is operated by GraniteShares. It has the ticker (which basically just means its name) LMI3.
Leverage means using borrowed money to potentially juice investment gains.
The difference with using leveraged ETFs instead of creating my own leverage with borrowed cash is that, normally, it is the asset manager who creates the financial product that is borrowing the money, and not the investor themselves.
3x leveraged means a financial product — like an ETF — that produces three times the daily price movement of the underlying company shares.
So.
If the MicroStrategy share price rises 15% in a day, the value of a 3x Leveraged MicroStrategy ETF should rise 45% in a day.
If the MicroStrategy share price instead falls by 4% in one day, the value of a 3x Leveraged MicroStrategy ETF would fall by 12% in one day.
Leverage always introduces a substantial amount of risk and additional volatility to any investment.
But if we are fairly certain that the price of MicroStrategy shares will rise as the Bitcoin price rises, does it not makes sense to boost our gains by using leverage?
We first looked into leveraged ETFs with this Charting Futures piece, discussing the potential outperformance and additional volatility in a 2x or 3x leveraged S&P 500 ETF.
The concept is fairly simple. Say I have £5,000 to invest in MicroStrategy shares, and my investment value rises by 50%. I’d end that period with £7,500, a £2,500 gain.
But if, instead, I had access to three times my initial amount, £15,000, and the value of my investment rises by 50%, I would end that period with £22,500, a £7,500 gain.
On the downside, if I invest £5,000 of my own cash and my investment value falls by 50%, I’d end that period with £2,500. In a 3x leveraged product, My £5,000 would drop not to £2,500, but to £0.
If MicroStrategy shares were to crash 50% overnight, would the value of the 3x leveraged MicroStrategy ETF fall by 150% (3 x 50%) and leave me in minus numbers with a margin call to pay? Apparently not.
For the sake of this article and not giving out dodgy information, I did double check this with my own ISA provider: AJ Bell.
AJ Bell’s helpline said the value of the 3x leveraged ETF would simply fall to zero. So even if the value of an underlying crashes, it is impossible for me to end up owing my ISA provider money.
This is not the case if I were to trade with my own leverage; that is, to borrow money from a service provider like IG.
Again: with leveraged ETFs — which are available to buy in tax advantaged accounts like ISAs — it’s not you borrowing the money. It’s the asset manager like GraniteShares who issues the ETF.
We know going in that if a share price falls, rather than rises, we will take a substantially larger loss than normal, so this strategy is only for those with a very high risk tolerance and an ability to take profits on the way up.
The recommended holding period for 3x leveraged ETFs is only one day. Such is the level of additional risk added to an investment portfolio from such high leverls of leverage.
Next, we index to 100
Why index our three asset prices to 100? It’s a way of putting three assets with variable prices on one chart to show relative percentage gains and losses.
The percentage change is just the difference between the given number and 100.
Again, for this experiment I asked Claude to write the code for me.
=ARRAYFORMULA(
QUERY(
{
AlignedData2!A2:A,
IF(
AlignedData2!A2:A >= DATE(2023,5,15),
AlignedData2!B2:B / INDEX(AlignedData2!B:B, MATCH(DATE(2023,5,15), AlignedData2!A:A, 0)) * 100,
NA()
),
IF(
AlignedData2!A2:A >= DATE(2023,5,15),
AlignedData2!C2:C / INDEX(AlignedData2!C:C, MATCH(DATE(2023,5,15), AlignedData2!A:A, 0)) * 100,
NA()
),
IF(
AlignedData2!A2:A >= DATE(2023,5,15),
AlignedData2!D2:D / INDEX(AlignedData2!D:D, MATCH(DATE(2023,5,15), AlignedData2!A:A, 0)) * 100,
NA()
)
},
"SELECT * WHERE Col1 is not null",
1
)
)
By indexing all the prices to 100 we can see that
Bitcoin started the period at 100, and ended the period at 388. This represents a percentage gain of 288%.
MSTR started the period at 100 and ended the period at 1,066. This represents a percentage gain of 966%.
LMI3 started the period at 100 and ended the period at 2,897. This represents a percentage gain of 2897%.
The overperformance of MSFT to LMI3 won’t be exactly three times higher. This is because the issuer, GraniteShares, charges 3x leveraged ETF buyers 0.09795% on their holdings per day, to cover the borrowing costs of taking this leverage out in the first place.
The conclusion
AI is an incredible time-saver when running crypto to stock market price analysis.
It’s hard to get embarrassed in front of an AI tool. And you can ask for clarification on repeated personalised questions specific to your situation. That’s the difference between pleading for help from friends, or trawling internet forums for help.
And while it’s hard not to feel like you’re contributing in some way to the downfall of society, I can forsee myself running many experiments in the future using Claude 3.5.
Wow. It is really quite scary what AI can do. But obviously if it can help make better informed decisions more quickly it is very useful. However you don't want it actually making the decisions!