Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PortAnaRecord not supporting highfreq data #341

Open
2young-2simple-sometimes-naive opened this issue Mar 15, 2021 · 2 comments
Open

PortAnaRecord not supporting highfreq data #341

2young-2simple-sometimes-naive opened this issue Mar 15, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@2young-2simple-sometimes-naive
Copy link
Contributor

[32154:MainThread](2021-03-15 01:13:58,756) WARNING - qlib.Initialization - [config.py:292] - redis connection failed(host=127.0.0.1 port=6379), cache will not be used!
[32154:MainThread](2021-03-15 01:13:58,760) INFO - qlib.Initialization - [__init__.py:46] - qlib successfully initialized based on client settings.
[32154:MainThread](2021-03-15 01:13:58,760) INFO - qlib.Initialization - [__init__.py:47] - data_path=xxxxxxxxxxxxxxxxxxxxx/qlib_data/hour
[32154:MainThread](2021-03-15 01:16:29,323) INFO - qlib.timer - [log.py:77] - Time cost: 148.341s | Loading data Done
[32154:MainThread](2021-03-15 01:16:44,864) INFO - qlib.timer - [log.py:77] - Time cost: 11.575s | DropnaLabel Done
[32154:MainThread](2021-03-15 01:16:48,886) INFO - qlib.timer - [log.py:77] - Time cost: 4.021s | CSRankNorm Done
[32154:MainThread](2021-03-15 01:16:48,886) INFO - qlib.timer - [log.py:77] - Time cost: 19.562s | fit & process data Done
[32154:MainThread](2021-03-15 01:16:48,886) INFO - qlib.timer - [log.py:77] - Time cost: 167.905s | Init data Done
[32154:MainThread](2021-03-15 01:17:30,866) INFO - qlib.workflow - [expm.py:248] - No tracking URI is provided. Use the default tracking URI.
[32154:MainThread](2021-03-15 01:17:30,869) INFO - qlib.workflow - [expm.py:284] - <mlflow.tracking.client.MlflowClient object at 0x2b1a7bf54940>
[32154:MainThread](2021-03-15 01:17:30,997) INFO - qlib.workflow - [exp.py:182] - Experiment 1 starts running ...
[32154:MainThread](2021-03-15 01:17:38,976) INFO - qlib.workflow - [recorder.py:270] - Recorder fcbe541714924bf59c8d72cdc582fb4f starts running under Experiment 1 ...
[32154:MainThread](2021-03-15 02:06:02,266) INFO - qlib.workflow - [record_temp.py:126] - Signal record 'pred.pkl' has been saved as the artifact of the Experiment 1
[32154:MainThread](2021-03-15 02:06:02,607) INFO - qlib.backtest caller - [__init__.py:148] - Create new exchange
[32154:MainThread](2021-03-15 02:06:02,646) ERROR - qlib.workflow - [utils.py:35] - An exception has been raised[ValueError: calendar not exists for freq day].
  File "./workflow-highfreq.py", line 45, in <module>
    par.generate()
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/workflow/record_temp.py", line 243, in generate
    report_dict = normal_backtest(pred_score, strategy=self.strategy, **self.backtest_config)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/contrib/backtest/__init__.py", line 303, in backtest
    trade_exchange = get_exchange(pred, **ex_args)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/contrib/backtest/__init__.py", line 158, in get_exchange
    dates = np.append(dates, get_date_range(dates[-1], left_shift=1, right_shift=shift))
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/utils/__init__.py", line 498, in get_date_range
    start = get_date_by_shift(trading_date, left_shift, future=future)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/utils/__init__.py", line 518, in get_date_by_shift
    cal = D.calendar(future=future)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/data/data.py", line 928, in calendar
    return Cal.calendar(start_time, end_time, freq, future=future)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/data/data.py", line 534, in calendar
    _calendar, _calendar_index = self._get_calendar(freq, future)
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/data/data.py", line 120, in _get_calendar
    _calendar = np.array(self.load_calendar(freq, future))
  File "xxxxxxxxxxxxxxxxxxxxx/.venv/lib/python3.7/site-packages/pyqlib-0.6.3.99-py3.7-linux-x86_64.egg/qlib/data/data.py", line 529, in load_calendar
    raise ValueError("calendar not exists for freq " + freq)
@2young-2simple-sometimes-naive 2young-2simple-sometimes-naive added the bug Something isn't working label Mar 15, 2021
@you-n-g
Copy link
Collaborator

you-n-g commented Mar 17, 2021

We are trying to add some forecasting examples for high frequency trading,
Please stay tuned for furthur updates.
#310

@Yunlong-He
Copy link

highfreq backtest still not supported after 3 years?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants