3.17
Machine Learning KNN
PYTHON PLUGIN
Stocks
Machine Learning
Description
Strategy 3.17: KNN-based directional prediction
Strategy Logic
K-Nearest Neighbors classification strategy.
Parameters
| Parameter | Default Value | Type |
|---|---|---|
| k | 10 | int |
| train_window | 252 | int |
| feature_lookbacks | [1, 5, 10, 21] | list |
| min_confidence | 0.6 | float |
Risk Configuration
| Risk Parameter | Value |
|---|---|
| Max Position Pct | 8.0% |
| Stop Loss Pct | 3.0% |
| Take Profit Pct | 6.0% |
| Max Drawdown Pct | 12.0% |