A comprehensive backtesting system for USDC arbitrage strategies across multiple exchanges and timeframes.
- Advanced Data Pipeline: Validates, processes, and fills gaps in OHLCV data
- Backtesting Engine: Tests arbitrage strategies with realistic transaction costs and slippage
- Strategy Management: Version control, comparison, and A/B testing for strategies
- Security: JWT authentication, RBAC, and API security enhancements
- Monitoring: System health, business metrics, and error tracking
- API: Comprehensive endpoints with documentation
- Analytics: Performance visualization and risk management
- Deployment: Containerization, CI/CD, and database optimization
- Python 3.11+
- PostgreSQL with TimescaleDB extension
- Redis (for rate limiting and caching)
-
Clone the repository:
git clone https://github.com/yourusername/usdc-arbitrage.git cd usdc-arbitrage
-
Create and activate a virtual environment:
uv venv .venv # On Windows .venv\Scripts\activate # On Unix/MacOS source .venv/bin/activate
-
Install dependencies:
uv pip install -e .
-
Set up the database:
# Run the database setup script psql -U postgres -f .sql/database_setup.sql
-
Configure environment variables:
cp .env.example .env # Edit .env with your configuration
uvicorn src.api.main:app --reload
The API will be available at http://localhost:8000
pytest tests/
Build and run the Docker image:
docker build -t usdc-arbitrage .
docker run -p 8000:8000 usdc-arbitrage
Deploy to Kubernetes:
kubectl apply -k k8s/overlays/production
src/
: Source codeapi/
: API endpoints and middlewaredata/
: Data processing and validationmodels/
: Database modelsstrategies/
: Trading strategiesmonitoring/
: System monitoring and alertingreporting/
: Report generation
tests/
: Test suitek8s/
: Kubernetes configurationterraform/
: Infrastructure as codescripts/
: Utility scripts.sql/
: Database setup and migration scripts
This project is licensed under the MIT License - see the LICENSE file for details.