Bitcoin CML Index with Resilient AI: Whitepaper

The purpose of this paper is to provide an in-depth, detailed breakdown of how the Crypto-ML Fear and Greed Index (the CML Index) works. This level of transparency will help you determine the best way to incorporate this tool into your overall investment strategy.

Our goal with the CML Index is to help you streamline and optimize investment decisions in order to maximize Bitcoin holdings over the long term (3+ years) with a framework that is simple to understand and follow. We also understand everyone has different goals and risk tolerances. As such, we will break down how 4 different personas can use the CML Index in their Bitcoin strategy.

The CML Index summarizes a broad set of information to help you make investment decisions. Rather than trying to make sense of the news, charts, and social media, you should be able to step back, reduce the clutter in your life, and let a robust and resilient AI framework do the hard work.

Development Background

Our team has developed quantitative financial models since 2001, giving us over 20 years of experience with real-world performance and challenges. It also helps us understand the misconceptions, pitfalls, and mistakes most investors and technicians face.

Our early model development was done using statistical models, mathematics, and compute-intensive optimization algorithms.

Starting in 2015, we added machine learning and artificial intelligence to the development toolset. These are complimentary approaches that allow for the consumption and understanding of larger, broader data sets.

The CML Index is a sophisticated tool that represents the culmination of our work.

Results Preview

While the results of our approach will be fully detailed below, here is a summary.

Running from January 1, 2017 through September 20, 2023, our approach achieved results that are 7.45x better than buy-and-hold, while also minimizing drawdowns. This time period was selected as it has a variety of bullish, bearish, and sideways markets in which to analyze performance.

CML Index Performance Graph
  • Starting investment: $1,000
  • Final balance (including unrealized gain): $188,185
Buy and HoldCrypto-ML
Starting balance$1,000$1,000
Realized gain$0$144,320
Unrealized gain$25,127$42,865
Total gain$25,127$187,185

This leaves final balances of $188,185 for Crypto-ML and $26,127 for buy and hold (including the original $1,000 deposited).

While buy-and-hold is the defacto benchmark, it’s worth highlighting a major issue: it never realizes a gain. There is no exit plan. Realizing gains while even matching buy-and-hold is considered an accomplishment. Beating it while realizing gains in a variety of market conditions is exceptional.

Framework and Assumptions

Our system’s framework is based on seven assumptions. These assumptions come from our financial market experience and also the deep-dive market analyses we have provided to Crypto-ML customers since 2017.

1. Timeless investing principles are the foundation. While Bitcoin is a relatively new technology, its price still behaves like that of other scarce, tradeable investment instruments. Human psychology matters.

2. Bitcoin provides an opportunity for outsized returns. Bitcoin is not yet mature as an investment instrument, though it is transitioning to broader acceptance. Over the next decade, Bitcoin will have returns and losses that are multiples more than traditional assets.

3. Macroeconomic data drives Bitcoin price. Items such as interest rates and commodity prices affect global money supply and overall liquidity. This impacts the available money to invest in any asset, including Bitcoin.

4. Financial institution behavior is a critical variable in Bitcoin price. Financial institutions make up about 80% of assets invested. Retail investors make up only 20% (IMF 2023). This means the flow of money is controlled by institutions.

5. Retail investors should do the opposite of what “feels” right. Retail investors typically invest based on emotion, hype, and bad/late information, causing between 90% to 99% to lose money when actively trading. This range is based on multiple brokerage studies of their own customers’ results (moneyshow.com and tradeciety.com). This market psychology is difficult to overcome.

6. Common technical analysis, sentiment analysis, and AI models are not resilient enough to cause retail investors to make better decisions consistently. Past patterns do not always repeat and overfitting is a challenging problem for any quantitative system.

7. There is too much relevant data for humans to consume, synthesize, and act upon. Machine learning and AI are better suited to find reliable behavioral patterns in decades of data points across many aspects of the economy, Bitcoin, and sentiment.

To summarize, Crypto-ML uses AI, hard technical analysis, and sentiment analysis to produce a measure of market fear and greed.

Fundamentally, this helps retail investors to “be greedy when others are fearful and fearful when others are greedy.”

Robust and Resilient

Any trading or investing system has numerous points of failure. Combining five distinct elements makes CML Index measure robust, thereby becoming better at handling edge cases and less prone to common failure points.

These elements are:

  1. Mathematical calculations of dynamic moving averages of Bitcion’s price.
  2. AI Predictions of Bitcoin’s quarterly price tolerance based on macroeconomic conditions.
  3. AI Sentiment Analyses of social media, Google Trends, and more.
  4. Ongoing re-optimization and training of parameters, weights, and new data to adjust to evolving market conditions and maturity.
  5. Phased investment approach to avoid rash decisions and going all in or out based on a specific signal.

It’s common for influencers and scammers to sell the idea of a single method or indicator being all you need to become a successful day trader. The idea of an “indicator they don’t want you to know about” is seductive. It may even have worked once or twice due to lucky timing. But that doesn’t make these approaches consistently repeatable.

The way to consistently make large returns is to work with the market and invest using timeless principles over the course of years.

While our index is wrapped into a single indicator, its simple presentation is deceptive. It is comprised of highly sophisticated components come that together in the backend to provide this robust value that can be combined with a resilient investment plan.

Index Component Details and Methodology

The following section provides a detailed breakdown of how the CML Index is calculated.

Component 1: Dynamic Moving Average

The simplest component of the CML Index is a moving average. Price is generally considered to be the sum of all currently held knowledge of an asset’s value, and therefore the single most important data point available. Moving averages use price but help reduce noise and assess trends.

Moving averages are calculated using hard math. Taking this mathematical approach has two key benefits:

  1. Moving averages are the basic unit for nearly all technical analysis indicators. They show how far and fast prices are moving away from recent-term prices.
  2. Unlike AI, which operates like a black box and may produce unexpected results for unknown reasons, moving averages are simple mathematical calculations and will, therefore, always behave predictably.

Our specific moving average calculation compares the current Bitcoin price to the average Bitcoin price of the last X periods, where X is determined by an optimization algorithm that selects a period that maximizes realized profit.

As of this writing, an 11-day period is used, but that is subject to change.

Component 2: AI Predictions Using Macroeconomic Data

What if Bitcoin was rising rapidly, but you knew it wasn’t close to peaking for the quarter?

That’s the information our AI provides.

The AI component is made up of 53 fields covering:

  • Economic indicators, such as interest rates, spreads, bond yields, global indexes, currencies, and more.
  • Commodity prices, such as energy, metals, grains, currencies, and more.
  • Bitcoin price shifts, moving averages, and Bollinger Bands.

This body of data was selected by closely monitoring what consultant firms use to make market predictions and also what factors control the money supply. AI and ML allow us to take these large bodies of data and shortlist the subset that actually impacts Bitcoin price.

With that subset, we can then let the AI work through it to uncover meaningful patterns and generate a prediction free of human interpretation and bias.

The goal of this model is to predict the level of risk relative to Bitcoin’s price position for the quarter, which is a rolling 45 days in the past and 45 days in the future.

Risk, in this case, is defined as Bitcoin’s current distance from the quarterly low to the quarterly high, again, predicting those bands 45 days into the future.

  • If Bitcoin is at a low point for the quarter, risk will be low.
  • If Bitcoin is at a high point for the quarter, risk will be high.

Data points utilized for the AI model

Following is a detailed description of the fields considered by the Crypto-ML AI model.

  • Data fields beginning with “x” are raw data points.
  • Data fields beginning with “v” are features used in our machine-learning models. These are either an index or transformed version of any “x” data points designed to show direction and relative movement.
