How paneertikka01/bitcoin-algo-trading-strategy works
Purpose and Entry Point
This is a notebook-centric Bitcoin algorithmic trading strategy for historical analysis and potential order execution. The primary executable artifact is BTC-algotrad-strat.ipynb; there is no standalone Python package, service, or CLI. Historical OHLCV-style market input is supplied by btc_4h_data_2018_to_2024-2024-12-10.csv.
Data Ingestion and Preparation
The notebook loads locally stored Bitcoin 4-hour historical data, then formats it for indicator computation and backtesting. The README notes that notebook path/name variables may currently expect a different CSV name, creating an operational boundary between the checked-in dataset and runtime configuration.
• BTC-algotrad-strat.ipynb
• btc_4h_data_2018_to_2024-2024-12-10.csv
Technical Signal Layer
Strategy decisions combine Ichimoku Cloud structure—Tenkan-sen, Kijun-sen, and Senkou spans—with supporting technical indicators such as RSI, MACD, and moving averages. This is the core market-state transformation: cleaned price series become trend, momentum, and confirmation features.
• BTC-algotrad-strat.ipynb
Trading Decision and Risk Layer
The notebook converts indicator conditions into long/short or buy/sell trade signals. Risk controls described by the repository include stop-loss handling and leverage control; these constrain position behavior rather than acting as a separate deployable risk service.
• BTC-algotrad-strat.ipynb
Backtest and Portfolio Accounting
Historical signals are simulated against the BTC dataset to produce trades, portfolio balance evolution, fees, returns, drawdown, and risk-adjusted metrics such as Sharpe and Sortino ratios. The backtest is the main evaluation path and is driven by local data rather than an external market-data service.
• BTC-algotrad-strat.ipynb
• btc_4h_data_2018_to_2024-2024-12-10.csv
Execution Integration Boundary
For live or paper order placement, the strategy is intended to integrate with untrade-sdk, an external dependency installed separately. The repository itself does not contain SDK source, credentials, exchange adapters, scheduling, or deployment infrastructure, so execution is an external boundary reached from the notebook.
• BTC-algotrad-strat.ipynb
Runtime and Dependencies
The expected runtime is Python in Jupyter. Architecturally material libraries are ta and pandas_ta for indicators, tqdm for iterative progress, and untrade-sdk for trading execution. Reproducibility depends on manually installing these packages and aligning notebook CSV configuration with btc_4h_data_2018_to_2024-2024-12-10.csv.
Main entry points: BTC-algotrad-strat.ipynb Data Preparation · btc_4h_data_2018_to_2024-2024-12-10.csv BTC 4h Historical Data
Components 13
Jupyter Strategy Notebook
Single runtime for analysis, backtesting, and execution integration.
- Strategy Notebook · Primary executable artifact and runtime entry point.
BTC-algotrad-strat.ipynb - Data Preparation · Loads and formats local price data; CSV naming must match runtime configuration.
BTC-algotrad-strat.ipynb - Technical Indicators · Builds Ichimoku, RSI, MACD, and moving-average features.
BTC-algotrad-strat.ipynb - Trade Signals · Converts market-state conditions into buy/sell or long/short signals.
BTC-algotrad-strat.ipynb - Risk Controls · Applies stop-loss and leverage constraints.
BTC-algotrad-strat.ipynb - Backtest Simulation · Simulates historical trades from signals and prices.
BTC-algotrad-strat.ipynb - Portfolio Accounting · Calculates balances, fees, returns, drawdown, Sharpe, and Sortino.
BTC-algotrad-strat.ipynb - Strategy Evaluation · Historical performance and risk evaluation.
BTC-algotrad-strat.ipynb
External Dependencies
Manually installed libraries and execution boundary.
- ta / pandas_ta · Indicator computation dependencies.
- tqdm · Iterative progress dependency.
- untrade-sdk · Separately installed order-placement integration.
- Order Execution · Live or paper execution; exchange adapters and credentials are outside the repository.
Other components
- BTC 4h Historical Data · Local OHLCV-style Bitcoin market history.
btc_4h_data_2018_to_2024-2024-12-10.csv
Connections 13
- Strategy Notebook → Data Preparation: runs
- BTC 4h Historical Data → Data Preparation: OHLCV input
- Data Preparation → Technical Indicators: clean price series
- ta / pandas_ta → Technical Indicators: computes
- Technical Indicators → Trade Signals: market features
- Trade Signals → Risk Controls: candidate positions
- Risk Controls → Backtest Simulation: constrained signals
- Data Preparation → Backtest Simulation: historical prices
- Backtest Simulation → Portfolio Accounting: trades and balances
- Portfolio Accounting → Strategy Evaluation: performance metrics
- tqdm → Backtest Simulation: iteration progress
- Risk Controls → untrade-sdk: execution intent
- untrade-sdk → Order Execution: places orders