Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTC Predictor

An ensemble Bitcoin price-direction predictor built with XGBoost + PyTorch LSTM, served via a Streamlit dashboard. Uses only free public APIs — no keys required.

Quick Start

cd btc_predictor
pip install -r requirements.txt
streamlit run app.py

App opens at http://localhost:8501

Features

  • Live Signal tab — BUY / HOLD / SELL with confidence gauge, candlestick + EMA chart, RSI subplot
  • Backtesting tab — 5-fold walk-forward accuracy table, cumulative PnL vs buy-and-hold
  • Feature Explorer tab — Plot any indicator over price, XGBoost importance chart

Data Sources (all free, no API key)

Source Usage
Binance public REST BTC/USDT daily + hourly OHLCV
CoinGecko Market cap context
alternative.me Fear & Greed Index

Model Architecture

final_prob = 0.6 × XGBoost_prob + 0.4 × LSTM_prob
confidence = |final_prob − 0.5| × 200   # 0% = max uncertainty, 100% = max certainty
  • XGBoost: 300 trees, binary direction classifier on ~30 tabular features
  • LSTM: 2-layer, hidden=128, 30-candle sliding window, early stopping

No Lookahead Bias

  • TimeSeriesSplit for all train/test splits
  • MinMaxScaler fit only on training partition, applied to test
  • Target = next candle direction (shifted by -1 then dropped from latest row)

Free Deployment

  1. Push to GitHub
  2. Go to share.streamlit.io
  3. Connect repo → set main file to btc_predictor/app.py → Deploy

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages