microsoft / qlib

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
https://qlib.readthedocs.io/en/latest/
MIT License
15.4k stars 2.63k forks source link

about workflow_config_lightgbm_Alpha158_multi_freq.yaml #1066

Open stockcoder opened 2 years ago

stockcoder commented 2 years ago

🐛 Bug Description

qrun workflow_config_lightgbm_Alpha158_multi_freq.yaml

and then get this error:

if self.backtest_config["start_time"] is None: KeyError: 'start_time'

cshxinhao commented 9 months ago

came across the same problem, under qlib.version=='0.9.3'

word911 commented 7 months ago

add "start_time" in backtest, like below: btw, you also need to add "end_time", and delete

        limit_threshold: 0.095
        deal_price: close
        open_cost: 0.0005
        close_cost: 0.0015
        min_cost: 5
......
port_analysis_config: &port_analysis_config
    strategy:
        class: TopkDropoutStrategy
        module_path: qlib.contrib.strategy.strategy
        kwargs:
            topk: 50
            n_drop: 5
            signal: <PRED>
    backtest:
        account: 100000000
        benchmark: *benchmark
        start_time: 2008-01-01
        end_time: 2020-08-01
task:
    model:
        class: LGBModel
        module_path: qlib.contrib.model.gbdt
......

wish it helps