Skip to content

fix: respect disabled backtest benchmark#2222

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/backtest-none-benchmark
Open

fix: respect disabled backtest benchmark#2222
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/backtest-none-benchmark

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • keep benchmark=None as an explicit disabled benchmark when creating the backtest account
  • add a regression test for the disabled-benchmark path

Fixes #2205.

To verify

  • python -m py_compile qlib\backtest_init_.py tests\backtest\test_account.py
  • git diff --check

I also tried to run python -m pytest tests\backtest\test_account.py -q, but this Windows clean clone could not import qlib before compiling the Cython extensions. pip install -e . then failed in MSVC because this machine is missing the Windows UCRT header io.h, so I could not complete the local pytest run here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The benchmark 000300 does not exist. Please provide the right benchmark

1 participant