-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
update high freq demo #358
Conversation
|
qlib_init: | ||
provider_uri: "~/.qlib/qlib_data/yahoo_cn_1min" | ||
region: cn | ||
market: &market ['SH605222', 'SZ002796', 'SZ002246', 'SZ000713', 'SZ002820', 'SH601328', 'SZ000668', 'SH603359', 'SZ002144', 'SH600195', 'SH603685', 'SH603386', 'SZ002586', 'SZ000573', 'SZ000605', 'SZ002842', 'SH600068', 'SZ300547', 'SZ000926', 'SZ002036', 'SZ002161', 'SH600715', 'SZ300427', 'SZ002573', 'SZ300142', 'SH605116', 'SZ002951', 'SH600276', 'SZ002437', 'SH603355', 'SZ002893', 'SH600584'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for @zhupr to update the instruments list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated: python get_data.py qlib_data --name qlib_data --target_dir ~/.qlib/qlib_data/cn_data_1min --interval 1min --region cn
qlib/contrib/eva/alpha.py
Outdated
def calc_prec( | ||
pred: pd.Series, label: pd.Series, date_col="datetime", quantile: float = 0.2, dropna=False, is_alpha=False | ||
) -> Tuple[pd.Series, pd.Series]: | ||
"""calculate the precision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will excess return/return
a more comprehensible name than precision?
qlib/contrib/eva/alpha.py
Outdated
long precision and short precision in time level | ||
""" | ||
if is_alpha: | ||
label = label - label.mean(level=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use groupby('datetime')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label.mean(level=date_col)
self.params.update(kwargs) | ||
self.model = None | ||
|
||
def _cal_signal_metrics(self, y_test, l_cut, r_cut): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use calc_prec
here?
qlib/workflow/record_temp.py
Outdated
self.get_path("long_pre.pkl"), | ||
self.get_path("short_pre.pkl"), | ||
] | ||
paths.extend([self.get_path("long_short_r.pkl"), self.get_path("long_avg_r.pkl")]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is extend
a better choice than writing it in the list directly here?
@javaThonc Please remember to update the evaluation results on high frequency data and send us the profiling results. Besides, don't forget to update the results of tabnet . |
update high freq demo
Description
Create a high-frequency demo with the calculation of precision to calculate the right prediction level and a classification version of lightGBM that is designed for the high-frequency data classification method as well as a workflow that can be used to backtest later.
Motivation and Context
Create a high freq demo that can be used to test whether a dataset contains signal for trading
Types of changes