-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix backtest #719
Fix backtest #719
Conversation
Please show the result of workflow.py |
docs/component/strategy.rst
Outdated
portfolio_metric_dict, indicator_dict = backtest_daily( | ||
start_time="2017-01-01", end_time="2020-08-01", strategy=strategy_obj, executor=executor_obj | ||
) | ||
analysis_freq = "{0}{1}".format(*Freq.parse(FREQ)) |
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 can integrate this analysis_freq
into backtest_daily.
**NOTE**: This will be applied to the outmost executor's calendar. | ||
E.g. Executor[day](Executor[1min]), setting `end_time == 20XX0301` will include all the minutes on 20XX0301 | ||
strategy : Union[str, dict, BaseStrategy] | ||
for initializing outermost portfolio strategy. Please refer to the docs of init_instance_by_config for more information. |
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 can give a example in the docstring of this parameter
qlib/contrib/evaluate.py
Outdated
) | ||
return report_dict.get("report_df"), report_dict.get("positions") | ||
return portfolio_metric_dict, indicator_dict |
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.
return the daily result directly
fix the bug of nested_decision_execution example
* modify FileStorage to support multiple freqs * modify backtest's sample documentation * change the logging level of read data exception from error to debug * fix the backtest exception when volume is 0 or np.nan * fix test_storage.py * add backtest_daily * modify backtest_daily's docstring * add __repr__/__str__ to Position * fix the bug of nested_decision_execution example Co-authored-by: Young <[email protected]> Co-authored-by: you-n-g <[email protected]>
Description
Motivation and Context
How Has This Been Tested?
pytest qlib/tests/test_all_pipeline.py
under upper directory ofqlib
.Screenshots of Test Results (if appropriate):
Types of changes