FieldDescription
DateDate of data pull
xPriceBitcoin price at time of data pull
xPriceSmoothBitcoin price average of current and prior 2 days
x3PriceBitcoin price 3 days ago
v3PricePercent change between xPrice and x3Price * 100
x10PriceBitcoin price 10 days ago
v10PricePercent change between xPrice and x10Price * 100
x30PriceBitcoin price 30 days ago
v30PricePercent change between xPrice and x30Price * 100
x60PriceBitcoin price 60 days ago
v60PricePercent change between xPrice and x60Price * 100
x45AvgPriceBitcoin average price over the last 45 days
v45AvgPricePercent change between xPrice and x45AvgPrice * 100
vDOMDay of the month
vDOWDay of the week
xBBup30-day Bollinger Band upper limit
xBBlow30-day Bollinger Band lower limit
vBBup(xBBup – xPrice) / xPrice
vBBlow(xBBlow – xPrice) / xPrice
vVIXThe CBOE Volatility Index.
v30VIX30-day change in the vVIX * 100
v13WTThe 13-week treasury bill rate
v3013WT30-day change in the v13WT * 100
v10YRTThe 10-year treasury bond rate
v3010YRT30-day change in the v10YRT * 100
vYieldCrvv10YRT – v13WT
v30-YieldCrv30-day change in the vYieldCrv * 100
xCrudeNY crude oil futures
v30Crude30-day change in the xCrude * 100
xWheatChicago wheat futures
v30Wheat30-day change in the xWheat * 100
vDXDollar Index
v30DX30-day change in the vDX * 100
xSP500S&P 500
v30SP50030-day change in the xSP500 * 100
xNASDNASDAQ composite
v30NASD30-day change in the xNASD * 100
xDowDow Jones Industrial Average
v30Dow30-day change in the xDow * 100
xRussellRussell 2000
v30Russell30-day change in the xRussell * 100
xGoldCMX gold futures
v30Gold30-day change in the xGold * 100
xEURUSDEUR/USD currency exchange rate
x30EURUSD30-day change in the xEURUSD * 100
xUSDJPYUSD/JPY currency exchange rate
v30USDJPY30-day change in the xUSDJPY * 100
xFTSELondon’s top 100 stock index Financial Times Stock Exchange
v30FTSE30-day change in the xFTSE * 100
xShenzhenChina’s top 500 stock index Shenzhen Stock Exchange
v30Shenzhen30-day change in the xShenzhen * 100
xNikkeiJapan’s top 225 stock index Tokyo Stock Exchange
v30Nikkei30-day change in the xNikkei * 100
xEmerMariShares MSCI emerging markets ETF
v30EmerMar30-day change in the xEmerMar * 100

AI training methodology

For inputs:

  • Fields preceded with a “v” are used in the training as they provide relative, indexed, and/or directional information.
  • Fields preceded with an “x” are raw numbers that, without context or transformation, do not have meaning.

The goal is derived from a few additional calculations:

  • The minimum price for the current quarter, which is 90 days in total, 45 days before the current date and 45 days after the current date.
  • The maximum price for the current quarter, which is 90 days in total, 45 days before the current date and 45 days after the current date.
  • The percentage difference in current price from the quarter’s low and separately the quarter’s high.
  • A risk factor, which is the percentage difference from the low plus the percentage difference from the high.

The “risk” factor is the AI model’s goal. It uses the inputs to find patterns to determine risk and then will take future inputs to predict risk for the current quarter, including 45 days into the future.

Operationally, this data is loaded into an Azure Dataverse and an Azure AI Prediction Model is trained. A pipeline then captures new data, feeds it into the Dataverse, generates a daily prediction, and also continuously retrains, evaluates, and redeploys the model as appropriate.

Azure’s evaluation metrics rate it as a class A, production-ready model.

Component 3: Alternative Fear and Greed Index (Sentiment)

Last, we have a sentiment indicator, which is provided by the alternative.me, “Crypto Fear & Greed Index.” This index has been maintained for years and includes API access to current and historical data.

Our analysis shows this index consistently ranks as one of the “top 25” indicators influencing Bitcoin price predictions in our AI models. That means it is capturing meaningful information that does have predictive capacity.

According to their information, this index breaks down as follows:

  1. Volatility (25%): measures the current volatility and max. drawdowns of bitcoin and compare it with the corresponding average values of the last 30 days and 90 days. The assumption is an unusual rise in volatility is a sign of a fearful market.
  2. Market Momentum/Volume (25%): measures the current volume and market momentum (again in comparison with the last 30/90 day average values) and puts those two values together. The assumption is higher buying volumes in a positive market is a sign of greed.
  3. Social Media (15%): measures Twitter sentiment, checking for how many interactions certain hashtags receive in certain time frames. An unusually high interaction rate signifies greedy market behavior.
  4. Trends (10%): measures search queries, volumes, recommended, and popular searches to determine fear and greed based on interaction with Google.
  5. Surveys (15%): this has been paused for quite a while and is not currently considered in the calculation.

As long as our AI models continue to weigh and factor this index into predictions, we will continue to incorporate it into our overall picture of fear and greed.

