1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00
Commit Graph

2060 Commits

Author SHA1 Message Date
Linlang
2fb9380b34 fix(backtest): avoid calendar overflow when end_time is missing (#2127)
* fix(backtest): avoid calendar overflow when end_time is missing

* fix: pkg_source not found error when build docs
2026-02-12 21:07:15 +08:00
Linlang
8fd6d5ca7e fix: the bug that the US STMBOLS URL is faild (#1975)
* fix the bug that the US STMBOLS URL is faild

* recover code

* fix package dependence error

* fix package dependence error

* fix package dependence error

* fix package dependence error

* fix package dependence error

* format with black

* disable pylint error
2026-02-04 17:37:47 +08:00
feedseawave
69bb755f37 refactor: implement deterministic budget allocation in SoftTopkStrategy (#2077)
* refactor: implement deterministic budget allocation in SoftTopkStrategy

* style: fix formatting issues using black

* fix: remove unused imports and pass pylint

* refactor: simplify SoftTopkStrategy impact limit

* style: relocate test files per maintainer request
2026-02-03 16:52:59 +08:00
Linlang
39634b2158 fix(security): address reported unsafe pickle.load usages (#2099) 2026-01-28 22:19:43 +08:00
Ronald
16acb76aba fix: ignore a generated file when install from source (#2091)
Co-authored-by: abc <a@b.com>
2026-01-22 16:55:26 +08:00
Linlang
4e0f5d5ec9 fix: use semantic version comparison for PyTorch scheduler compatibility (#2094) 2026-01-21 15:09:34 +08:00
Linlang
50c32ac15f refactor(data_collector): use akshare to build unified trade calendar (#2093)
* refactor(data_collector): use akshare to build unified trade calendar

* fix: github action failure caused by black upgrade
2026-01-20 22:52:57 +08:00
Linlang
80982f8904 feat: check lowercase naming for qlib features directories (#2087)
* feat: check lowercase naming for qlib features directories

* docs: add background reference for lowercase features dir check
2026-01-19 10:15:51 +08:00
Linlang
477160e4ac fix(security): restrict pickle deserialization to safe classes (#2076) 2025-12-30 11:00:51 +08:00
Dred
3472e82d5c fix: handler_mod func don't work when dealing None end date (#2068)
* [fix] handler_mod func don't work when dealing None end date

* refactor: avoid deep access by extracting handler_kwargs and using get(end_time)

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-12-27 14:44:10 +08:00
Linlang
cb285bccac fix(client): fix missing dependencies and unsafe pickle usage (#2072)
* fix(client): fix missing dependencies and unsafe pickle usage

* ci: exclude client extra from default install to avoid macOS CI failures

* fix: CI error

* ci: install dependencies with --no-cache-dir to avoid disk space issues
2025-12-18 15:29:48 +08:00
kzhdev
2e9a00a9f7 fix(data_collector): fix us_index collector.py Http Error 403 Forbidden; Remove FutureWarning (#2047)
* Fix 403 Forbidden error; Remove FutureWarning:

* use fake_useragent

* Fix lint format error

* Add timeout to fix pylint error
2025-11-18 16:06:53 +08:00
Linlang
d631b4450b fix(filter): replace invalid with in SeriesDFilter (#2051) 2025-11-18 11:36:56 +08:00
Guan Hua
0826879481 Fix formatting in docstring for workflow function (#2055) 2025-11-17 20:42:31 +08:00
Linlang
2b41782f0c fix(gbdt): correct dtrain assignment in finetune() to use Dataset instead of tuple (#2049) 2025-11-13 11:50:43 +08:00
Ronny Pfannschmidt
ac3fe9476f chore(build): rely on integrated setuptools_scm instead of manual call (#2032)
* dont manually call setuptools_scm - its integrated

setuptools_scm automatically set the version attribute - manually setting it wrong

* fix(docs): set fallback version for setuptools-scm to fix autodoc import errors on Read the Docs

---------

Co-authored-by: SunsetWolf <Lv.Linlang@hotmail.com>
2025-11-10 18:25:04 +08:00
Linlang
66c36226aa fix(macd): remove extra division by close in DEA calculation to ensure dimension consistency (#2046) 2025-11-06 21:49:15 +08:00
shauryaMi12
bb7ab1cf14 docs: fix spelling mistake: exmaple to example (#2033)
Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-10-17 13:20:16 +08:00
shauryaMi12
3dc5a7d299 fix: typo in integration documentation: 'userd' -> 'used' (#2034)
* Fix typo in integration docs: 'userd' -> 'used'

* fix: pylint error in CI

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-10-16 11:07:55 +08:00
Kei YAMAZAKI
7d66e4b788 docs: update Docker run command in README.md to specify the correct image name (#2010) 2025-09-15 17:09:36 +08:00
Linlang
213eb6c2cd fix: the bug when auto_mount=True (#2009)
* fix: the bug when auto_mount=True

* fix: the bug when auto_mount=True
2025-09-11 20:05:17 +08:00
Linlang
94d138ec23 chore: align collect_info.py with pyproject.toml (#1997)
* chore: Align collect_info.py with pyproject.toml

* delete version info

* chore: align collect_info.py with pyproject.toml
2025-09-03 19:29:18 +08:00
Linlang
f26b341736 fix: spelling errors (#1996)
Co-authored-by: XYUU <xyuu@xyuu.net>
2025-09-01 16:11:41 +08:00
Linlang
136b2ddf9a fix: download orderbook data error (#1990) 2025-08-19 17:44:27 +08:00
Alaa Kaddour
7095e755fa fix: replace deprecated pandas fillna(method=) with ffill()/bfill() (#1987)
* fix: replace deprecated pandas fillna(method=) with ffill()/bfill()

  Replace deprecated fillna(method="ffill"/"bfill") calls with modern
  pandas ffill() and bfill() methods to fix FutureWarnings in pandas 2.x.

  Also includes black formatting fixes for compliance.

  This addresses the pandas deprecation warnings portion of issue #1981.
  Other issues (date parsing, type conversion, timezone handling) will be
  addressed in separate commits.

  Fixes:
  - Yahoo collector: 2 instances in calc_change() and adjusted_price()
  - BaoStock collector: 1 instance in calc_change()
  - Core utils: resam.py fillna operations
  - Backtest: profit_attribution.py stock data processing
  - High-freq ops: FFillNan and BFillNan operators
  - Position analysis: parse_position.py weight processing

  Partially addresses GitHub issue #1981

* lint with black

* lint with black

* limit minimum version of pandas

* limit minimum version of pandas

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-08-19 16:00:29 +08:00
Linlang
2d05a705e3 ci: auto release (#1985)
* ci: auto release

* fix: bug getting version in qlib/__init__.py

* fix: bug getting version in setup.py

* fix: bug getting version in qlib/__init__.py

* fix: make the code in CI more complete

* fix: specify the root directory in the get_verison method

* fix: parameter error

* update: optimize code && add comments
2025-08-18 17:28:00 +08:00
Linlang
da920b7f95 Update version v0.9.7 2025-08-15 16:50:57 +08:00
Linlang
d89fa0184c fix: upgrade the method of installing LightGBM on MacOS (#1980)
* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* fix: upgrade the method of installing LightGBM on MacOS

* add: comments

* test: build package && check package

* test: build package && check package

* test: build package && check package

* optimize yml
2025-08-15 15:57:55 +08:00
you-n-g
1b426503fc feat: data improve, support parquet (#1966)
* refactor: relocate CLI modules to qlib.cli and update references

* refactor: introduce read_as_df and rename csv_path to data_path

* lint

* refactor: rename csv_path to data_path and use QSettings.provider_uri

* fix pylint error

* fix get_data command

* add comments to CI yaml

* update docs

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-08-07 15:04:37 +08:00
you-n-g
78b77e302b feat: use pydantic-settings for MLflow config and update dependencies (#1962)
* feat: use pydantic-settings for MLflow config and update dependencies

* docs
2025-07-01 21:32:11 +08:00
Linlang
38f02d25dc disable pylint error (#1960)
* disable pylint error

* try fix build docs error

* try fix build docs error

* optimize code
2025-06-30 18:43:34 +08:00
you-n-g
de86e46ed0 refactor: introduce BaseDataHandler and unify fetch interface (#1958)
* refactor: introduce BaseDataHandler and unify fetch interface

* refactor: include data_key in seg_kwargs and simplify segments loop

* refactor: default data_key to BaseDataHandler.DK_I in _get_df_by_key

* style: fix indentation and remove extra blank lines in data handlers

* refactor: use BaseDataHandler.DK_I as default data_key

* docs: fix BaseDataHandler docstring grammar and formatting

* refactor: remove unused **kwargs from storage fetch methods

* docs: refine BaseDataHandler and DataHandler docstrings

* refactor: rename BaseDataHandler to DataHandlerABC, update type hints

* feat: add flt_col to TSDatasetH and list-to-slice conversion in storage

* lint

* comment
2025-06-29 15:50:59 +08:00
Emre
ba8b6cc30f fix: typo (#1943) 2025-05-29 15:18:12 +08:00
Linlang
3525514704 Fixing Security Vulnerabilities (#1941)
* Fixing Security Vulnerabilities

* Fixing Pylint Error

* Fixing Security Vulnerabilities windows

* format with black

* using returncode to locate problems

* fix pylint error
2025-05-28 20:43:58 +08:00
you-n-g
3e72593b8c Update README.md (#1940) 2025-05-27 21:32:22 +08:00
Linlang
c38e799ce7 Implement geometric accumulation mode for risk_analysis function (#964) (#1938)
Co-authored-by: eabjab <buege.ethan@gmail.com>
2025-05-27 14:24:16 +08:00
Di
14d54aa2a1 Add util function to help automatically get horizon (#1509)
* Add util function to help automatically get horizon

* Reformat for CI

* Leverage horizon change

* Udpate config yaml

* Update for formatting

* Adapt to pickled handler

* Fix CI error

* remove blank

* Fix lint

* Update tests

* Remove redundant check

* modify the code as suggested

* format code with pylint

* fix pytest error

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-05-26 22:08:43 +08:00
you-n-g
89ae312109 doc: update README.md (#1929)
* Update README.md

* Update README.md
2025-05-22 15:34:19 +08:00
ziphei
3ea30c0290 The plotly figure is empty in the code block "Basic data" (#1902)
* Update detailed_workflow.ipynb

the result figure is empty

* Update detailed_workflow.ipynb

fix issue: the plotly figure is empty

* The error message indicated that my code did not
comply with the code style guidelines.
Specifically, I had used double quotes "notebook"
for the string, whereas the required format was
single quotes 'notebook'.
This has now been corrected.

* comply with the code style guidelines.
Specifically, I had used double quotes "notebook"
for the string, whereas the required format was
single quotes 'notebook'.
This has now been corrected.

* I didn't use nbqa black to reformat my code. Now
is done!

* recover_code

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-05-21 14:34:40 +08:00
Yuante Li
4b8d70df1b [feat] fix a bug and adapt general_nn for use with rdagent_qlib (#1928)
* update qlib general_nn for rdagent_qlib

* fix install lightgbm error

* fix install lightgbm error & format with black

---------

Co-authored-by: Linlang <Lv.Linlang@hotmail.com>
2025-05-20 17:04:09 +08:00
炼金术师华华
a2996f7046 [Fix]Update data preparation part in README.md (#1924) 2025-05-13 18:40:31 +08:00
Linlang
fbba768006 fixed a problem with multi index caused by the default value of groupkey (#1917)
* fixed a problem with multi index caused by the default value of groupkey

* modify group_key default value

* limit pandas verion

* format with black

* fix docs error

* fix docs error

* fixed bugs caused by pandas upgrade

* remove needless code

* reformat with black

* limit version & add docs
2025-05-13 16:02:49 +08:00
Dred
df557d29d5 [fix] keep group_keys=False in Average Ensemble (#1913) 2025-05-08 15:03:46 +08:00
Linlang
be9cd9fe23 fix ci error (#1921)
* fix ci error

* fix ci error

* add comments

* add comments
2025-05-07 16:35:22 +08:00
Linlang
85cc74846b fix bugs in the documentation (#1918)
* fix bugs in the documentation

* fix docs error
2025-04-29 17:24:06 +08:00
Linlang
950408ef46 Fix issue 1892 (#1916)
* fix: resolve #1892 by retriving the data page by page

* fix: resolve #1892 by retriving the data page by page

* reformat with black

---------

Co-authored-by: shengyuhong <shengyuhong@bytedance.com>
Co-authored-by: fibers <yu8582@126.com>
2025-04-27 13:58:10 +08:00
Linlang
320bd65e19 fix fillna bug (#1914)
* fix fillna bug

* fix flake8 error

* fix pylint error

* update ubuntu version for action

* fix pytest error

* fix pylint error

* fix black error

* fix pylint error

* add Fillna test

* fix black error

* add  instruments

* remove code
2025-04-25 11:18:09 +08:00
Linlang
e7a1b5ea1f fix col name error when fetch data (#1904)
* fix col name error when fetch data

* fix col name error when fetch data

* fix install qlib error

* optimize code

* optimize code

* optimize code
2025-04-02 18:50:52 +08:00
you-n-g
67feeaeb00 docs: fix README.md link 2025-03-24 09:44:11 +08:00
Linlang
4d621bff99 fix pkl file not loading in StaticDataLoader (#1896)
* fix pkl file not loading in StaticDataLoader

* resolve hard code

* resolve hard code
2025-03-18 16:05:24 +08:00