Uh oh!
There was an error while loading. Please reload this page.
release-0.5.0 - #1
Conversation
| ==================== | ||
| Users can get stock data by Qlib, the following are some examples. | ||
| Users can get stock data by ``Qlib``. Following examples will demonstrate the basic user interface. |
There was a problem hiding this comment.
We will only provide csi300 and all stock pool in our demo. Please change this tutorial
| feature_label_config: /data/qlib/feature_config/feature_config.yaml | ||
| The class `SomeDataHandler` should be in the module `custom_data_handler`, and Qlib could parse the `module_path` to load the class. | ||
| The class `SomeDataHandler` should be in the module `custom_data_handler`, and ``Qlib`` could parse the `module_path` to load the class. |
There was a problem hiding this comment.
Did you test feature_label_config ?
There was a problem hiding this comment.
deletefeature_label_config
| User can specify `trainer` through the configuration file: | ||
| Users can specify `trainer` through the configuration file: |
| To Know more about ``Data Handler``, please refer to `Data Framework&Usage <data.html>`_. | ||
| About training | ||
| Trainer Field |
There was a problem hiding this comment.
Trainer section maybe better for such title
| --------------- | ||
| Users can use APIs in ``qlib.data`` to retrieve data, please refer to `Data Retrieval <../start/getdata.html>`_. | ||
| Filter |
There was a problem hiding this comment.
Put the Filter behind feature.Feature is Much more important
| Cache | ||
| ========== | ||
| Local Cache |
There was a problem hiding this comment.
spli the memory cache and disk cache into two sub-sections in Cache section
There was a problem hiding this comment.
How to split the Cache? what's the disk cache?
| backtest: | ||
| normal_backtest_args: | ||
| verbose: False | ||
| limit_threshold: 0.095 |
There was a problem hiding this comment.
Pengrong Zhu (@zhupr)
Please add limit_threshold=0.0095 as the default option in China Stock market setting
| To know more about backtesting with specific strategy, please refer to `Strategy <strategy.html>`_. | ||
| Score File |
There was a problem hiding this comment.
Please rename all the content like Score XXX which indicates the predction of model to Prediction.
Such consistant name will help user understand the doc
| sub_cost mean 0.000718 | ||
| std 0.004694 | ||
| annual 0.181003 | ||
| ir 2.428964 |
There was a problem hiding this comment.
bxdd (@bxdd) Only the docs are changed. The code is not changed
There was a problem hiding this comment.
Pengrong Zhu (@zhupr) It seems to have been fixed by Pengrong
| mdd -0.072977 | ||
| - `sub_bench` | ||
| Income without deduction of fees |
There was a problem hiding this comment.
Income -> returns of the portfolio
| Interday Model: Model Training & Prediction <component/model.rst> | ||
| Interday Strategy: Portfolio Management <component/strategy.rst> | ||
| Intraday Trading: Model&Strategy Testing <component/backtest.rst> | ||
| Aanalysis: Evaluation & Results Analysis <component/report.rst> |
There was a problem hiding this comment.
The content in report.rst is too simple.
There are no docs about the graph output by the functions
It's better to put all the graphs in the docs and exaplain then one by one
bxdd (@bxdd)Pengrong Zhu (@zhupr)
216f2ca to
e01553fCompareUpdate README.md
qlib auto init basedon project & black format
Fix test_start setting in `Benchmark.basic_task()`
CRITICAL FIXmicrosoft#1: Portfolio Chinese Stocks → ASX Stocks ❌ BEFORE: Chinese stocks (000001.SZ, 600036.SH, Kweichow Moutai) ✅ AFTER: ASX stocks (CBA.AX, BHP.AX, CSL.AX, WBC.AX, RIO.AX) ✅ Portfolio: 8 major ASX holdings worth A72K total ✅ Sectors: Financials 45.9%, Materials 25.8%, Healthcare 8.3% CRITICAL FIXmicrosoft#2: Email Authentication Features ✅ /api/auth/send-verification - 6-digit email codes ✅ /api/auth/verify-email - Email verification process ✅ /api/auth/forgot-password - Password reset links ✅ /api/auth/reset-password - Secure password updates ✅ Development mode with fallback codes ✅ Production-ready with SMTP integration SECURITY IMPROVEMENTS: - Secure token generation (secrets.token_urlsafe) - Rate limiting (max 3 verification attempts) - Expiration times (10min verification, 1hr reset) - No email enumeration (security best practice) Portfolio now shows Australian companies only. Authentication now production-ready for launch. 🎉 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
* init commit * change the version number * rich the docs&fix cache docs * update index readme * Modify cache class name * Modify sharpe to information_ratio * Modify Group- to Group * add the description of graphical results & fix the backtest docs * fix docs in details * update docs * Update introduction.rst * Update README.md * Update introduction.rst * Update introduction.rst * Update introduction.rst * Update installation.rst * Update installation.rst * Update initialization.rst * Update getdata.rst * Update integration.rst * Update initialization.rst * Update getdata.rst * Update estimator.rst Modify some typos. * Update README.md Modify the typos. * Update initialization.rst * Update data.rst * Update report.rst * Update estimator.rst * Update cumulative_return.py * Update model.rst * Update rank_label.py * Update cumulative_return.py * Update strategy.rst * Update getdata.rst * Update backtest.rst * Update integration.rst * Update getdata.rst * Update introduction.rst * Update introduction.rst * Update README.md * Update report.rst * Update integration.rst Fix typos * Update installation.rst Fix typos * Update getdata.rst * Update initialization.rst Fix typos. * add quick start docs&fix detials * fix estimator docs & fix strategy docs * fix the cahce in data.rst * update documents * Fix Corr && Rsquare * fix data retrival example to csi300 & fix a data bug * fix filter bug * Fix data collector * Modift model args * add the log & fix README.md\quick.rst * add enviroment depend & add intoduction of qlib-server online mode * fix image center fomat & set log_only of docs is True * fix README.md format * update data preparation & readme logo image * get_data support version * Modify analysis names * Modify analysis graph * update report.rst & data.rst * commmit estimator for merge * minimal requirements * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update READEME.md * Update READEME.md * update estimator * Fix doc urls * fix get_data.py docstring * update test_get_data.py * Upate docs * Upate docs * Upate docs Co-authored-by: bxdd <bxddream@gmail.com> Co-authored-by: zhupr <zhu.pengrong@foxmail.com> Co-authored-by: Wendi Li <wendili.academic@qq.com> Co-authored-by: Dingsu Wang <dingsu.wang@gmail.com> Co-authored-by: bxdd <45119470+bxdd@users.noreply.github.com> Co-authored-by: cslwqxx <cslwqxx@users.noreply.github.com>
qlib auto init basedon project & black format
在 CLAUDE.md 新增"已知问题与修复记录"章节,详细记录: Bug microsoft#1: iQuant 实盘下单失败 - passorder 返回 0 - 问题描述:passorder 返回 0,订单未进入系统,无错误提示 - 根本原因:缺少 is_last_bar() 检查,在历史回放阶段执行下单 - 修复方案:添加 is_last_bar() 检查,移除 set_account() 调用 - 经验教训:iQuant 策略生命周期、passorder 返回值含义、调试要点 包含完整的问题诊断过程、对比分析、修复代码示例和验证结果。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Reads the trained LightGBM's gain importance + TreeSHAP (lightgbm pred_contrib, no external shap lib) — the correct attribution that captures nonlinear/interaction use univariate IC misses. Our 6 custom factors = 19.5% of total SHAP vs 3.7% fair share (~5.3x). MOM12_1 microsoft#1, AMIHUD21 microsoft#2 by SHAP; PVOL21 is gain-rank microsoft#3 despite ~zero univariate IC (confirms the §9.7 lesson); only LOTTERY21 ranks bottom by both methods. Fork: gain/SHAP 是树模型正确的因子归因法,单因子 IC 会误判(见 §9.7/§9.8)
…ulk pulls The 429 path was an unbounded `while: continue` (hangs forever if persistently rate-limited) and 5xx/timeout hit raise_for_status() with no retry. Since upstream BaseCollector runs get_data under joblib.Parallel with no per-symbol try/except, one flaky response would hang or crash an entire S&P500 / minute-level pull. Add _fetch() with bounded retry (MAX_RETRIES=6, backoff) on 429/5xx/network errors; on final failure get_data skips the symbol instead of crashing the batch. Also cache the API key once instead of re-reading .env per pagination page. Fork: 自研 collector 鲁棒性修复(评估 §鲁棒性 microsoft#1),美股是主战场,批量拉取不能被单点请求拖死
…ruments + new tasks - Fixmicrosoft#1+microsoft#2: scheduler job now spawns rolling_train as a subprocess so the FastAPI event loop is never blocked by the 1.5-4h ML training. Adds AlreadyRunning guard + in-flight asyncio.Lock to prevent overlap. - Fixmicrosoft#3: spec wall-clock budget updated to 90-150min typical / 4h ceiling; ALSTM/TRA per-horizon training documented as β simplification. - Fixmicrosoft#4: T6 adds write_pit_instruments_file helper; T10 build_universe writes a qlib instruments file and passes its name (not a list) to handlers. - Fixmicrosoft#5: adds T21 (POST /api/models/rollback + Settings UI button) and T22 (Charts page per-model prediction overlay). - Renumbers acceptance script from T21 → T23. Plan now has 23 tasks / 148 steps / 23 commits. - Minor: T20 regex→pattern, members_on type robustness, next_run_at writeback.
- Run honest_baseline_daily.json: daily/k=30 → net_ir=-0.431, turnover=0.320, net_cagr=-14.1% (cost drag 36.9%/yr kills the gross +24.2% signal at ¥100k small account) - Sweep 120 configs; best at ¥100k: fixed/k=10/period=5 → net_ir=+0.902, net_cagr=+27.0% - improved_banded.json (fixed/10/5): net_ir=+0.902, turnover=0.161 (-49.7% vs baseline) - improved_banded_neutralized.json: neutralization hurt on this 12-week window (net_ir=-0.581) - P1 acceptance: microsoft#1 net_ir↑ PASS; microsoft#2 turnover ≤50% NARROWLY FAIL (50.3%) - Fix data.py: add sys.path purelib fixup + Path() wrap for load_config (same pattern as rolling_train.py) - All 29 backtest tests still green
… clear verified markers Stage-2 verification found the docs presented `qlib.init(expression_cache=None)` as equivalent to deleting `features_cache/`. It is bypass-only: `data.py:1320` gates `DiskExpressionCache` instantiation, so there is no read/write/delete of stale `.bin` this session, and stale bins resurface on re-enable (`cache.py:518` matches old `.meta`, no impl hash). Corrected across CLAUDE.md redline microsoft#1, the qlib-data-ops + factor-research skills, the factor-reviewer agent, and FORK_SURFACE.md §1.5/§1.6. Also cleared the [未验证] markers (deal_price fallback, trade_w_adj_price, rtn/earning/return_rate, data.py cast) verified against source this round. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two stage-2 loose ends closed: 1. dataset_cache=None verified firsthand (not inferred): DiskDatasetCache (cache.py:647) _uri@656, _dataset@696, gen_dataset_cache@857. Same bypass-only mechanism as expression cache — data.py:1326 gates instantiation; clear_cache (314) is called only at gen_dataset_cache:904 (cache-enabled miss branch), never when disabled. So qlib.init( dataset_cache=None) and per-call disk_cache=0 (cache.py:699-703) bypass this session but do NOT delete stale bins (resurface on re-enable at cache.py:725). Redline microsoft#1 extended to cover BOTH cache dirs. Scope correction: dataset cache stores pre-processor D.features output (loader.py:223); processors run in-memory post-fetch (handler.py:194->519), so processor changes do NOT stale the dataset cache — operator _load_internal changes stale BOTH caches. 2. Verification markers reconciled. Stage-2's "grep -c [未验证-上轮] = 0" was scoped to FORK_SURFACE only and missed the ",子agent核中" variant and all other live docs — a self-contradiction that devalued [已核实]. All 10 live-doc [未验证*] claim markers verified firsthand and cleared: ARCHITECTURE:63/163, BACKTEST:146/148, DATA_SPEC:105/114/183, FORK_SURFACE:58/86/142. Legend (FORK_SURFACE:4) extended to define every variant ([已自核]/[已自核-上轮]/[已核实-子agent]/[未验证*]/[已推翻]). mode=product registered in BACKTEST_SPEC §1.2 (formula re-verified against evaluate.py:70-80; unused — §2.1 grep 0 callers). Final live-doc marker state: 0 [未验证*] claim markers. The 256 [未核实] and [存疑]/[已推翻] counts reside in the deprecated 勿读 _RESEARCH_NOTES.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… factor-research skill fixes - DATA_SPEC §7.1: chinditc data is backward-adjusted (close[0]=1.0 IPO-anchored, adjclose[0]=real IPO price, factor never 1.0 at endpoints); $close/$factor=nominal (halves on 10送10); $volume=raw/factor (turnover conserved). Empirically verified on 6118 symbols. - FORK_SURFACE §1.7: 5-phase stale-cache reproduction for BOTH expression + dataset caches (V1=-1.2040842772 served stale under SCALE=2 cache-on; bypass!=clear proven by ds_files/bin persistence; rm restores). New findings: client-mode defaults cache OFF; DiskExpressionCache needs redis (silently disabled if down, config.py:478); DiskDatasetCache needs pytables. - CLAUDE.md redline microsoft#1: append conditional prereqs (explicit enable+redis+pytables); redline microsoft#5: append backward-adjusted finding + absolute-level-factor assumption rule. - factor-research SKILL.md: fix min_periods=1 inaccuracy (pandas default=window, qlib pre-extends window so 0 boundary NaN in range); note client-mode cache OFF + redis; Windows D.features multiprocessing hang -> kernels=1; lightweight calc_ic direct call. - .claude/ops/: RollingZScore operator + stale-driver scripts (re-runnable experiment). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rse-engineering sample microsoft#1 Point-in-time metrics via the bot's own reasons engine, pick-type classification (deep-drawdown rebound entry, volume-absent), and the reproduction recipe. First specimen for the cafe-recommender pattern study; more stocks accumulate here as the dated list arrives. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>




typo