Since they have done the work on the social sentiment front, this allows us to focus on the macroeconomic picture.

Parameter and Weighting Optimization Methodology

To bring these three components together into a single index value and optimize them toward a unified goal, optimization algorithms are used. Specifically, we utilize NOMAD, which is an implementation of the Mesh Adaptive Direct Search algorithms designed for difficult black-box optimization problems.

While numerous levels of weights and optimizations occur along the AI and ML training pipeline, this section refers to optimizing the following parameters:

  1. Moving average period of component 1
  2. Moving average period of component 3
  3. Index composition:
    • Weight given to component 1 output in final Index score
    • Weight given to component 2 output in final Index score
    • Weight given to component 3 output in final Index score
  4. Index score to trigger a Bitcoin buy (low threshold)
  5. Index score to trigger a Bitcoin sell (high threshold)

The optimization algorithm adjusts these parameters while attempting to maximize the return on an initial $1,000 invested at the start of the period. Constraints are also in place, including a minimum number of trades and maximum acceptable drawdown.

The period used for optimization is shorter than the full training data set, but this is to avoid optimizing for Bitcoin’s very early phases. The dataset used for optimization is from January 1, 2017 through the present. This date range also allows for analysis of performance during various market phases (bullish, bearish, and neutral).

As of December 8, 2023, the weight given to each of the 3 components is:

  • Dynamic moving average: 37.5%
  • Sentiment: 7.5%
  • AI Prediction: 55%

Model Investment Return Results

As of this writing, the optimization ran from January 1, 2017, through September 20, 2023, with the following results:

  • Starting investment: $1,000
  • Total balance (including unrealized gain): $188,185
  • Cash deployed 6 times
  • Profit captured 5 times (making up the unrealized gain)
Buy and HoldCrypto-ML
Starting balance$1,000$1,000
Realized gain$0$144,320
Unrealized gain$25,127$42,865
Total gain$25,127$187,185

This leaves final balances of $188,185 for Crypto-ML and $26,127 for buy and hold (including the original $1,000 deposited).

This is 7.45 times better than buy-and-hold, which has an unrealized balance of $26,127.

Similar performance holds true through other time periods and various market conditions.

Importantly, buy-and-hold will never have a realized gain because it has no exit plan. Crypto-ML’s approach performs better because it captures profits and reinvests when prices are lower to multiply results.

Optimization Trading Versus Phased Investing

To perform this optimization, the algorithm sells the entire Bitcoin balance above a certain threshold and then rebuys with the entire cash balance once the index is back under a certain threshold. This binary approach drives clarity into the optimization analysis and computation; however, it is not the approach we use in our real-world investing.

As we’ll discuss below, the right approach is to make phased investment decisions and follow dynamic dollar-cost averaging in a way that suits your risk tolerance and investment goals.

Overfitting Considerations

The biggest risk to optimization and any quantitative financial model is overfitting. In fact, any honest technician with experience will say overfitting is the #1 challenge. We could, in fact, achieve much better results on our back-tested data, but the resulting system would not be robust and would likely not work going forward in the future.

To minimize the impact of overfitting, we follow numerous best practices:

  1. Ensure we have statistically significant results.
  2. Train models with a random 80% of the data, using the other 20% for evaluation.
  3. Optimize against different time frames and market conditions, then apply the solution that provides sum-optimal results across all scenarios. In this case, optimization happens against approximately 20% of the data and is evaluated against the other 80%.
  4. Rely on diverse data sets and indicators to build a composite picture.

Investing with the CML Index: Resiliency

The information to this point has been about how the CML Index is built. This section helps you determine what to do with it, given your risk tolerance and overall approach.

4 Basic Investing Principles

When investing, there are 4 basic principles you can choose as your default. If you don’t spend time studying markets and assets, you really cannot go wrong following these principles. You will certainly beat the 90% to 99% that lose money actively trading. This approach is simple, well-established, and endorsed by some of the best investors.

1. Choose assets that can be reasonably expected to increase in value over the long run.

Choosing an asset that can reasonably be expected to increase in value means picking scarce items that have consistently generated returns in the past and still offer a similar value proposition. Examples include:

  • Businesses in the top stock market indexes are designed to generate money and increase in value. Investing in something like the S&P 500 is investing in the top 500 businesses in the US. These businesses have a strong track record of growth and can reasonably be expected to continue to do so over the long term.
  • Real estate is both limited and provides utility. It also has a strong track record of increasing in value. Real estate can also be reasonably expected to appreciate over time.
  • Commodities, such as oil and gold, that have utility and are limited in supply.

