Skip to content

Commit 0c9e77b

Browse files
iPwndsclaude
andcommitted
Initial commit: High-performance algorithmic trading system
Features: - 4 trading strategies: MA Crossover, Mean Reversion, Momentum, RSI - SIMD-optimized technical indicators - Event-driven backtesting engine - Paper trading broker simulation - Comprehensive risk management - TUI dashboard for monitoring - CLI interface with multiple commands Project structure: - 9 modular crates in Cargo workspace - Full test coverage (92 tests) - GitHub Actions CI/CD pipeline - MIT License Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 parents  commit 0c9e77b

78 files changed

Lines changed: 12685 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig helps maintain consistent coding styles
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_style = space
10+
indent_size = 4
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.rs]
15+
indent_size = 4
16+
17+
[*.toml]
18+
indent_size = 4
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[*.yml]
24+
indent_size = 2
25+
26+
[*.yaml]
27+
indent_size = 2
28+
29+
[Makefile]
30+
indent_style = tab

.github/FUNDING.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with your GitHub username
4+
# patreon: # Replace with your Patreon username
5+
# open_collective: # Replace with your Open Collective username
6+
# ko_fi: # Replace with your Ko-fi username
7+
# tidelift: # Replace with your Tidelift package info
8+
# community_bridge: # Replace with your Community Bridge project
9+
# liberapay: # Replace with your Liberapay username
10+
# issuehunt: # Replace with your IssueHunt username
11+
# otechie: # Replace with your Otechie username
12+
# lfx_crowdfunding: # Replace with your LFX Crowdfunding project
13+
14+
custom: # Replace with custom funding URLs
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of the bug.
11+
12+
## Steps to Reproduce
13+
1. Run command '...'
14+
2. With configuration '...'
15+
3. See error
16+
17+
## Expected Behavior
18+
A clear description of what you expected to happen.
19+
20+
## Actual Behavior
21+
What actually happened instead.
22+
23+
## Error Output
24+
```
25+
Paste any error messages or logs here
26+
```
27+
28+
## Environment
29+
- **OS**: [e.g., Ubuntu 22.04, macOS 14, Windows 11]
30+
- **Rust Version**: [output of `rustc --version`]
31+
- **Trading System Version**: [output of `trading --version`]
32+
33+
## Configuration
34+
```toml
35+
# Relevant configuration settings (remove sensitive data)
36+
```
37+
38+
## Additional Context
39+
Add any other context about the problem here.
40+
41+
## Possible Solution
42+
If you have ideas on how to fix this, please share them.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem Statement
10+
A clear description of the problem this feature would solve.
11+
Ex. "I'm always frustrated when..."
12+
13+
## Proposed Solution
14+
A clear description of what you want to happen.
15+
16+
## Alternatives Considered
17+
Any alternative solutions or features you've considered.
18+
19+
## Use Case
20+
Describe how you would use this feature:
21+
22+
```bash
23+
# Example usage
24+
trading backtest --new-feature ...
25+
```
26+
27+
## Additional Context
28+
- Does this affect existing functionality?
29+
- Are there any breaking changes?
30+
- Any relevant links or references?
31+
32+
## Implementation Ideas
33+
If you have thoughts on how this could be implemented:
34+
35+
- [ ] Component/crate affected
36+
- [ ] Rough implementation approach
37+
- [ ] Testing considerations
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Strategy Request
3+
about: Request a new trading strategy
4+
title: '[STRATEGY] '
5+
labels: strategy, enhancement
6+
assignees: ''
7+
---
8+
9+
## Strategy Name
10+
Name of the trading strategy.
11+
12+
## Description
13+
Brief description of how the strategy works.
14+
15+
## Entry Conditions
16+
- Condition 1
17+
- Condition 2
18+
- ...
19+
20+
## Exit Conditions
21+
- Condition 1
22+
- Condition 2
23+
- ...
24+
25+
## Indicators Required
26+
List any technical indicators needed:
27+
- [ ] RSI
28+
- [ ] MACD
29+
- [ ] Bollinger Bands
30+
- [ ] Other: ___
31+
32+
## Parameters
33+
| Parameter | Description | Default |
34+
|-----------|-------------|---------|
35+
| param1 | Description | value |
36+
| param2 | Description | value |
37+
38+
## Risk Management
39+
Any specific risk management rules for this strategy.
40+
41+
## References
42+
- Links to articles, papers, or other resources describing this strategy
43+
- Backtesting results from other platforms (if available)
44+
45+
## Additional Notes
46+
Any other relevant information about the strategy.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Description
2+
Brief description of the changes in this PR.
3+
4+
## Related Issue
5+
Fixes #(issue number)
6+
7+
## Type of Change
8+
- [ ] Bug fix (non-breaking change that fixes an issue)
9+
- [ ] New feature (non-breaking change that adds functionality)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Documentation update
12+
- [ ] Performance improvement
13+
- [ ] Code refactoring
14+
- [ ] New strategy
15+
- [ ] New indicator
16+
17+
## Changes Made
18+
- Change 1
19+
- Change 2
20+
- ...
21+
22+
## Testing
23+
Describe the tests you ran:
24+
25+
- [ ] All existing tests pass (`cargo test --workspace`)
26+
- [ ] Added new tests for the changes
27+
- [ ] Tested manually with the following scenarios:
28+
- Scenario 1
29+
- Scenario 2
30+
31+
## Documentation
32+
- [ ] Updated relevant documentation
33+
- [ ] Added/updated doc comments
34+
- [ ] Updated CHANGELOG.md (if applicable)
35+
36+
## Checklist
37+
- [ ] My code follows the project's style guidelines
38+
- [ ] I have performed a self-review of my code
39+
- [ ] I have commented my code, particularly in hard-to-understand areas
40+
- [ ] My changes generate no new warnings
41+
- [ ] I have run `cargo fmt` and `cargo clippy`
42+
43+
## Screenshots (if applicable)
44+
Add screenshots to help explain your changes.
45+
46+
## Additional Notes
47+
Any additional information that reviewers should know.

