Skip to content

Conversation

@lingster
Copy link
Contributor

No description provided.

lingster and others added 10 commits October 27, 2025 06:46
Implements Option 3 (Composition-Based Strategy Builder) architecture for creating
flexible, pluggable trading strategies by composing reusable components.

New Components:
- SignalGenerator: WHAT to trade (TopN, MeanReversion)
- EntryManager: WHEN/HOW to enter (Immediate, Vintage)
- ExitRule: WHEN to exit (TakeProfit, StopLoss, TimeBased)
- PositionSizer: HOW MUCH capital (RankPower, EqualWeight, Kelly)
- StateManager: Persistence (NoOp, Vintage, Database)

Key Features:
- Full and rolling modes decomposed into reusable components (60% code sharing)
- Take profit auto strategy implemented (80% component reuse)
- Hybrid strategies possible (e.g., rolling + take profit)
- YAML-based configuration with Python module extensibility
- Strategy factory pattern for plugin registration

Examples Included:
- 5 complete strategy configurations (full, rolling, take-profit, hybrids)
- Comprehensive documentation (POC, architecture, integration guide)
- Component implementations with protocol-based interfaces

This POC demonstrates how to transform hardcoded modes into a flexible
composition system while maintaining backward compatibility and achieving
high component reusability across strategies.
Detailed guide explaining:
- What vintages are and how they work
- Why use rolling mode (time diversification, prediction alignment, reduced turnover)
- Unit-based tracking to prevent drift
- Configuration options and cold start strategies
- CLI usage and monitoring
- Edge cases and robustness
- Full vs rolling comparison with performance analysis
- Real-world examples with 30-day rolling setup
- Best practices and common questions

This complements the existing docs/rolling-rebalancing.md with more detailed
explanations and practical examples for users wanting to understand the
rolling vintage mechanism in depth.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants