{"record":{"id":"4cc23b428af09736","repo":"microsoft/qlib","slug":"this-type-of-input-is-not-supported-4cc23b","errorCode":null,"errorMessage":"This type of input is not supported","messagePattern":"This type of input is not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/backtest/executor.py","lineNumber":587,"sourceCode":"        Returns\n        -------\n        List[Order]:\n            get a list orders according to `self.trade_type`\n        \"\"\"\n        orders = _retrieve_orders_from_decision(trade_decision)\n\n        if self.trade_type == self.TT_SERIAL:\n            # Orders will be traded in a parallel way\n            order_it = orders\n        elif self.trade_type == self.TT_PARAL:\n            # NOTE: !!!!!!!\n            # Assumption: there will not be orders in different trading direction in a single step of a strategy !!!!\n            # The parallel trading failure will be caused only by the conflicts of money\n            # Therefore, make the buying go first will make sure the conflicts happen.\n            # It equals to parallel trading after sorting the order by direction\n            order_it = sorted(orders, key=lambda order: -order.direction)\n        else:\n            raise NotImplementedError(f\"This type of input is not supported\")\n        return order_it\n\n    def _collect_data(self, trade_decision: BaseTradeDecision, level: int = 0) -> Tuple[List[object], dict]:\n        trade_start_time, _ = self.trade_calendar.get_step_time()\n        execute_result: list = []\n\n        for order in self._get_order_iterator(trade_decision):\n            # Each time we move into a new date, clear `self.dealt_order_amount` since it only maintains intraday\n            # information.\n            now_deal_day = self.trade_calendar.get_step_time()[0].floor(freq=\"D\")\n            if self.deal_day is None or now_deal_day > self.deal_day:\n                self.dealt_order_amount = defaultdict(float)\n                self.deal_day = now_deal_day\n\n            # execute the order.\n            # NOTE: The trade_account will be changed in this function\n            trade_val, trade_cost, trade_price = self.trade_exchange.deal_order(\n                order,","sourceCodeStart":569,"sourceCodeEnd":605,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/backtest/executor.py#L569-L605","documentation":"SimulatorExecutor orders the decision's orders according to trade_type, which must equal TT_SERIAL ('serial', execute in order) or TT_PARAL ('parallel', buys sorted first to surface money conflicts). Any other value reaches the else branch and raises NotImplementedError on the first _collect_data step.","triggerScenarios":"SimulatorExecutor(..., trade_type='sequential'), trade_type='Serial' (case-sensitive), or trade_type=None/1 from a config default that was never filled in.","commonSituations":"Typing free-form strings into backtest config yaml; case mismatches; older tutorials using different trade_type spellings.","solutions":["Set trade_type='serial' or trade_type='parallel' exactly (lowercase)","Use the class constants: SimulatorExecutor.TT_SERIAL / SimulatorExecutor.TT_PARAL","If loading from config, validate the value against {'serial','parallel'} before constructing the executor"],"exampleFix":"# before\nex = SimulatorExecutor(..., trade_type='sequential')\n# after\nex = SimulatorExecutor(..., trade_type=SimulatorExecutor.TT_SERIAL)  # 'serial'","handlingStrategy":"validation","validationCode":"trade_type = str(trade_type).lower()\nassert trade_type in (SimulatorExecutor.TT_SERIAL, SimulatorExecutor.TT_PARAL)\nexecutor = SimulatorExecutor(..., trade_type=trade_type)","typeGuard":"def is_valid_trade_type(t) -> bool:\n    return t in (SimulatorExecutor.TT_SERIAL, SimulatorExecutor.TT_PARAL)","tryCatchPattern":null,"preventionTips":["Use SimulatorExecutor.TT_SERIAL/TT_PARAL constants instead of literals","Validate config-supplied trade_type against the two allowed strings"],"tags":["qlib","executor","trade-type","not-implemented"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}