MDF now places 3 levels of resting bids and asks per symbol each cycle,
ensuring order books always have liquidity. CH AI trader falls back to
securities.txt reference prices when books are empty. CH daily obligation
raised to 20.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update notebook to push full merged model; restore stockex-ch-trader as default
- Notebook: merge LoRA adapter into base model on CPU and push complete
weights so stockex-ch-trader works via HF Inference Router API
- CH AI Trader: revert default HF_MODEL to RayMelius/stockex-ch-trader
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove ch_trader_finetune.ipynb, keep only stockex-clearing-house-llm-fine-tuning.ipynb
- Skip merge_and_unload which causes peft/accelerate TypeError on T4
- Push LoRA adapter + tokenizer directly via HfApi.upload_folder
- Update inference test to load adapter with PeftModel.from_pretrained
- Remove redundant push cell
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix training cell hanging: remove load_best_model_at_end
- Removed load_best_model_at_end=True which caused the trainer to hang
trying to reload the best checkpoint after training (OOM on T4)
- Save adapter immediately after training completes in the same cell
- Removed redundant save_pretrained from the merge cell
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Dashboard: remove direct SSE broadcast from _generate_and_broadcast(),
let Kafka consumer handle it (was causing every insight to appear twice)
- CH trade consumer: match matcher's field names (buy_id/sell_id) instead
of buy_order_id/sell_order_id, so trades are actually attributed to members
- Notebook: support both Kaggle (dataset) and Colab (Drive) checkpoints,
set SAVE_STEPS=10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update fine-tune notebook securities to real StockEx symbols
Replace hardcoded OPAP/MYTIL/ADMIE/etc. with actual StockEx securities
(ALPHA, PEIR, EXAE, QUEST, NBG, EUROB, AEG, INTKA, AAAK, ATTIK) and
current market prices for Colab training dataset generation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Mounts Google Drive; checkpoints saved to MyDrive/stockex-ch-checkpoints
- Auto-detects latest checkpoint and resumes with resume_from_checkpoint
- CheckpointSyncCallback: on every save → copies to Drive + pushes adapter to HF Hub
- save_total_limit=3 to keep local disk usage bounded
- Falls back gracefully if Drive not available
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix SFTConfig: move max_seq_length to tokenizer.model_max_length
- notebooks/ch_trader_finetune.ipynb: QLoRA fine-tunes Qwen2.5-7B-Instruct
on 2500 synthetic clearing house trading scenarios (Colab A100-ready)
- Generates diverse examples: varied capital, holdings, obligation levels
- Trains with SFTTrainer + chat template formatting, merges and pushes
the model to RayMelius/stockex-ch-trader on HuggingFace Hub
- ch_ai_trader.py + docker-compose: default HF_MODEL updated to
RayMelius/stockex-ch-trader (override via HF_MODEL env var)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>