feat: Add core trading modules for risk management, backtesting, and execution algorithms, alongside a new ML transparency widget and related frontend dependencies.
Some checks are pending
Documentation / build-docs (push) Waiting to run
Tests / test (macos-latest, 3.11) (push) Waiting to run
Tests / test (macos-latest, 3.12) (push) Waiting to run
Tests / test (macos-latest, 3.13) (push) Waiting to run
Tests / test (macos-latest, 3.14) (push) Waiting to run
Tests / test (ubuntu-latest, 3.11) (push) Waiting to run
Tests / test (ubuntu-latest, 3.12) (push) Waiting to run
Tests / test (ubuntu-latest, 3.13) (push) Waiting to run
Tests / test (ubuntu-latest, 3.14) (push) Waiting to run
Some checks are pending
Documentation / build-docs (push) Waiting to run
Tests / test (macos-latest, 3.11) (push) Waiting to run
Tests / test (macos-latest, 3.12) (push) Waiting to run
Tests / test (macos-latest, 3.13) (push) Waiting to run
Tests / test (macos-latest, 3.14) (push) Waiting to run
Tests / test (ubuntu-latest, 3.11) (push) Waiting to run
Tests / test (ubuntu-latest, 3.12) (push) Waiting to run
Tests / test (ubuntu-latest, 3.13) (push) Waiting to run
Tests / test (ubuntu-latest, 3.14) (push) Waiting to run
This commit is contained in:
@@ -49,14 +49,57 @@ After a backtest completes, you can export the results:
|
||||
|
||||
Both exports are automatically named with the current date for easy organization.
|
||||
|
||||
## Advanced Backtesting Features
|
||||
|
||||
### Walk-Forward Analysis
|
||||
|
||||
Walk-forward analysis provides robust parameter optimization by using rolling windows:
|
||||
|
||||
1. **Training Period**: Strategy parameters are optimized on training data (e.g., 90 days)
|
||||
2. **Testing Period**: Optimized parameters are tested on out-of-sample data (e.g., 30 days)
|
||||
3. **Rolling Window**: Window advances by step size (e.g., 30 days) and process repeats
|
||||
|
||||
This method prevents overfitting and provides more realistic performance estimates than single-period optimization.
|
||||
|
||||
**Benefits**:
|
||||
- Prevents overfitting to historical data
|
||||
- Tests strategy robustness across different market conditions
|
||||
- Provides confidence intervals for parameter estimates
|
||||
- Validates strategy performance on unseen data
|
||||
|
||||
### Monte Carlo Simulation
|
||||
|
||||
Monte Carlo simulation tests strategy robustness by running thousands of random scenarios:
|
||||
|
||||
- **Random Parameter Variation**: Tests strategy performance across parameter ranges
|
||||
- **Statistical Analysis**: Provides distribution of returns, Sharpe ratios, and drawdowns
|
||||
- **Confidence Intervals**: Shows expected performance ranges (e.g., 95% confidence)
|
||||
- **Risk Assessment**: Identifies worst-case scenarios and tail risks
|
||||
|
||||
Use Monte Carlo simulation to:
|
||||
- Validate strategy robustness
|
||||
- Assess parameter sensitivity
|
||||
- Understand potential downside risks
|
||||
- Estimate performance under various market conditions
|
||||
|
||||
## Parameter Optimization
|
||||
|
||||
Parameter optimization allows you to automatically find the best strategy parameters. This feature requires backend API support and will be available once the optimization endpoints are implemented.
|
||||
Parameter optimization allows you to automatically find the best strategy parameters using multiple algorithms:
|
||||
|
||||
The UI includes an information card explaining this feature. When available, you'll be able to:
|
||||
- **Grid Search**: Exhaustive search across parameter grid (best for small parameter spaces)
|
||||
- **Bayesian Optimization**: Efficient exploration using Gaussian process (best for expensive evaluations)
|
||||
- **Genetic Algorithms**: Evolutionary search that finds good solutions efficiently
|
||||
|
||||
Optimization metrics include:
|
||||
- Sharpe Ratio (risk-adjusted returns)
|
||||
- Total Return
|
||||
- Maximum Drawdown
|
||||
- Win Rate
|
||||
|
||||
When available via the backend API, you'll be able to:
|
||||
- Select parameters to optimize
|
||||
- Set parameter ranges
|
||||
- Choose optimization method (Grid Search, Genetic Algorithm, Bayesian Optimization)
|
||||
- Choose optimization method
|
||||
- View optimization progress
|
||||
- Compare optimization results
|
||||
|
||||
|
||||
Reference in New Issue
Block a user