2. Dollar-cost average (DCA) by buying some amount of each asset each month.

DCA means you consistently buy some amount of an asset regardless of its price. If you are a regular employee with a retirement account, you probably already do this. Some percentage of your paycheck may go straight into a retirement account every month.

3. Hold for a long period.

All assets go up and down, but valuable assets increase in the long run. This can be due to more money flowing into the system (inflation) or because the intrinsic value is truly increasing (utility is increasing).

By combining DCA with long hold periods, you will have purchased an asset at a variety of prices. With a long-term uptrend, you should have a strong return, even if there are ups and downs in the short run. Time in the market beats timing the market.

4. Invest in a variety of assets to diversify.

Diversifying your investments minimizes the impact of selecting any one bad asset. Combined with DCA, this means you may decide to invest $1,000 each month. Of that:

  • $400 goes to stocks
  • $300 goes to real estate
  • $200 goes to speculative assets
  • $200 goes to bonds

If you’ve read this far, you likely believe Bitcoin can be reasonably expected to grow in the long run. It has utility. It is scarce. It is truly unique.

As such, you may include it in your investment portfolio as one of your assets. The simplest approach to do this is to make Bitcoin a percentage of your regular investments. You can simply buy some amount of Bitcoin every month regardless of price. You will need to select the amount and percentage allocation that suits your budget and risk tolerance. But that’s about it.

The more you can automate DCA, the better.

Dynamic Dollar-Cost Averaging (DDCA)

While standard DCA over long periods works best for most people, it is possible to utilize all of the information presented in this paper to dynamically adjust your dollar-cost averaging, which we call DDCA.

Fundamentally, DDCA means:

  • Invest more when the market is fearful.
  • Invest less (or take some profits) when the market is greedy.

Depending on your goals and risk tolerance, the specifications of more, less, and take profit will vary.

But regardless, DDCA is still very different than lump sum investing or day trading.

DDCA is characterized by:

  • Regular (monthly) purchases of a diverse set of investments, of which Bitcoin is one
  • Adjusting the percentage allocations of your investments based on market conditions
  • Adjusting your overall buying and selling based on market conditions
  • Avoiding lump sum investing
  • Avoiding day trading
  • Avoiding binary decisions

This is more sophisticated than regular dollar-cost averaging and is not for everyone. But it can enable higher returns while introducing some risk. It is the base approach upon which most financial institutions build their strategies. You can do the same.

DDCA makes our approach resilient because we are not making all-in or all-out decisions based on our CML Index. No analyst or tool, including the CML Index, is right all the time. DDCA helps you avoid making purchases and sales decisions that are wrong, e.g:

  • Selling all of your Bitcoin during a rally, only to find Bitcoin goes up another 200%.
  • Buying a huge amount of Bitcoin right at a multi-year peak.
  • Taking no action in critical moments.

Markets can and will be irrational. As the famous saying goes, markets can remain irrational longer than you can remain solvent. Combining the CML Index with DDCA reduces your risk, increases opportunity, and sets you up for long-term success.

How to Use the CML Index and DDCA

With all of this information in mind, we can look at three example personas and identify how they might use the CML Index as part of their investment plan.

4 Personas and Their Goals

PersonaDescriptionHow CML Index Helps
Persona 1: Long-Term InvestorCrypto-ML Recommend
Invests in a portfolio of assets each month with a multi-year bias, generally targeting retirement. Bitcoin is a percentage of the portfolio. Follows more traditional (e.g. Warren Buffett) approaches. Tends to generate wealth consistently over time, outperforming all other personas on average.
Identifies times to buy when others are fearful and sell when others are greedy. Minimizes risk by helping adjust monthly percentage allocations as sentiment and market conditions change.
Persona 2: Short-Term InvestorSimilar to Persona 2 but with a shorter-term bias. Willing to accept more risk to generate bigger returns within 1-3 years.Similar to above, but also identifies opportunities to “go big” with buying and selling.
Persona 3: Short-Term TraderGoes “all in” and “all out” of Bitcoin within a day (day trader) or over the course of a few days (swing trader). May use leverage to amplify returns and also losses.Identifies when the market is bullish, which is ideal for trading because the overall trend is positive, turning the odds of any given trade in their favor.
Persona 4: Bitcoin MaximalistWants to accumulate as much Bitcoin as possible, reducing exposure to traditional fiat and financial markets. Will transact in BTC but may never be interested in selling Bitcoin for fiat.Helps throttle Bitcoin purchases. Identifies opportunities to make unusually large Bitcoin purchases, pulling money from traditional assets.

