diff --git a/.env b/.env index 9abb4ae..2f7e309 100644 --- a/.env +++ b/.env @@ -63,7 +63,7 @@ TIME_SERIES_MIN_CANDLES=120 TIME_SERIES_FORECAST_HORIZON=3 TIME_SERIES_MIN_EDGE_PERCENT=0.10 TIME_SERIES_MIN_PROBABILITY_UP=0.52 -TIME_SERIES_MIN_CONFIDENCE=0.72 +TIME_SERIES_MIN_CONFIDENCE=0.4 TIME_SERIES_MAX_ADJUSTMENT=0.08 TIME_SERIES_LSTM_ENABLED=true TIME_SERIES_LSTM_MODEL_PATH=runtime/lstm_forecaster.json diff --git a/.env.example b/.env.example index f8b8df0..8355f41 100644 --- a/.env.example +++ b/.env.example @@ -63,7 +63,7 @@ TIME_SERIES_MIN_CANDLES=120 TIME_SERIES_FORECAST_HORIZON=3 TIME_SERIES_MIN_EDGE_PERCENT=0.08 TIME_SERIES_MIN_PROBABILITY_UP=0.58 -TIME_SERIES_MIN_CONFIDENCE=0.72 +TIME_SERIES_MIN_CONFIDENCE=0.4 TIME_SERIES_MAX_ADJUSTMENT=0.08 TIME_SERIES_LSTM_ENABLED=true TIME_SERIES_LSTM_MODEL_PATH=runtime/lstm_forecaster.json diff --git a/README.md b/README.md index 33d9582..a537717 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ TIME_SERIES_MIN_CANDLES=120 TIME_SERIES_FORECAST_HORIZON=3 TIME_SERIES_MIN_EDGE_PERCENT=0.08 TIME_SERIES_MIN_PROBABILITY_UP=0.58 -TIME_SERIES_MIN_CONFIDENCE=0.72 +TIME_SERIES_MIN_CONFIDENCE=0.4 TIME_SERIES_MAX_ADJUSTMENT=0.08 TIME_SERIES_LSTM_ENABLED=true TIME_SERIES_LSTM_MODEL_PATH=runtime/lstm_forecaster.json diff --git a/crypto_spot_bot/config.py b/crypto_spot_bot/config.py index 695524f..a08894d 100644 --- a/crypto_spot_bot/config.py +++ b/crypto_spot_bot/config.py @@ -262,7 +262,7 @@ def load_settings(env_file: str | Path | None = None) -> Settings: time_series_forecast_horizon=_int_env("TIME_SERIES_FORECAST_HORIZON", 3), time_series_min_edge_percent=_float_env("TIME_SERIES_MIN_EDGE_PERCENT", 0.08), time_series_min_probability_up=_float_env("TIME_SERIES_MIN_PROBABILITY_UP", 0.58), - time_series_min_confidence=_float_env("TIME_SERIES_MIN_CONFIDENCE", 0.72), + time_series_min_confidence=_float_env("TIME_SERIES_MIN_CONFIDENCE", 0.4), time_series_max_adjustment=_float_env("TIME_SERIES_MAX_ADJUSTMENT", 0.08), time_series_lstm_enabled=_bool_env("TIME_SERIES_LSTM_ENABLED", True), time_series_lstm_model_path=Path(os.getenv("TIME_SERIES_LSTM_MODEL_PATH", "runtime/lstm_forecaster.json")), diff --git a/crypto_spot_bot/dashboard.py b/crypto_spot_bot/dashboard.py index 79a76ec..421d225 100644 --- a/crypto_spot_bot/dashboard.py +++ b/crypto_spot_bot/dashboard.py @@ -698,6 +698,8 @@ HTML = r""" const forecast = market.forecast || {}; const quality = market.quality || {}; const signal = latestSignals[symbol] || {}; + const minEdge = state.data.config?.time_series_min_edge_percent ?? 0; + const minConfidence = state.data.config?.time_series_min_confidence ?? 0; const diagnostics = parseDiagnostics(signal); const failed = Object.entries(diagnostics.checks || {}).filter(([, ok]) => !ok).map(([key]) => key); return panel( @@ -712,8 +714,9 @@ HTML = r""" ])} ${kvTable([ ['Model', modelName(forecast.model)], - ['Expected', signed(forecast.expected_return_percent, 4) + '%'], + ['Edge', `${signed(forecast.expected_return_percent, 4)}% / min ${num(minEdge, 3)}%`], ['P(up)', num((forecast.probability_up || 0) * 100, 2) + '%'], + ['Confidence', `${num(signal.confidence, 4)} / min ${num(minConfidence, 2)}`], ['Q10/Q50/Q90', `${signed(forecast.quantile_10_percent, 2)} / ${signed(forecast.quantile_50_percent, 2)} / ${signed(forecast.quantile_90_percent, 2)}`], ['Blocked', forecast.block_entry ? 'yes' : 'no'] ])} diff --git a/tests/conftest.py b/tests/conftest.py index 38a699a..300a356 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -79,7 +79,7 @@ def make_settings(): time_series_forecast_horizon=3, time_series_min_edge_percent=0.08, time_series_min_probability_up=0.58, - time_series_min_confidence=0.72, + time_series_min_confidence=0.4, time_series_max_adjustment=0.08, time_series_lstm_enabled=True, time_series_lstm_model_path=tmp_path / "lstm_forecaster.json",