.github/SECURITY.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 0.1.x | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
We take security seriously. If you discover a security vulnerability, please report it responsibly.
12+
13+
### How to Report
14+
15+
1. **Do NOT** create a public GitHub issue for security vulnerabilities
16+
2. Email security concerns to: [your-email@example.com]
17+
3. Include as much detail as possible:
18+
- Description of the vulnerability
19+
- Steps to reproduce
20+
- Potential impact
21+
- Suggested fix (if any)
22+
23+
### What to Expect
24+
25+
- **Acknowledgment**: Within 48 hours of your report
26+
- **Assessment**: Within 7 days, we'll assess the vulnerability and determine its severity
27+
- **Resolution**: We aim to resolve critical vulnerabilities within 30 days
28+
- **Disclosure**: We'll coordinate with you on public disclosure timing
29+
30+
### Scope
31+
32+
Security issues we're interested in:
33+
34+
- Authentication/authorization bypasses
35+
- Code injection vulnerabilities
36+
- Sensitive data exposure
37+
- Cryptographic weaknesses
38+
- Unsafe handling of API credentials
39+
40+
### Out of Scope
41+
42+
- Denial of service attacks
43+
- Social engineering
44+
- Physical attacks
45+
- Issues in dependencies (report to upstream)
46+
47+
### Safe Harbor
48+
49+
We consider security research conducted in good faith to be authorized. We will not pursue legal action against researchers who:
50+
51+
- Make a good faith effort to avoid privacy violations and disruption
52+
- Provide us reasonable time to fix the issue before public disclosure
53+
- Do not exploit the vulnerability beyond what's necessary to demonstrate it
54+
55+
## Security Best Practices for Users
56+
57+
### API Credentials
58+
59+
- Never commit API keys to version control
60+
- Use environment variables for sensitive data
61+
- Rotate API keys regularly
62+
- Use paper trading mode for testing
63+
64+
### Configuration
65+
66+
- Keep configuration files private
67+
- Don't share configuration with API secrets
68+
- Use appropriate file permissions
69+
70+
### Running the Application
71+
72+
- Run with minimal required permissions
73+
- Monitor for unusual activity
74+
- Keep the application updated
75+
76+
## Acknowledgments
77+
78+
We appreciate the security research community and will acknowledge researchers who help improve our security (with their permission).

0 commit comments

Comments
 (0)