Learn how to use TimeGPT for financial time series forecasting with Bitcoin price and market data.
Introduction
Forecasting time series is a foundational task in finance, supporting decisions for trading, risk management, and strategic planning. However, predicting future asset prices can be complicated due to market volatility. TimeGPT helps streamline this process by providing robust forecasting capabilities for professionals who need accurate financial predictions. This guide demonstrates Bitcoin price prediction using TimeGPT, including uncertainty quantification for risk management and informed decision-making.Why Forecast Bitcoin Prices
Bitcoin is the first decentralized digital currency, recorded on a public ledger known as the blockchain. It is widely traded, and its price is highly volatile, making accurate forecasting a valuable tool for financial analysis, trading strategies, and risk management.
What You'll Learn
• How to load and prepare Bitcoin price data
• How to generate short-term forecasts with TimeGPT
• How to visualize and interpret forecast results
• How to detect anomalies and add exogenous variables
The procedures in this tutorial apply to many financial asset forecasting scenarios, not just Bitcoin.
Tutorial Outline
1
Load Bitcoin Price Data
2
Get Started with TimeGPT
3
Visualize the Data
4
Forecast with TimeGPT
5
Extend Bitcoin Price Analysis with TimeGPT
6
Understand the Model Limitations
7
References and Additional Material
1. Load Bitcoin Price Data
Bitcoin (₿) is the first decentralized digital currency, with transactions recorded on a public ledger called the blockchain. Bitcoins are created through mining—solving cryptographic tasks—and are used for payments, trading, and long-term investment.For convenience, we’ll rename columns to match TimeGPT’s expected
ds
(date) and y
(target) format.2. Get Started with TimeGPT
Initialize theNixtlaClient
with your Nixtla API key.
When using Azure AI, you must also specify
base_url
in the NixtlaClient
.3. Visualize the Data
TimeGPT’s client offers a convenientplot
method to visualize your data:

Bitcoin Price Data
4. Forecast with TimeGPT
Forecast the next 7 days using TimeGPT:
Panel view of historical data with future forecasts
5. Extend Bitcoin Price Analysis with TimeGPT
Anomaly Detection
Anomaly Detection
Easily detect anomalies in your dataset:
For more details on anomaly detection, visit the
Anomaly Detection Tutorial.

Highlighted anomalies in Bitcoin price data
Exogenous Variables
Exogenous Variables
You can enhance your forecast accuracy by adding external (exogenous) variables:Learn more in the Exogenous Variables Tutorial.
Exogenous variables could include macroeconomic indicators, social media sentiment, or other data that might correlate with Bitcoin price.
6. Understand the Model Limitations
Forecasting financial assets, especially cryptocurrencies, is inherently challenging. High volatility and market sentiment can lead to rapid price swings that limit model reliability.
7. References and Additional Material
Further Reading
Pro Tip
Financial time series often exhibit random walk behavior, especially cryptocurrencies. Evaluate your models thoroughly with statistical metrics and domain knowledge to make informed decisions.