Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/ai-backtest-engine.git - Create a feature branch:
git checkout -b feature/your-feature-name - Install dependencies:
pip install -r requirements.txt
- Follow PEP 8 conventions
- Use type hints for function signatures
- Include docstrings for all public classes and methods (NumPy style)
- Keep functions focused and under 50 lines where practical
- Never use random train/test splits — always use
TimeSeriesSplitor temporal splits - Validate that no look-ahead bias exists in features or signals
- Include realistic transaction costs in all backtest evaluations
- Document any assumptions about data frequency or market hours
- Write tests for new features:
pytest tests/ - Ensure all existing tests pass before submitting
- Include edge cases (empty data, single row, missing columns)
Use conventional commit format:
feat: add new feature description
fix: correct bug in module
docs: update documentation
test: add tests for module
refactor: restructure code without behavior change
- Update documentation if you've changed APIs
- Add or update tests for your changes
- Ensure all tests pass:
pytest tests/ -v - Update
requirements.txtif you've added dependencies - Submit a pull request with a clear description of changes
- Use GitHub Issues for bug reports and feature requests
- Include steps to reproduce for bugs
- Include Python version and OS information
By contributing, you agree that your contributions will be licensed under the MIT License.