Contributing to RustyBT¶
We welcome contributions to RustyBT! This guide will help you get started.
Code of Conduct¶
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
How to Contribute¶
Reporting Bugs¶
- Check if the bug has already been reported in GitHub Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs. actual behavior
- Environment details (OS, Python version, RustyBT version)
Suggesting Enhancements¶
- Check GitHub Discussions for similar ideas
- Create a new discussion or issue describing:
- The problem you're trying to solve
- Your proposed solution
- Any alternative approaches considered
Contributing Code¶
Development Setup¶
-
Fork and Clone
-
Install Development Dependencies
-
Install Pre-commit Hooks
Development Workflow¶
-
Create a Branch
-
Make Changes
- Follow PEP 8 and project conventions
- Write tests for new functionality
-
Update documentation as needed
-
Run Tests
-
Code Quality Checks
-
Commit Changes
Follow Conventional Commits:
- feat: - New feature
- fix: - Bug fix
- docs: - Documentation changes
- test: - Test changes
- refactor: - Code refactoring
- perf: - Performance improvements
- Push and Create Pull Request
Then create a pull request on GitHub with: - Clear description of changes - Related issue numbers - Test results
Development Guidelines¶
Testing Standards¶
- Zero-Mock Policy: We prefer integration tests over mocks whenever possible
- Property-Based Testing: Use Hypothesis for financial calculations
- Coverage Target: Aim for 90%+ test coverage
Code Style¶
- Follow PEP 8
- Use type hints (Python 3.12+)
- Write docstrings in Google style
- Keep functions focused and small
Documentation¶
- Update user guides for user-facing changes
- Update architecture docs for design changes
- Add code examples for new features
- Keep API documentation current
Project Structure¶
rustybt/
├── rustybt/ # Source code
│ ├── finance/ # Financial calculations
│ ├── data/ # Data management
│ ├── live/ # Live trading
│ └── ...
├── tests/ # Test suite
├── docs/ # Documentation
├── examples/ # Example strategies
└── benchmarks/ # Performance benchmarks
Areas for Contribution¶
High Priority¶
- Broker adapter implementations
- Data source adapters
- Performance optimizations
- Documentation improvements
- Bug fixes
Medium Priority¶
- New order types
- Additional metrics
- UI/visualization improvements
- Example strategies
Research/Experimental¶
- Rust module implementations
- Machine learning integrations
- Alternative data sources
- Advanced analytics
Questions?¶
- GitHub Discussions: For general questions and ideas
- GitHub Issues: For bugs and feature requests
- Documentation: Check the User Guides and Examples
License¶
By contributing, you agree that your contributions will be licensed under the Apache License 2.0. See License for details.
Acknowledgments¶
Thank you for contributing to RustyBT! Every contribution helps make algorithmic trading more accessible and robust.