A Python tool for analyzing Dollar Cost Averaging (DCA) investment strategies for cryptocurrencies. Supports multiple trading pairs, custom buy frequencies, and provides detailed performance metrics and visualizations.
✅ Fetch historical price data from various exchanges (default: Binance)
✅ Multi-asset DCA simulation with custom allocations
✅ Flexible investment schedules (daily, weekly, biweekly, monthly)
✅ In-depth performance analysis per asset
✅ Comprehensive portfolio metrics with Fear Index tracking
✅ Visual insights via price and P&L charts
✅ Intuitive CLI output with progress indicators
Install the following dependencies:
pip install -r requirements.txt
pandas>=2.1.0
matplotlib>=3.8.0
ccxt>=4.1.13
rich>=13.7.0
numpy>=1.24.0
python dca_btc.py --daily-investment 10 --pairs BTC/USDT:100
python dca_btc.py --daily-investment 100 --pairs BTC/USDT:80 ETH/USDT:20
python dca_btc.py --daily-investment 100 --pairs BTC/USDT:60 ETH/USDT:30 SOL/USDT:10 --buy-period 1w
python dca_btc.py --start-date 2020-01-01 --end-date 2023-12-31 --daily-investment 100 \
--pairs BTC/USDT:50 ETH/USDT:30 DOT/USDT:20 \
--exchange binance --buy-period 2w
| Argument | Description |
| -- | |
| --start-date
| Start date in YYYY-MM-DD
format |
| --end-date
| End date in YYYY-MM-DD
format |
| --last-days
| Number of recent days to analyze |
| --daily-investment
| Daily investment amount in USD |
| --exchange
| Exchange to fetch data from (default: Binance) |
| --pairs
| Trading pairs with allocation percentages (e.g., BTC/USDT:80 ETH/USDT:20
) |
| --buy-period
| Investment frequency (1d=daily
, 1w=weekly
, 2w=biweekly
, 1m=monthly
) |
| --plot-type
| Chart output: 'all'
, 'total'
, or 'both'
|
Each run provides a detailed breakdown of your investments:
- 📊 Total Invested & Current Value
- 🔢 Accumulated Crypto Amounts
- 📈 Net Profit/Loss & PNL%
- 🛑 Fear Index (days in negative returns)
- 💵 Cost Basis vs. Market Price
- 📉 Historic Highs & Lows with Dates
- Individual Asset Performance Charts 📊
- Total Portfolio Performance Graph 📈
- Investment vs. Market Trends 🔍
python dca_btc.py --daily-investment 100 --pairs BTC/USDT:80 ETH/USDT:20
python dca_btc.py --daily-investment 500 --pairs BTC/USDT:50 ETH/USDT:30 SOL/USDT:20 --buy-period 1w
python dca_btc.py --daily-investment 1000 --pairs BTC/USDT:100 --buy-period 1m
python dca_btc.py --daily-investment 200 --pairs BTC/USDT:40 ETH/USDT:40 SOL/USDT:20 --plot-type total
Pull requests and contributions are welcome! Feel free to open issues for improvements.
This project is open-source under the MIT License.