How Each Persona Uses the CML Index

Here’s how each persona may act in a given market condition:

CML Index ConditionPersona 1: Long-Term InvestorPersona 2: Short-Term InvestorPerona 3: Day or Swing TraderPersona 4: Bitcoin Maximalist
Extreme Greed10% of BTC holdings are sold each month and reallocated to other assets, such as stocks, bonds, or real estate.40% of BTC holdings are sold each month and reallocated to other assets, such as stocks, bonds, or real estate or taken as income.100% out of Bitcoin.Marvel at size of personal BTC stack. Temporarily stop BTC buying. Reduce frugality. Enjoy income and safety net.
Greed0% of monthly investing goes to BTC.10% of BTC holdings are sold each month and reallocated to other assets, such as stocks, bonds, or real estate or taken as income.Actively trade using other indicators since Bitcoin is bullish.Reduce BTC buying. Wary of the market. Enjoy spending income on other items.
Undecided20% of monthly investing goes to BTC.40% of monthly investing goes to BTC.Avoid active trading since Bitcoin is generally sideways.100% of monthly savings and retirement investing goes to BTC.
Fear30% of monthly investing goes to BTC.80% of monthly investing goes to BTC.Avoid active trading since Bitcoin is generally bearish.Minimize all life expenses. Allocate as much free cash as possible to BTC every month.
Extreme Fear40% of monthly investing goes to BTC.100% of monthly investing goes to BTC.100% in Bitcoin.Buy as much BTC as possible for as long as possible. Phase 1: Sell house, car, and kidney. Phase 2: Take on loans from anyone willing.

Breaking this down another way, here are descriptions of each CML Index reading and how someone may use them:

CML IndexConditionPersona 2 Interpretation
80+Extreme GreedThe market is very likely overextended. Sells most BTC and will invest back in at a future time.
60-79GreedThe market is very hot. Sells some BTC and will reinvest at a future time.
20 to 59BullishThe market is hot but will likely continue going up. Holds BTC.
-19 to 19UndecidedThe market is being recalibrated as participants attempt to value the asset. Buys BTC moderately each month.
-20 to -39BearishThe market is generally gloomy. People are a bit fearful. Buys BTC each month.
-40 to -59FearThis is likely a low part of the market cycle. Buys BTC aggressively each month.
-60 & lowerExtreme FearThis is a rare opportunity to buy BTC at an exceptionally low price. Buys BTC very aggressively each month and with any additional funds available. May sell other assets to buy BTC.

Tax Considerations

Whenever selling is introduced into a plan, taxes need to be considered. In the persona examples above, two of the personas sold Bitcoin in certain circumstances.

In general, the CML Index will move slowly over time and you are likely to avoid the short-term capital gains tax, which is taxed as regular income in the US. Traders pay short-term capital gains taxes. The CML Index is not intended to be used for trading. But even if you do pay short-term capital gains, that may be acceptable to you. It means you’re capturing a fast gain and using it as income. It is taxed just like any other income source.

That said, by using the CML Index, you are more likely to face the long-term capital gains tax. Long-term (over 1 year) gains are taxed at a lower rate. For some people, that may even be 0%.

People who are investing for retirement, such as Persona 1, can use IRAs or other retirement accounts to avoid taxes on gains entirely. There are numerous Bitcoin IRA options available. This also makes Bitcoin ETFs valuable, as they can be part of an even broader set of retirement accounts.

Of course, tax rules change, countries have different rules, and individuals have unique circumstances. Talk to a licensed tax advisor to determine the best plan for you.

Summary

Regardless of the method and approach you take, the CML Index summarizes a broad set of information to help you make investment decisions. The CML Index offers a base upon which you can build your own personal investing plan.

Do you have questions, concerns, or want additional details? Let us know in the comments below or contact support.