fix: disable qwen3.5 thinking mode for analyzer (was consuming all tokens), increase timeout
This commit is contained in:
parent
d81d1dedac
commit
e24b6605d7
@ -51,21 +51,21 @@
|
|||||||
"type": "classification",
|
"type": "classification",
|
||||||
"direction": "long",
|
"direction": "long",
|
||||||
"horizon_candles": 6,
|
"horizon_candles": 6,
|
||||||
"threshold_pct": 1.0
|
"threshold_pct": 1.5
|
||||||
},
|
},
|
||||||
"hyperparameters": {
|
"hyperparameters": {
|
||||||
"learning_rate": 0.05,
|
"learning_rate": 0.05,
|
||||||
"max_depth": 6,
|
"max_depth": 4,
|
||||||
"n_estimators": 500,
|
"n_estimators": 500,
|
||||||
"subsample": 0.8,
|
"subsample": 0.8,
|
||||||
"colsample_bytree": 0.8,
|
"colsample_bytree": 0.8,
|
||||||
"min_child_weight": 5,
|
"min_child_weight": 5,
|
||||||
"gamma": 0.1,
|
"gamma": 0.1,
|
||||||
"reg_alpha": 0.1,
|
"reg_alpha": 0.5,
|
||||||
"reg_lambda": 1.0
|
"reg_lambda": 2.0
|
||||||
},
|
},
|
||||||
"strategy": {
|
"strategy": {
|
||||||
"entry_threshold": 0.6,
|
"entry_threshold": 0.75,
|
||||||
"exit_type": "trailing_stop",
|
"exit_type": "trailing_stop",
|
||||||
"stop_loss_pct": 2.0,
|
"stop_loss_pct": 2.0,
|
||||||
"take_profit_pct": 4.0,
|
"take_profit_pct": 4.0,
|
||||||
|
|||||||
@ -134,6 +134,7 @@ Analyze these results and suggest 1-3 specific modifications to the config. Retu
|
|||||||
{"role": "user", "content": user_prompt},
|
{"role": "user", "content": user_prompt},
|
||||||
],
|
],
|
||||||
"stream": False,
|
"stream": False,
|
||||||
|
"think": False,
|
||||||
"options": {
|
"options": {
|
||||||
"temperature": 0.7,
|
"temperature": 0.7,
|
||||||
"num_predict": 4096,
|
"num_predict": 4096,
|
||||||
@ -141,7 +142,7 @@ Analyze these results and suggest 1-3 specific modifications to the config. Retu
|
|||||||
}
|
}
|
||||||
|
|
||||||
print(f" Calling LLM ({MODEL} on Mac Mini)...")
|
print(f" Calling LLM ({MODEL} on Mac Mini)...")
|
||||||
resp = requests.post(f"{OLLAMA_URL}/api/chat", json=payload, timeout=300)
|
resp = requests.post(f"{OLLAMA_URL}/api/chat", json=payload, timeout=600)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
content = resp.json()["message"]["content"]
|
content = resp.json()["message"]["content"]
|
||||||
|
|
||||||
|
|||||||
2
results/iterations.jsonl
Normal file
2
results/iterations.jsonl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{"iteration": 1, "timestamp": "2026-03-19T22:27:13.722573+00:00", "sharpe": -0.619, "return": -40.57, "max_drawdown": -41.08, "win_rate": 0.279, "trades": 104, "profit_factor": 0.369, "model_type": "xgboost", "is_best": false, "config": {"model_type": "xgboost", "features": {"technical_indicators": ["RSI_14", "RSI_7", "RSI_21", "MACD_line", "MACD_signal", "MACD_hist", "BB_upper", "BB_lower", "BB_width", "ATR_14", "SMA_5", "SMA_10", "SMA_20", "SMA_50", "SMA_200", "EMA_5", "EMA_10", "EMA_20", "EMA_50", "OBV", "stoch_k", "stoch_d", "williams_r", "CCI_20", "ROC_10", "keltner_upper", "keltner_lower"], "lookback_periods": [3, 5, 10, 20], "use_volume_features": true, "use_volatility_features": true, "use_candle_patterns": true, "use_lag_features": true, "lag_periods": [1, 2, 3, 5]}, "target": {"type": "classification", "direction": "long", "horizon_candles": 6, "threshold_pct": 1.0}, "hyperparameters": {"learning_rate": 0.05, "max_depth": 6, "n_estimators": 500, "subsample": 0.8, "colsample_bytree": 0.8, "min_child_weight": 5, "gamma": 0.1, "reg_alpha": 0.1, "reg_lambda": 1.0}, "strategy": {"entry_threshold": 0.6, "exit_type": "trailing_stop", "stop_loss_pct": 2.0, "take_profit_pct": 4.0, "trailing_stop_pct": 1.5, "position_sizing": "confidence_scaled", "max_position_pct": 100, "min_confidence_to_trade": 0.55}, "training": {"walk_forward_windows": 5, "train_pct": 0.7, "validation_pct": 0.15, "test_pct": 0.15}, "timeframe": "4h"}, "results": {"sharpe_ratio": -0.619, "total_return_pct": -40.57, "max_drawdown_pct": -41.08, "win_rate": 0.279, "trade_count": 104, "profit_factor": 0.369, "avg_trade_duration_candles": 3.0, "feature_importances": {"EMA_20": 0.0295, "EMA_5": 0.0232, "OBV": 0.0222, "SMA_200": 0.022, "keltner_upper": 0.0199, "SMA_5": 0.0187, "price_vs_vwap": 0.0186, "RSI_21": 0.0186, "SMA_50": 0.0183, "high_low_range_10": 0.0177, "price_vs_SMA_200": 0.0176, "RSI_14": 0.0175, "EMA_50": 0.0172, "SMA_20": 0.0172, "ATR_pct": 0.0166, "BB_lower": 0.0164, "vwap_approx": 0.0163, "SMA_10": 0.0161, "hist_volatility": 0.0158, "CCI_20": 0.0157, "high_low_range_20": 0.0157, "MACD_signal": 0.0155, "return_5": 0.0155, "MACD_line": 0.0155, "price_vs_SMA_10": 0.0154, "MACD_hist": 0.0154, "price_vs_SMA_50": 0.0149, "return_10": 0.0148, "EMA_10": 0.0147, "BB_width": 0.0147}, "monthly_returns": [-10.9, -2.1, -8.85, 1.24, -3.7, -0.32, -7.86, -7.08, -3.35, -2.22, -2.34, -2.58, -1.06], "equity_curve": [1.0, 0.9835, 0.9619, 0.9407, 0.9279, 0.9075, 0.9043, 0.8954, 0.8959, 0.8942, 0.8794, 0.8649, 0.8808, 0.877, 0.8809, 0.888, 0.8767, 0.8731, 0.8677, 0.8486, 0.8409, 0.8224, 0.8212, 0.8199, 0.8018, 0.7948, 0.7862, 0.8161, 0.8118, 0.8427, 0.8395, 0.8285, 0.8103, 0.7925, 0.7751, 0.7686, 0.7846, 0.7875, 0.788, 0.775, 0.7801, 0.7819, 0.7863, 0.769, 0.7671, 0.7707, 0.7724, 0.7808, 0.7774, 0.7734, 0.7686, 0.765, 0.7529, 0.7443, 0.7356, 0.7304, 0.7183, 0.7254, 0.7164, 0.7007, 0.7096, 0.7026, 0.691, 0.6837, 0.6686, 0.6765, 0.6695, 0.6704, 0.6776, 0.6684, 0.6589, 0.6523, 0.6463, 0.6457, 0.6599, 0.6584, 0.6509, 0.649, 0.6432, 0.6291, 0.6317, 0.6497, 0.6386, 0.6364, 0.6335, 0.63, 0.6196, 0.6176, 0.6166, 0.6159, 0.6182, 0.6115, 0.6156, 0.6159, 0.614, 0.6075, 0.6008, 0.6058, 0.6076, 0.6055, 0.6006, 0.599, 0.5892, 0.5952, 0.5943], "per_window_sharpe": [-2.714, -0.921, -0.39, -1.089, -1.966]}}
|
||||||
|
{"iteration": 2, "timestamp": "2026-03-19T22:32:18.314965+00:00", "sharpe": -0.546, "return": -18.32, "max_drawdown": -20.98, "win_rate": 0.34, "trades": 53, "profit_factor": 0.542, "model_type": "xgboost", "is_best": false, "config": {"model_type": "xgboost", "features": {"technical_indicators": ["RSI_14", "RSI_7", "RSI_21", "MACD_line", "MACD_signal", "MACD_hist", "BB_upper", "BB_lower", "BB_width", "ATR_14", "SMA_5", "SMA_10", "SMA_20", "SMA_50", "SMA_200", "EMA_5", "EMA_10", "EMA_20", "EMA_50", "OBV", "stoch_k", "stoch_d", "williams_r", "CCI_20", "ROC_10", "keltner_upper", "keltner_lower"], "lookback_periods": [3, 5, 10, 20], "use_volume_features": true, "use_volatility_features": true, "use_candle_patterns": true, "use_lag_features": true, "lag_periods": [1, 2, 3, 5]}, "target": {"type": "classification", "direction": "long", "horizon_candles": 6, "threshold_pct": 1.5}, "hyperparameters": {"learning_rate": 0.05, "max_depth": 4, "n_estimators": 500, "subsample": 0.8, "colsample_bytree": 0.8, "min_child_weight": 5, "gamma": 0.1, "reg_alpha": 0.5, "reg_lambda": 2.0}, "strategy": {"entry_threshold": 0.75, "exit_type": "trailing_stop", "stop_loss_pct": 2.0, "take_profit_pct": 4.0, "trailing_stop_pct": 1.5, "position_sizing": "confidence_scaled", "max_position_pct": 100, "min_confidence_to_trade": 0.55}, "training": {"walk_forward_windows": 5, "train_pct": 0.7, "validation_pct": 0.15, "test_pct": 0.15}, "timeframe": "4h"}, "results": {"sharpe_ratio": -0.546, "total_return_pct": -18.32, "max_drawdown_pct": -20.98, "win_rate": 0.34, "trade_count": 53, "profit_factor": 0.542, "avg_trade_duration_candles": 2.3, "feature_importances": {"EMA_20": 0.0295, "EMA_5": 0.0274, "OBV": 0.0252, "price_vs_SMA_50": 0.0219, "EMA_10": 0.0214, "SMA_200": 0.0207, "return_lag_5": 0.0191, "SMA_5": 0.0189, "vwap_approx": 0.0187, "price_vs_SMA_200": 0.0186, "BB_lower": 0.0181, "SMA_20": 0.0175, "ATR_pct": 0.0174, "keltner_upper": 0.0172, "volume_sma_20": 0.017, "ATR_14": 0.0169, "return_5": 0.0167, "BB_upper": 0.0166, "SMA_50": 0.0164, "RSI_21": 0.0163, "high_low_range_10": 0.0163, "hist_volatility": 0.0163, "high_low_range_20": 0.0163, "EMA_50": 0.0162, "keltner_lower": 0.016, "MACD_hist": 0.0159, "RSI_14_lag_1": 0.0152, "CCI_20": 0.015, "high_low_range_5": 0.015, "volatility_20": 0.0149}, "monthly_returns": [-2.62, -1.95, -4.71, 1.32, -2.8, 1.53, -1.85, -4.51, -2.54, -3.73, 0.01, -1.05, 2.97, 0.31], "equity_curve": [1.0, 0.9952, 0.9921, 0.9767, 0.974, 0.9579, 0.9754, 0.954, 0.9546, 0.9336, 0.9323, 0.9308, 0.9103, 0.9023, 0.8926, 0.9265, 0.9217, 0.9567, 0.9357, 0.9151, 0.8949, 0.8857, 0.8992, 0.9025, 0.9085, 0.9106, 0.9157, 0.8956, 0.8916, 0.8842, 0.8766, 0.8663, 0.852, 0.8467, 0.828, 0.8386, 0.8304, 0.8167, 0.808, 0.7902, 0.7995, 0.7912, 0.7984, 0.8069, 0.7995, 0.8115, 0.8109, 0.8086, 0.7908, 0.7941, 0.8167, 0.8076, 0.8143, 0.8168], "per_window_sharpe": [-2.302, -0.762, -6.981, -0.909, 4.91]}}
|
||||||
170
results/results_iter_1.json
Normal file
170
results/results_iter_1.json
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
{
|
||||||
|
"sharpe_ratio": -0.619,
|
||||||
|
"total_return_pct": -40.57,
|
||||||
|
"max_drawdown_pct": -41.08,
|
||||||
|
"win_rate": 0.279,
|
||||||
|
"trade_count": 104,
|
||||||
|
"profit_factor": 0.369,
|
||||||
|
"avg_trade_duration_candles": 3.0,
|
||||||
|
"feature_importances": {
|
||||||
|
"EMA_20": 0.0295,
|
||||||
|
"EMA_5": 0.0232,
|
||||||
|
"OBV": 0.0222,
|
||||||
|
"SMA_200": 0.022,
|
||||||
|
"keltner_upper": 0.0199,
|
||||||
|
"SMA_5": 0.0187,
|
||||||
|
"price_vs_vwap": 0.0186,
|
||||||
|
"RSI_21": 0.0186,
|
||||||
|
"SMA_50": 0.0183,
|
||||||
|
"high_low_range_10": 0.0177,
|
||||||
|
"price_vs_SMA_200": 0.0176,
|
||||||
|
"RSI_14": 0.0175,
|
||||||
|
"EMA_50": 0.0172,
|
||||||
|
"SMA_20": 0.0172,
|
||||||
|
"ATR_pct": 0.0166,
|
||||||
|
"BB_lower": 0.0164,
|
||||||
|
"vwap_approx": 0.0163,
|
||||||
|
"SMA_10": 0.0161,
|
||||||
|
"hist_volatility": 0.0158,
|
||||||
|
"CCI_20": 0.0157,
|
||||||
|
"high_low_range_20": 0.0157,
|
||||||
|
"MACD_signal": 0.0155,
|
||||||
|
"return_5": 0.0155,
|
||||||
|
"MACD_line": 0.0155,
|
||||||
|
"price_vs_SMA_10": 0.0154,
|
||||||
|
"MACD_hist": 0.0154,
|
||||||
|
"price_vs_SMA_50": 0.0149,
|
||||||
|
"return_10": 0.0148,
|
||||||
|
"EMA_10": 0.0147,
|
||||||
|
"BB_width": 0.0147
|
||||||
|
},
|
||||||
|
"monthly_returns": [
|
||||||
|
-10.9,
|
||||||
|
-2.1,
|
||||||
|
-8.85,
|
||||||
|
1.24,
|
||||||
|
-3.7,
|
||||||
|
-0.32,
|
||||||
|
-7.86,
|
||||||
|
-7.08,
|
||||||
|
-3.35,
|
||||||
|
-2.22,
|
||||||
|
-2.34,
|
||||||
|
-2.58,
|
||||||
|
-1.06
|
||||||
|
],
|
||||||
|
"equity_curve": [
|
||||||
|
1.0,
|
||||||
|
0.9835,
|
||||||
|
0.9619,
|
||||||
|
0.9407,
|
||||||
|
0.9279,
|
||||||
|
0.9075,
|
||||||
|
0.9043,
|
||||||
|
0.8954,
|
||||||
|
0.8959,
|
||||||
|
0.8942,
|
||||||
|
0.8794,
|
||||||
|
0.8649,
|
||||||
|
0.8808,
|
||||||
|
0.877,
|
||||||
|
0.8809,
|
||||||
|
0.888,
|
||||||
|
0.8767,
|
||||||
|
0.8731,
|
||||||
|
0.8677,
|
||||||
|
0.8486,
|
||||||
|
0.8409,
|
||||||
|
0.8224,
|
||||||
|
0.8212,
|
||||||
|
0.8199,
|
||||||
|
0.8018,
|
||||||
|
0.7948,
|
||||||
|
0.7862,
|
||||||
|
0.8161,
|
||||||
|
0.8118,
|
||||||
|
0.8427,
|
||||||
|
0.8395,
|
||||||
|
0.8285,
|
||||||
|
0.8103,
|
||||||
|
0.7925,
|
||||||
|
0.7751,
|
||||||
|
0.7686,
|
||||||
|
0.7846,
|
||||||
|
0.7875,
|
||||||
|
0.788,
|
||||||
|
0.775,
|
||||||
|
0.7801,
|
||||||
|
0.7819,
|
||||||
|
0.7863,
|
||||||
|
0.769,
|
||||||
|
0.7671,
|
||||||
|
0.7707,
|
||||||
|
0.7724,
|
||||||
|
0.7808,
|
||||||
|
0.7774,
|
||||||
|
0.7734,
|
||||||
|
0.7686,
|
||||||
|
0.765,
|
||||||
|
0.7529,
|
||||||
|
0.7443,
|
||||||
|
0.7356,
|
||||||
|
0.7304,
|
||||||
|
0.7183,
|
||||||
|
0.7254,
|
||||||
|
0.7164,
|
||||||
|
0.7007,
|
||||||
|
0.7096,
|
||||||
|
0.7026,
|
||||||
|
0.691,
|
||||||
|
0.6837,
|
||||||
|
0.6686,
|
||||||
|
0.6765,
|
||||||
|
0.6695,
|
||||||
|
0.6704,
|
||||||
|
0.6776,
|
||||||
|
0.6684,
|
||||||
|
0.6589,
|
||||||
|
0.6523,
|
||||||
|
0.6463,
|
||||||
|
0.6457,
|
||||||
|
0.6599,
|
||||||
|
0.6584,
|
||||||
|
0.6509,
|
||||||
|
0.649,
|
||||||
|
0.6432,
|
||||||
|
0.6291,
|
||||||
|
0.6317,
|
||||||
|
0.6497,
|
||||||
|
0.6386,
|
||||||
|
0.6364,
|
||||||
|
0.6335,
|
||||||
|
0.63,
|
||||||
|
0.6196,
|
||||||
|
0.6176,
|
||||||
|
0.6166,
|
||||||
|
0.6159,
|
||||||
|
0.6182,
|
||||||
|
0.6115,
|
||||||
|
0.6156,
|
||||||
|
0.6159,
|
||||||
|
0.614,
|
||||||
|
0.6075,
|
||||||
|
0.6008,
|
||||||
|
0.6058,
|
||||||
|
0.6076,
|
||||||
|
0.6055,
|
||||||
|
0.6006,
|
||||||
|
0.599,
|
||||||
|
0.5892,
|
||||||
|
0.5952,
|
||||||
|
0.5943
|
||||||
|
],
|
||||||
|
"per_window_sharpe": [
|
||||||
|
-2.714,
|
||||||
|
-0.921,
|
||||||
|
-0.39,
|
||||||
|
-1.089,
|
||||||
|
-1.966
|
||||||
|
]
|
||||||
|
}
|
||||||
120
results/results_iter_2.json
Normal file
120
results/results_iter_2.json
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"sharpe_ratio": -0.546,
|
||||||
|
"total_return_pct": -18.32,
|
||||||
|
"max_drawdown_pct": -20.98,
|
||||||
|
"win_rate": 0.34,
|
||||||
|
"trade_count": 53,
|
||||||
|
"profit_factor": 0.542,
|
||||||
|
"avg_trade_duration_candles": 2.3,
|
||||||
|
"feature_importances": {
|
||||||
|
"EMA_20": 0.0295,
|
||||||
|
"EMA_5": 0.0274,
|
||||||
|
"OBV": 0.0252,
|
||||||
|
"price_vs_SMA_50": 0.0219,
|
||||||
|
"EMA_10": 0.0214,
|
||||||
|
"SMA_200": 0.0207,
|
||||||
|
"return_lag_5": 0.0191,
|
||||||
|
"SMA_5": 0.0189,
|
||||||
|
"vwap_approx": 0.0187,
|
||||||
|
"price_vs_SMA_200": 0.0186,
|
||||||
|
"BB_lower": 0.0181,
|
||||||
|
"SMA_20": 0.0175,
|
||||||
|
"ATR_pct": 0.0174,
|
||||||
|
"keltner_upper": 0.0172,
|
||||||
|
"volume_sma_20": 0.017,
|
||||||
|
"ATR_14": 0.0169,
|
||||||
|
"return_5": 0.0167,
|
||||||
|
"BB_upper": 0.0166,
|
||||||
|
"SMA_50": 0.0164,
|
||||||
|
"RSI_21": 0.0163,
|
||||||
|
"high_low_range_10": 0.0163,
|
||||||
|
"hist_volatility": 0.0163,
|
||||||
|
"high_low_range_20": 0.0163,
|
||||||
|
"EMA_50": 0.0162,
|
||||||
|
"keltner_lower": 0.016,
|
||||||
|
"MACD_hist": 0.0159,
|
||||||
|
"RSI_14_lag_1": 0.0152,
|
||||||
|
"CCI_20": 0.015,
|
||||||
|
"high_low_range_5": 0.015,
|
||||||
|
"volatility_20": 0.0149
|
||||||
|
},
|
||||||
|
"monthly_returns": [
|
||||||
|
-2.62,
|
||||||
|
-1.95,
|
||||||
|
-4.71,
|
||||||
|
1.32,
|
||||||
|
-2.8,
|
||||||
|
1.53,
|
||||||
|
-1.85,
|
||||||
|
-4.51,
|
||||||
|
-2.54,
|
||||||
|
-3.73,
|
||||||
|
0.01,
|
||||||
|
-1.05,
|
||||||
|
2.97,
|
||||||
|
0.31
|
||||||
|
],
|
||||||
|
"equity_curve": [
|
||||||
|
1.0,
|
||||||
|
0.9952,
|
||||||
|
0.9921,
|
||||||
|
0.9767,
|
||||||
|
0.974,
|
||||||
|
0.9579,
|
||||||
|
0.9754,
|
||||||
|
0.954,
|
||||||
|
0.9546,
|
||||||
|
0.9336,
|
||||||
|
0.9323,
|
||||||
|
0.9308,
|
||||||
|
0.9103,
|
||||||
|
0.9023,
|
||||||
|
0.8926,
|
||||||
|
0.9265,
|
||||||
|
0.9217,
|
||||||
|
0.9567,
|
||||||
|
0.9357,
|
||||||
|
0.9151,
|
||||||
|
0.8949,
|
||||||
|
0.8857,
|
||||||
|
0.8992,
|
||||||
|
0.9025,
|
||||||
|
0.9085,
|
||||||
|
0.9106,
|
||||||
|
0.9157,
|
||||||
|
0.8956,
|
||||||
|
0.8916,
|
||||||
|
0.8842,
|
||||||
|
0.8766,
|
||||||
|
0.8663,
|
||||||
|
0.852,
|
||||||
|
0.8467,
|
||||||
|
0.828,
|
||||||
|
0.8386,
|
||||||
|
0.8304,
|
||||||
|
0.8167,
|
||||||
|
0.808,
|
||||||
|
0.7902,
|
||||||
|
0.7995,
|
||||||
|
0.7912,
|
||||||
|
0.7984,
|
||||||
|
0.8069,
|
||||||
|
0.7995,
|
||||||
|
0.8115,
|
||||||
|
0.8109,
|
||||||
|
0.8086,
|
||||||
|
0.7908,
|
||||||
|
0.7941,
|
||||||
|
0.8167,
|
||||||
|
0.8076,
|
||||||
|
0.8143,
|
||||||
|
0.8168
|
||||||
|
],
|
||||||
|
"per_window_sharpe": [
|
||||||
|
-2.302,
|
||||||
|
-0.762,
|
||||||
|
-6.981,
|
||||||
|
-0.909,
|
||||||
|
4.91
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user