Skip to content

A model for Bitcoin price prediction around ATHs and halvings, using historical volatility for future estimates. Not financial advice; educational use only.

License

Notifications You must be signed in to change notification settings

SMARTSHEEP-IO/bitcoin-price-prediction-analysis-simulating-growth-near-ath-halving

Repository files navigation

BITCOIN PRICE PREDICTION AND ANALYSIS BY SIMULATING CONSISTENT GROWTH NEAR ALL-TIME HIGH

This repository contains a predictive model for Bitcoin pricing, focusing on periods near historical all-time highs (ATH), particularly in the context of the Bitcoin halving events. The code implements a structured approach to estimate future Bitcoin prices by analyzing patterns of average volatility during near-ATH periods and applying a consistent, small, optimistic growth assumption to simulate potential price trajectories. The model utilizes historical Bitcoin data to identify these near-ATH periods, calculates the average volatility, and defines increments for future price estimation. The prediction spans from the last recorded date in the data to a future date calculated over several years.

Features and Benefits

  • Halving Events Analysis: Analyzes Bitcoin halving events as significant market indicators.
  • Visualization: Provides intuitive plots for comparing actual and predicted prices.
  • Average Volatility The methodology presented in the document focuses on using historical Bitcoin data, specifically when the price is near its all-time high, to predict future prices. By calculating the average volatility during these periods and assuming a consistent, small positive growth based on this volatility, the approach aims to estimate future Bitcoin prices systematically. Using a threshold to define 'near all-time high' periods and the specific formulae for calculation offer a structured predictive model.

Methodology

To predict future Bitcoin prices, follow these steps:

Let:

  • P_t: Bitcoin price at time t
  • t: time in days
  • t_0: last recorded date in the historical data
  • t_f: future date (t_f = t_0 + 1, 2, ..., 365 * 7 days)
  • P_max: maximum historical Bitcoin price
  • Threshold: threshold for 'near all-time high' periods, Threshold = 0.05 * P_max

The estimation process is as follows:

  1. Calculate the maximum historical Bitcoin price:

    • P_max = max(BTC Data)
  2. Filter data to include periods near the all-time high:

    • NearATH Data = BTC Data[P_t >= (P_max - Threshold)]
  3. Calculate the average volatility during these near all-time high periods:

    • ATH Average Volatility = mean(Volatility(NearATH Data))
  4. Assume a small positive increment for consistent growth:

    • Increment = 0.1 * ATH Average Volatility
  5. Estimate future prices using the increment:

    • P_t = P_{t-1} + Increment for t = t_0 + 1, ..., t_f

Disclaimer and Warning

  • Not Financial Advice: The predictions generated by this code are for educational purposes only and should not be construed as financial or investment advice. The author and contributors to this repository are not responsible for any financial losses incurred from decisions made based on the code's outputs.
  • No Responsibility: The creators of this project bear no responsibility for any financial losses.
  • Accuracy Not Guaranteed: There is no guarantee of the predictive performance of these models.
  • Independent Research: Users should conduct their research and consult professionals.
  • Compliance with Laws: Ensure compliance with all applicable laws and regulations in your jurisdiction.

Prerequisites

  • Python 3.11
  • Git

Installation

Setting Up a Virtual Environment

First, create and activate a virtual environment:

python -m venv .venv  # Create a virtual environment
source .venv/bin/activate  # Activate on macOS and Linux
.venv\Scripts\activate  # Activate on Windows

Installing Dependencies

Install the required dependencies:

pip install -r requirements.txt  # Install Python dependencies
npm install dukascopy-node --save  # Install Node.js dependencies

Data Collection

chmod +x data-download.sh
./data-download.sh

Quick Start

Windows Specific Notes

  • Use PowerShell or Git Bash for shell commands.
  • Ensure Docker Desktop for Windows is set to Linux containers.
  • Python commands may require using py instead of python or python3.

Clone the Repository

To get started, clone the repository:

git clone git@github.com:SMARTSHEEP-IO/bitcoin-price-prediction-analysis-simulating-growth-near-ath-halving.git

Usage

Execute the main.py script to start the data processing and model training/prediction process:

python main.py

Support and Subscribe

Contributing

Contributions to improve the project are welcome. Please adhere to standard open-source contribution guidelines.

Citation

If you use this project in your research or in any project, please cite it using the following:

Samizadeh, Iman. (2024). BITCOIN PRICE PREDICTION AND ANALYSIS BY SIMULATING CONSISTENT GROWTH NEAR ALL-TIME HIGH. Version 1.0. SMARTSHEEP-IO. [Online]. Available: https://github.com/SMARTSHEEP-IO/bitcoin-price-prediction-analysis-simulating-growth-near-ath-halving

    @misc{Samizadeh2024Bitcoin,
        author = {Samizadeh, Iman},
        title = {{BITCOIN PRICE PREDICTION AND ANALYSIS BY SIMULATING CONSISTENT GROWTH NEAR ALL-TIME HIGH}},
        year = {2024},
        howpublished = {\url{https://github.com/SMARTSHEEP-IO/bitcoin-price-prediction-analysis-simulating-growth-near-ath-halving}}
    }

Credit: https://github.com/Leo4815162342/dukascopy-node

Keywords: Bitcoin, Halving, Prediction, Volatility, Growth, ATH, Cryptocurrency, Analysis, Financial Modeling

About

A model for Bitcoin price prediction around ATHs and halvings, using historical volatility for future estimates. Not financial advice; educational use only.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published