qlib icon indicating copy to clipboard operation
qlib copied to clipboard

The question about change the freq to 1min in .yaml file

Open NotDefinedDN opened this issue 3 years ago • 1 comments

❓ Questions and Help

你好,我想使用benchmark里的TRA模型跑一下cn_data_1min的分钟级别数据。我在data_handler_config中设置了freq为1min,结果运行的时候一直出现以下error: File "/home/anaconda3/envs/Qlib/lib/python3.8/site-packages/pyqlib-0.8.6.99-py3.8-linux-x86_64.egg/qlib/data/data.py", line 90, in calendar _calendar, _calendar_index = self._get_calendar(freq, future) File "/home/anaconda3/envs/Qlib/lib/python3.8/site-packages/pyqlib-0.8.6.99-py3.8-linux-x86_64.egg/qlib/data/data.py", line 173, in _get_calendar _calendar = np.array(self.load_calendar(freq, future)) File "/home/anaconda3/envs/Qlib/lib/python3.8/site-packages/pyqlib-0.8.6.99-py3.8-linux-x86_64.egg/qlib/data/data.py", line 672, in load_calendar return [pd.Timestamp(x) for x in backend_obj] File "/home/anaconda3/envs/Qlib/lib/python3.8/site-packages/pyqlib-0.8.6.99-py3.8-linux-x86_64.egg/qlib/data/data.py", line 672, in return [pd.Timestamp(x) for x in backend_obj] File "pandas/_libs/tslibs/timestamps.pyx", line 1399, in pandas._libs.tslibs.timestamps.Timestamp.new File "pandas/_libs/tslibs/conversion.pyx", line 408, in pandas._libs.tslibs.conversion.convert_to_tsobject File "pandas/_libs/tslibs/conversion.pyx", line 652, in pandas._libs.tslibs.conversion._convert_str_to_tsobject ValueError: could not convert string to Timestamp

我想请问一下如何修改yaml里的freq才能正确的跑cn_data_1min这个数据集?

We sincerely suggest you to carefully read the documentation of our library as well as the official paper. After that, if you still feel puzzled, please describe the question clearly under this issue.

NotDefinedDN avatar Jul 22 '22 09:07 NotDefinedDN

I think it is caused by a BUG of Qlib. But it is fixed now. Please merge the main branch to try it.

Currently, Qlib only provides a very limited length of the range of 1min data. So I think it does not ensure good performance to transfer TRA model to it.

you-n-g avatar Aug 05 '22 09:08 you-n-g

This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

github-actions[bot] avatar Nov 03 '22 12:11 github-actions[bot]