Price-only credit spread profitability predictor for NIFTY options.
1python -m deploy.build_model_store # pulls @production versions from MLflow registry
2cd hf_inference && python test_handler.py # local smoke test
1{
2 "inputs": [
3 {"date": "2025-06-30 09:15:00", "close": 24150.5},
4 {"date": "2025-06-30 09:18:00", "close": 24148.2}
5 ],
6 "parameters": {"context_length": 60}
7}
Minimum 60 rows (3-min candles), sorted ascending by date.
1{
2 "context_window_start": "2025-06-30 09:15:00",
3 "context_window_end": "2025-06-30 12:12:00",
4 "embedding_dim": 768,
5 "bull_probability": 0.39,
6 "bear_probability": 0.63,
7 "bull_probability_w200": 0.41,
8 "bear_probability_w200": 0.65,
9 "predictions": {
10 "bull_put_credit": { "model_key": "bull_put_credit", "target_column": "bull_put_credit_label", "prob_label_1": 0.39, "threshold": 0.633, "y_pred_bin": 0, "y_pred_label": -1 },
11 "bear_call_credit": { "model_key": "bear_call_credit", "target_column": "bear_call_credit_label", "prob_label_1": 0.63, "threshold": 0.627, "y_pred_bin": 1, "y_pred_label": 1 },
12 "bull_put_credit_w200": { "model_key": "bull_put_credit_w200", "target_column": "bull_put_credit_label", "prob_label_1": 0.41, "threshold": 0.656, "y_pred_bin": 0, "y_pred_label": -1 },
13 "bear_call_credit_w200": { "model_key": "bear_call_credit_w200", "target_column": "bear_call_credit_label", "prob_label_1": 0.65, "threshold": 0.648, "y_pred_bin": 1, "y_pred_label": 1 }
14 }
15}
Current build thresholds: w100 bear_call 0.6268, bull_put 0.6326; w200
bear_call 0.6482, bull_put 0.6564 (see deployment_manifest.json).