Skip to content

Spike/model tuning[do not merge]#2

Draft
sun510001 wants to merge 9 commits intomainfrom
spike/model_tuning
Draft

Spike/model tuning[do not merge]#2
sun510001 wants to merge 9 commits intomainfrom
spike/model_tuning

Conversation

@sun510001
Copy link
Owner

No description provided.

…nd improve backtest engine

- Implemented _maybe_add_term_spread method in DataProcessor to calculate TermSpread from US30Y and US3M yields.
- Updated process_and_align method to include TermSpread calculation based on selected assets.
- Increased sleep time in YahooIncrementalLoader to 5 seconds to reduce request rate.
- Modified logger initialization to only log when in the main process.
- Added new methods in BacktestEngine for risk leverage and intra-group weight calculations.
- Enhanced backtest logic to incorporate risk and safe asset management with leverage controls.
- Updated portfolio value calculations to handle cash balance and ensure proper weight normalization.
- Changed pct_change method calls to avoid fill method issues in returns calculations.
- Simplified backtest results filename generation for consistency.
- Added pyyaml to requirements for future configuration management.
- Added MyCustomAlgorithms class with a template for custom rebalance strategies in algorithms_template.py.
- Updated BacktestEngine to support flexible rebalance functions and improved context handling for rebalancing.
- Enhanced trend model interface in trend_models_template.py with a SimpleMomentumTrendModel example.
- Improved performance statistics calculation in BacktestEngine, including new metrics like Calmar Ratio and Max Recovery Days.
- Refactored data handling and validation processes in BacktestEngine for better robustness and clarity.
- Added BaostockIncrementalLoader for fetching A-share data, supporting CSV storage and data normalization.
- Enhanced AkshareIncrementalLoader to support multiple asset types including A-share indices, ETFs, gold, and Hong Kong indices.
- Improved data handling in existing loaders to ensure proper index sanitization and format consistency.
- Updated requirements.txt to include baostock dependency.
- Enhanced data processing in DataProcessor and YahooIncrementalLoader to handle NaT indices and ensure data integrity.
- Expanded BacktestEngine to support new parameters for asset weight management and logging of rebalance actions.
feat: enhance UI with macro asset options and release rules
feat: implement FRED data downloader for macroeconomic indicators
refactor: update data processing to align macro observations with release rules
chore: add fredapi dependency to requirements
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.

1 participant