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

127 Commits

Author SHA1 Message Date
Hubedge
84ff662a26 Fixed pandas FutureWarning (#1073)
* Fixed pandas FutureWarning

`FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.`

* fixed another pandas FutureWarning

```
scripts/data_collector/index.py:228: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
  new_df = new_df.append(_tmp_df, sort=False)
```

* fixed more pandas futurewarnings
2022-04-27 18:43:26 +08:00
Linlang
d934c8caba fix_issue_1019_1026 (#1046)
Co-authored-by: Linlang Lv (iSoftStone) <v-linlanglv@microsoft.com>
2022-04-22 09:15:53 +08:00
plpycoin
7bfc7e1797 chore: bug-fix for crypto data collector (#1038) 2022-04-13 22:22:31 +08:00
Qin Molei
61cc1a3867 Update README.md (#1039) 2022-04-10 20:57:12 +08:00
you-n-g
2952c443ca Add Qlib notebook tutorial (#1037)
* Add Qlib notebook tutorial

* Update tutorial
2022-04-08 21:29:41 +08:00
igor17400
56cfa480dc Ibovespa index support (#990)
* feat: download ibovespa index historic composition

ibovespa(ibov) is the largest index in Brazil's stocks exchange.
The br_index folder has support for downloading new companies for the current index composition.
And has support, as well, for downloading companies from historic composition of ibov index.

Partially resolves issue #956

* fix: typo error instead of end_date, it was written end_ate

* feat: adds support for downloading stocks historic prices from Brazil's stocks exchange (B3)

Together with commit c2f933 it resolves issue #956

* fix: code formatted with black.

* wip: Creating code logic for brazils stock market data normalization

* docs: brazils stock market data normalization code documentation

* fix: code formatted the with black

* docs: fixed typo

* docs: more info about python version used to generate requirements.txt file

* docs: added BeautifulSoup requirements

* feat: removed debug prints

* feat: added ibov_index_composition variable as a class attribute of IBOVIndex

* feat: added increment to generate the four month period used by the ibov index

* refactor: Added get_instruments() method inside utils.py for better code usability.

Message in the PR request to understand the context of the change

In the course of reviewing this PR we found two issues.

    1. there are multiple places where the get_instruments() method is used,
	and we feel that scripts.index.py is the best place for the
	get_instruments() method to go.
    2. data_collector.utils has some very generic stuff put inside it.

* refactor: improve brazils stocks download speed

The reason to use retry=2 is due to the fact that
Yahoo Finance unfortunately does not keep track of the majority
of Brazilian stocks.

Therefore, the decorator deco_retry with retry argument
set to 5 will keep trying to get the stock data 5 times,
which makes the code to download Brazilians stocks very slow.

In future, this may change, but for now
I suggest to leave retry argument to 1 or 2 in
order to improve download speed.

In order to achieve this code logic an argument called retry_config
was added into YahooCollectorBR1d and YahooCollectorBR1min

* fix: added __main__ at the bottom of the script

* refactor: changed interface inside each index

Using partial as `fire.Fire(partial(get_instruments, market_index="br_index" ))`
will make the interface easier for the user to execute the script.
Then all the collector.py CLI in each folder can remove a redundant arguments.

* refactor: implemented  class interface retry into YahooCollectorBR

* docs: added BR as a possible region into the documentation

* refactor: make retry attribute part of the interface

This way we don't have to use hasattr to access the retry attribute as previously done
2022-04-06 09:01:29 +08:00
Chaoying
9dd5e07819 Add PRef operator (#988) (#1000)
* Add PRef operator (#988)

* Fix type annotations

* Add test_pref_operator test case field

* Add note to PITProvider

* Add period parameter comment
2022-03-24 15:29:08 +08:00
Chauncey
8efc8b92ef Optimize the pit collector script (#982)
* Optimize the pit collector script

* Add copyright notice to collector.py

* Remove unnecessary parameters for test_pit.py

* Update test_pit.py

* Update test_pit.py
2022-03-18 21:51:36 +08:00
Chauncey
5f18ba7970 Fix pit download_data script TypeError (#978) (#979)
* Fix pit download_data script TypeError (#978)

* Format pit collector with black

* Format pit collector with black
2022-03-15 14:02:14 +08:00
Wangwuyi123
0f519f6053 Update yahooquery marked words (#966)
* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update collector.py

* Update scripts/data_collector/yahoo/collector.py

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* Update collector.py

* Update collector.py

* Update collector.py

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
2022-03-12 20:49:38 +08:00
you-n-g
615a381038 Merge pull request #938 from SunsetWolf/fix-csi500
Fix csi500
2022-03-11 12:09:22 +08:00
bxdd
568a88fddb fix cn annotation in PIT script (#958) 2022-03-11 10:15:20 +08:00
bxdd
faa99f30fa Support Point-in-time Data Operation (#343)
* add period ops class

* black format

* add pit data read

* fix bug in period ops

* update ops runnable

* update PIT test example

* black format

* update PIT test

* update tets_PIT

* update code format

* add check_feature_exist

* black format

* optimize the PIT Algorithm

* fix bug

* update example

* update test_PIT name

* add pit collector

* black format

* fix bugs

* fix try

* fix bug & add dump_pit.py

* Successfully run and understand PIT

* Add some docs and remove a bug

* mv crypto collector

* black format

* Run succesfully after merging master

* Pass test and fix code

* remove useless PIT code

* fix PYlint

* Rename

Co-authored-by: Young <afe.young@gmail.com>
2022-03-10 14:27:52 +08:00
Linlang Lv (iSoftStone)
837067b9e1 fix-csi500 2022-03-09 23:03:28 +08:00
Chia-hung Tai
57f7ed9914 [949] - Remove argument internal in BaseRun::download_data. (#953)
* [949] - Remove argument internal in BaseRun::download_data.

* Fix black.

* Fix bug.
2022-03-08 10:26:35 +08:00
Chia-hung Tai
ea4fb33ff2 Fix wrong error messages. (#946) 2022-03-03 14:33:24 +08:00
Linlang Lv (iSoftStone)
40dd84857c update-csi500 2022-02-28 03:48:07 +08:00
BigTreei
74cc21fc2c add CSI500 data collector 2022-02-28 03:33:36 +08:00
Pengrong Zhu
2aee9e0145 Add future calendar collector (#795)
* fix Windows mount

* add future_calendar_collector

* update docs

Co-authored-by: Young <afe.young@gmail.com>
Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
2022-01-16 10:14:27 +08:00
Chia-hung Tai
184ce34a34 [807] Move the REG_CONSTANT/EPS to constant.py. (#811)
* [807] Move the REG_CONSTANT to constant.py.

* import REG_US.

* Move EPS to constant.py.
2022-01-09 21:39:46 +08:00
Arthur Cui
3e79a088ef Add Crypto dataset from coingecko (#733)
* add crypto symbols collectors

* add crypto data collector

* add crypto symbols collectors

* add crypto data collector

* solver region and source problem

* fix merge

* fix merge

* clean all cn information

Co-authored-by: DefangCui <170007807@pku.edu.cn>
2021-12-31 22:24:26 +08:00
SunsetWolf
dfc0ed3c01 fix_typo (#790)
Signed-off-by: unknown <lv.linlang@qq.com>
2021-12-31 22:14:47 +08:00
Pengrong Zhu
1ecdfd45fe fix dump_bin:DumpDataUpdate (#783) 2021-12-29 09:29:08 +08:00
Chao Ning
6bafd0a09b Reformat example data names: use {region}_data for 1-day data, and {region}_data_1min for 1-min data (#781)
* Fix high-freq data name from `yahoo_cn_1min` to `cn_data_1min`

* re-format example data names using `qlib_{region}_{feq}`, e.g. qlib_cn_1d

* re-format example data names using `{region}_{feq}`, e.g. us_1d and cn_1min

* keep using  for 1day data, and change 1min data to
2021-12-28 23:58:49 +08:00
Pengrong Zhu
a0f49fe2e7 fix cn_index collector (#780) 2021-12-26 14:12:48 +08:00
Chia-hung Tai
5aa5a6f356 Replace scripts/get_data.py to get_data.py. (#775)
For the consitency in this page, replace scripts/get_data.py to get_data.py.
2021-12-25 16:12:04 +08:00
Pengrong Zhu
5e69d089c0 add description of dataset document (#742) 2021-12-12 09:49:10 +08:00
you-n-g
6d6c586dc2 Update data crawler 2021-11-28 13:44:49 +08:00
Pengrong Zhu
d224ea447e Fix high-freq data (#702)
* fix the collector.py yahoo 1min factor calculation

* fix HFSignalRecord
2021-11-20 15:03:53 +08:00
SaintMalik
fb21c591bb fix typos (#592) 2021-09-12 16:39:22 +08:00
you-n-g
19d15ddc38 Merge pull request #513 from 2796gaurav/main
MVP for Indian Stocks in qlib using yahooquery
2021-08-26 20:59:26 +08:00
2796gaurav
8fa22bd2e1 added 1min for IN and also updated readme 2021-07-21 14:16:22 +05:30
Gaurav
d1c8d885aa cleaned the code 2021-07-21 17:59:50 +05:30
zhupr
c97a96363d Add a check if change is mutated to YahooNormalize1d 2021-07-18 20:28:46 +08:00
Gaurav
d70e5a4f88 add YahooNormalizeIN and YahooNormalizeIN1d 2021-07-17 10:40:16 +05:30
zhupr
4ec41ea0e7 Add a check if change is mutated to YahooNormalize1d 2021-07-15 19:13:25 +08:00
Gaurav
cfcd9fb1f8 cleaned with black 2021-07-15 11:24:41 +05:30
Gaurav
457dcaa466 cleaned with black 2021-07-14 20:12:00 +05:30
Gaurav
3c740fc2de MVP for Indian Stocks in qlib using yahooquery 2021-07-14 19:54:55 +05:30
chaosyu
79026e5390 fix bug that duplicate rows will cause reindex failed when dumping with csv files 2021-07-13 10:49:21 +08:00
Gaurav Chauhan
4610e16ac2 updated readme of yahoo collector where region parameter was incorrect (#504)
* updated readme of yahoo collector where region parameter was incorrect

* changes

update readme of yahoo collector where region parameter was incorrect

* update readme of yahoo collector

update readme of yahoo collector where region parameter was incorrect

* updated changes

* updated readme of cn1d data

Co-authored-by: Gaurav Chauhan01/HO/Analytics/General <Gaurav.Chauhan01@bajajallianz.in>
2021-07-13 09:46:13 +08:00
zhupr
39340fbf06 fix: typo 2021-06-24 11:07:40 +08:00
zhupr
0e277723a3 Merge remote-tracking branch 'qlib/main' into qlib_main
# Conflicts:
#	scripts/data_collector/yahoo/README.md
2021-06-24 00:09:54 +08:00
zhupr
1418417034 fix automatic update of daily frequency data 2021-06-23 23:59:59 +08:00
zhupr
bab50e8837 fix YahooNormalize1min && update docs 2021-06-23 16:13:26 +08:00
zhupr
46714adf4c modify the YahooNormalize1min factor calculation 2021-06-22 11:15:09 +08:00
zhupr
99fb49650a add end_date parameter to collector.normalize_data 2021-06-21 17:20:37 +08:00
zhupr
985fd0816c Fix cn_index.collector network error 2021-06-21 17:18:04 +08:00
zhupr
b6c31540e8 add function to automatically update daily frequency data 2021-06-17 23:07:56 +08:00
zhupr
a4f6e04199 modify dump_update starts with the last end date of each symbol 2021-06-17 22:33:31 +08:00