{"record":{"id":"cce80040418d91f9","repo":"microsoft/qlib","slug":"end-date-end-is-greater-than-the-current-date","errorCode":null,"errorMessage":"end_date: {end} is greater than the current date.","messagePattern":"end_date: (.+?) is greater than the current date\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/data_collector/yahoo/collector.py","lineNumber":796,"sourceCode":"        limit_nums: int\n            using for debug, by default None\n\n        Notes\n        -----\n            check_data_length, example:\n                daily, one year: 252 // 4\n                us 1min, a week: 6.5 * 60 * 5\n                cn 1min, a week: 4 * 60 * 5\n\n        Examples\n        ---------\n            # get daily data\n            $ python collector.py download_data --source_dir ~/.qlib/stock_data/source --region CN --start 2020-11-01 --end 2020-11-10 --delay 0.1 --interval 1d\n            # get 1m data\n            $ python collector.py download_data --source_dir ~/.qlib/stock_data/source --region CN --start 2020-11-01 --end 2020-11-10 --delay 0.1 --interval 1m\n        \"\"\"\n        if self.interval == \"1d\" and pd.Timestamp(end) > pd.Timestamp(datetime.datetime.now().strftime(\"%Y-%m-%d\")):\n            raise ValueError(f\"end_date: {end} is greater than the current date.\")\n\n        super(Run, self).download_data(max_collector_count, delay, start, end, check_data_length, limit_nums)\n\n    def normalize_data(\n        self,\n        date_field_name: str = \"date\",\n        symbol_field_name: str = \"symbol\",\n        end_date: str = None,\n        qlib_data_1d_dir: str = None,\n    ):\n        \"\"\"normalize data\n\n        Parameters\n        ----------\n        date_field_name: str\n            date field name, default date\n        symbol_field_name: str\n            symbol field name, default symbol","sourceCodeStart":778,"sourceCodeEnd":814,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/scripts/data_collector/yahoo/collector.py#L778-L814","documentation":"Error \"end_date: {end} is greater than the current date.\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at scripts/data_collector/yahoo/collector.py:796 when the guard condition fails: \"end_date is greater than the current date\". It triggers when the code path receives input or a state that violates the precondition checked at this point — e.g. an unimplemented abstract method being called, an unsupported argument type/value, or an invalid configuration. To avoid it, satisfy the documented precondition before this call: implement the required method in your subclass, or pass a supported value of the expected type as described by the message.","commonSituations":"See trigger scenarios.","solutions":["Set end_date to today or an earlier date; future end dates are not allowed.","Remove the end_date argument to default to the current date."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}