model-train-infer-backtest-report

Trains quantitative models, runs batch inference, backtests portfolios, and generates PDF research reports.

1.5k|337|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/qusong0627/QuantMind --skill model-train-infer-backtest-report-qusong0627
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-train-infer-backtest-report
Source: https://github.com/qusong0627/QuantMind/tree/main/skills/model-train-infer-backtest-report
Command: npx skills add https://github.com/qusong0627/QuantMind --skill model-train-infer-backtest-report-qusong0627

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, duckdb, psycopg2, numpy, sqlalchemy, and includes scripts (resource) components.

What problem does it solve? Validating whether a parameter change (holding period, score threshold, risk control) actually improves a quantitative trading strategy requires a full train-infer-backtest-report loop; this Skill automates that entire closed loop on the QuantMind platform so decisions are driven by data instead of guesswork. ## Core Features & Use Cases - Model Training: Submit T+N cycle training jobs for 13 model types (lightgbm, xgboost, catboost, random_forest, linear, mlp, gru, lstm, alstm, transformer, tabnet, tcn, nativetft) with GPU training and quality gates (Rank IC/ICIR). - Batch Inference: Run range-mode batch inference across a full year of trading days, writing daily scores to the signal database. - Portfolio Backtesting: Execute optimized backtests with score thresholds, market-index MA filtering, 5% stop-loss, slippage, T+1, and ST-stock exclusion. - Report Generation: Produce research-grade Markdown reports and convert them to styled PDFs. - Use Case: Compare a T+3 model against an existing T+5 model by cloning the training payload, changing only the horizon, running full-year inference and identical backtests, then exporting a comparison report. ## Quick Start Train a T+3 CatBoost model cloned from my existing T+5 job, run full-year batch inference, backtest it with the optimized strategy, and generate a PDF report comparing the two periods.

Frequently Asked Questions about model-train-infer-backtest-report

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a T+3 model from an existing T+5 training job?

Clone the existing job's request_payload from the admin_training_jobs table, change only target_horizon_days to 3, and resubmit via the run-training API. The included submit_t3_training.py script automates this so features and date ranges stay identical.

What model types are supported for quantitative training?

Thirteen types are supported end to end: lightgbm, xgboost, catboost, random_forest, linear, mlp, gru, lstm, alstm, transformer, tabnet, tcn, and nativetft. Tree models use boosting parameters while deep learning models train on GPU with configurable epochs and batch size.

How do I run batch inference for a full year of trading days?

Call the batch inference API with mode set to range, providing model_id, start_date, end_date, and top_k. Poll the batch status endpoint until completion; scores are written to the engine_signal_scores table and reuse_existing enables resumable runs.

Why is my trained model not visible in the model management page?

The main model management view filters qm_user_models by the logged-in user's ID, which comes from the JWT sub claim. If the model's user_id differs from your account, update the row to transfer ownership; always obtain tokens via the login API rather than crafting them manually.

Why does my backtest show no buy orders?

The optimized strategy only buys when the model score is at least 0.015, so low-scoring models naturally stay in cash. Verify the MODEL_ID is correct and check the score distribution before adjusting the threshold.

What does model status candidate mean after training?

Candidate status means the model failed the quality gate, such as test_rank_icir below 0.05 or non-positive Rank IC. It is a normal product outcome, not a failure, and the model can still be used for inference and backtesting.