Profit-Pilot is a research-grade framework for developing, training, and evaluating reinforcement learning (RL) agents for multi-asset cryptocurrency portfolio management. It is designed for academic, educational, and practical experimentation with RL-based trading strategies, using real historical market data and robust evaluation metrics.
Build a reinforcement learning agent that learns a profitable portfolio-allocation policy from historical crypto market data. The agent observes market conditions, selects trading actions, receives reward from portfolio performance, and improves its policy through repeated interaction with a custom environment.
- Trading is a sequential decision-making problem: actions affect future outcomes.
- RL optimizes long-term cumulative reward, not just one-step prediction.
- RL directly models the trading loop: observe → act → reward → learn.
- Data Download: Fetch historical OHLCV data for multiple crypto assets (e.g., BTC/USDT, ETH/USDT) from Binance.
- Feature Engineering: Compute technical indicators and process data into arrays.
- Custom Environment: Feed arrays into a Gymnasium-style multi-asset trading environment with realistic constraints (fees, slippage, risk limits).
- Agent Training: Train a PPO (Proximal Policy Optimization) agent on the environment.
- Evaluation: Test on unseen data, compare to benchmarks, and analyze risk/return metrics.
- Extensions: Add original features (e.g., LSTM, risk overlays, new reward functions).
- Modular pipeline: data, features, environment, agent, evaluation
- Multi-asset support (BTC, ETH, etc.)
- Realistic trading constraints (fees, max drawdown, stop-loss, cooldown)
- PPO baseline (easily extensible to LSTM, other RL algorithms)
- Academic references and methodology included
- Ready-to-run Colab and local Jupyter notebooks
- Reproducible experiments and artifact tracking
Colab 5m PPO Agent vs. Equal-Weight Benchmark (2024-2026 test set):
| Metric | PPO Agent | Equal-Weight |
|---|---|---|
| Final Value | $10,179 | $8,200 |
| Total Return (%) | 1.79 | -17.99 |
| Annualized Return (%) | 6.10 | -48.37 |
| Sharpe Ratio | 0.39 | -0.78 |
| Max Drawdown (%) | 9.55 | 43.20 |
| Trade Events | 28,246 | 0 |
See reports/colab_5m_2024_2026/profit_pilot_ppo_5m_t4_test_metrics.json for full details.
src/profit_pilot/— Core package (data, env, features, train, utils)data/— Raw and processed market data bundlesmodels/— Saved agent checkpoints and training summariesreports/— Evaluation metrics, plots, and experiment artifactsnotebooks/— Jupyter/Colab notebooks for training and analysisdocs/— Methodology, setup guide, reference analysis, slidesconfig/— Project and experiment configuration filestests/— Unit tests
- Clone the repo and set up the environment:
git clone <repo-url> cd ProfitPilot python -m venv .venv .\.venv\Scripts\Activate.ps1 pip install -r requirements.txt pip install -e .
- Configure API keys:
- Copy
.env.exampleto.envand fill in your Binance API credentials (or use sandbox mode).
- Copy
- Run a notebook:
- Open
notebooks/colab_t4_5m_profit_pilot_training.ipynbornotebooks/Local Run/Local_run_5m.ipynbin Jupyter/Colab. - Follow the cells to train and evaluate the agent.
- Open
src/profit_pilot/data/download_ohlcv.py— Download historical OHLCV datasrc/profit_pilot/features/build_features.py— Compute technical indicatorssrc/profit_pilot/env/multi_crypto_env.py— Custom multi-asset trading environmentsrc/profit_pilot/train/train_ppo.py— PPO agent training loopsrc/profit_pilot/train/evaluate_model.py— Evaluation and metricssrc/profit_pilot/utils/io.py— I/O utilities
- Run
pytestor checktests/test_multi_crypto_env.pyfor environment tests.
docs/METHODOLOGY.md— Project methodology and academic rationaledocs/SETUP_GUIDE.md— Step-by-step setup instructionsdocs/REFERENCE_ANALYSIS.md— Analysis of reference repositoriesdocs/PRESENTATION_SLIDES.md— Slide-ready project summary
- FinRL_Crypto
- oyi77/Crypto-RL-Trading-Bot
- notadamking/RLTrader
- Automated-Cryptocurrency-trading-using-Deep-RL
- Moody & Saffell (2001), "Learning to Trade via Direct Reinforcement"
- Recent RL trading literature (see
docs/METHODOLOGY.md)
- Divyesh, Utsker, Smit
Specify your license here (MIT, Apache 2.0, etc.)
For questions, open an issue or see the documentation in the docs/ folder.