Skip to content

fix: respect disabled benchmark config#2207

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

fix: respect disabled benchmark config#2207
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/benchmark-none-custom-data

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • keep benchmark=None as an explicit disabled benchmark config when creating a backtest account
  • add a regression test so custom-data backtests do not fall back to SH000300

Fixes #2205.

To verify

  • python -m py_compile qlib/backtest/__init__.py tests/backtest/test_benchmark_config.py
  • python -m pytest tests/backtest/test_benchmark_config.py -q

I could not complete the pytest command locally on Windows because the clean clone does not have Qlib's Cython extension built, and editable build failed in the local MSVC/Windows SDK environment with fatal error C1083: cannot open include file: 'io.h'. The syntax check above passed.

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