How conthobansung/bitcoin-prediction-changes works
Project Purpose and Type
• This is a machine learning system focused on real-time cryptocurrency (Bitcoin) analysis.
• It combines multiple models to deliver price predictions, trend forecasts, and trading signals.
• The system fetches live data using Yahoo Finance (via the yfinance library) and calculates technical indicators (like RSI, MACD, SMA, Bollinger Bands, etc.) to inform its predictions.
Breakdown of the File Structure
• Model Files:
• bitcoin_price_prediction_model.h5: A time-series deep learning model.
• hybrid_trend_prediction.h5: A hybrid model predicting trend directions.
• trading_signal_model_gbm.pkl: A Gradient Boosting Machine for generating buy/sell signals.
• Prediction Scripts:
• bitcoin_price_predict.py: Likely handles the price prediction workflow.
• trading_signal_predict.py: Dedicated to generating trading signals.
• trending_predict.py: Focuses on overall trend prediction.
• Data & Utility Scripts:
• dataset.py: Possibly prepares or fetches the data (and might calculate technical indicators).
• data_transfering.py: Could be involved in data handling between modules.
• test_all.py: Contains tests for validating the system’s components.
• README.md: Provides overall documentation and usage instructions.
A. Data Acquisition & Ingestion:
• Component: Data Fetcher (using the yfinance API) that retrieves live Bitcoin price data.
• Technology: yfinance library.
• Direction: External service (Yahoo Finance) → Data Acquisition Component.
B. Data Preprocessing & Feature Engineering:
• Component: Data Processor (likely represented by dataset.py and parts of data_transfering.py).
• Functions: Calculate technical indicators (RSI, SMA, EMA, Bollinger Bands, MACD, etc.) and preprocess data for the models.
• Direction: Data Acquisition → Data Processor.
C. Price Prediction Module:
• Component: Price Prediction Engine (handled by bitcoin_price_predict.py).
• Model: bitcoin_price_prediction_model.h5.
• Role: Predicts current and next minute Bitcoin prices.
• Direction: Data Processor → Price Prediction Model.
D. Trend Prediction Module:
• Component: Trend Forecast Component (using trending_predict.py and hybrid_trend_prediction.h5).
• Role: Provides overall directional trend (Increase or Decrease) based on combined inputs.
• Direction: Data Processor → Trend Prediction Model.
E. Trading Signal Module:
• Component: Trading Signal Generator (implemented in trading_signal_predict.py).
• Model: trading_signal_model_gbm.pkl.
• Role: Outputs trading signals (Buy/Sell) using technical indicators.
• Direction: Data Processor + Price/Trend predictions → Trading Signal Model.
F. Testing and Validation:
• Component: Test Suite (test_all.py) ensuring reliability of each module.
• Role: Integration and unit testing across components.
Architectural Patterns and Design Principles
• Modular Design: Each functional area (data acquisition, processing, prediction, and signal generation) is encapsulated in separate scripts or modules.
• Real-Time Data Pipeline: Emphasize how data flows from acquisition through pre-processing to inference.
• Separation of Concerns: Clearly divide the responsibilities of price prediction, trend forecasting, and trading signal generation.
• Integration: Although the system acts as a monolithic script setup, you might conceptualize it as a pipeline that could be modularized for scalability.
Specific Elements
• Clear labels for each component: “Data Acquisition”, “Data Preprocessing”, “Price Prediction”, “Trend Prediction”, “Trading Signal Generator”, and “Test Suite”.
• From “Yahoo Finance” (External Data Source) → “Data Acquisition Module”
• From “Data Acquisition” → “Data Preprocessing & Feature Engineering”
• Visual Differentiators: