tags:
financial-forecasting
time-series
instruction-tuning
bitcoin
finance license: apache-2.0
Bitcoin Price Prediction Instruction Dataset This dataset is designed for fine-tuning language models to predict Bitcoin's daily closing prices. Each sample provides a rich context of historical market data, recent news, and social media sentiment, formatted into an instruction-based prompt structure. The goal is to train models that can understand and synthesize diverse data sources to make financial forecasts.
Dataset Description The core task is to predict the next 10 days of Bitcoin's closing prices based on the previous 90 days of market data and the context available on a given day. The dataset is structured for instruction fine-tuning, with instruction, input, and output fields.
The context provided in the input field is a multi-source snapshot of the market, including:
Technical Analysis: Historical prices and key indicators (RSI, EMAs) for Bitcoin.
Wider Market Context: Daily prices and RSI for Gold (GC=F) and Crude Oil (CL=F) to capture broader market sentiment.
Recent News: A summary of up to 20 relevant news headlines and descriptions from the 7 days prior to the prediction date.
Social Media Buzz: A sample of social media posts mentioning Bitcoin to gauge public sentiment.
Data Sources Market Data: Daily closing prices, volume, and technical indicators for BTC-USD, Gold Futures (GC=F), and WTI Crude Oil Futures (CL=F) were fetched using the yfinance library.
News Articles: Sourced from the edaschau/bitcoin_news dataset on Hugging Face, providing a large corpus of historical news.
Social Media Posts: Sourced from the gauravduttakiit/bitcoin-tweets-16m-tweets-with-sentiment-tagged dataset on Kaggle.
How to Use The dataset is provided in JSON format and can be loaded directly using the datasets library.
from datasets import load_dataset
Load the dataset from the Hugging Face Hub
repo_id = "YourUsername/bitcoin-prediction-context-dataset" # <-- Replace with your repo ID dataset = load_dataset(repo_id)
Access the training split
train_data = dataset['train']
Print the first sample
print(train_data[0])
Data Structure The dataset is split into train.json and validation.json. Each entry in these files is a JSON object with the following fields:
instruction: (string) - A directive for the language model. It includes the task description and a list of the previous 90 days of Bitcoin closing prices.
input: (string) - The context the model should use to make its prediction. This multi-line string is formatted with clear headings:
[Bitcoin Technical Analysis for YYYY-MM-DD]: Contains the trading volume, 14-day RSI, and the price's position relative to the 50-day and 200-day EMAs for the current day.
[Wider Market Context]: Contains the closing prices and RSI for Gold and Crude Oil.
[Recent News (last 7 days)]: A summary of up to 20 news headlines and their descriptions from the previous week.
[Social Media Buzz]: A sample of up to 10 concatenated social media posts from the current day.
output: (string) - The ground truth for the prediction. This is a comma-separated string of the next 10 days of Bitcoin's closing prices.
Example Data Point { "instruction": "Given the historical Bitcoin prices from the last 90 days, predict the next 10 daily closing prices. The historical prices are: 47496.81, 47178.12, ..., 42244.52.", "input": "[Bitcoin Technical Analysis for 2021-03-31]\nVolume: 55625901357, RSI (14-day): 58.63, 50-day EMA: 53776.34, 200-day EMA: 34887.91\n\n[Wider Market Context]\nGold Price: 1707.00, Gold RSI: 48.21\nOil Price: 59.16, Oil RSI: 45.89\n\n[Recent News (last 7 days)]\nGoldman Sachs Is Said to Be Close to Offering Bitcoin to Its Richest Clients: The bank is aiming to begin offering investments in the emerging asset class in the second quarter, according to a person familiar with the matter.... || Another major Wall Street player is looking to get into bitcoin....\n\n[Social Media Buzz]\n#Bitcoin is the future of money! To the moon! 🚀... || I'm selling all my BTC, this is getting too volatile....", "output": "59095.81, 59793.24, 60199.96, 58137.81, 58778.18, 58245.00, 56048.44, 57845.23, 58347.37, 59729.89" }
Citation If you use this dataset in your research, please consider citing it:
@misc{your_name_2025_bitcoin_prediction, author = {Your Name}, title = {Bitcoin Price Prediction Instruction Dataset}, year = {2025}, publisher = {Hugging Face}, journal = {Hugging Face repository}, howpublished = {\url{https://huggingface.co/datasets/YourUsername/bitcoin-prediction-context-dataset}}, }
Disclaimer: This dataset is intended for research and educational purposes only. Financial markets are highly volatile, and past performance is not indicative of future results. Do not use models trained on this data for actual financial trading.