{"record":{"id":"1a0b96f5f0d4bc65","repo":"microsoft/qlib","slug":"the-fund-contains","errorCode":null,"errorMessage":"The fund contains 每*份收益","messagePattern":"The fund contains 每\\*份收益","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"scripts/data_collector/fund/collector.py","lineNumber":120,"sourceCode":"    def get_data_from_remote(symbol, interval, start, end):\n        error_msg = f\"{symbol}-{interval}-{start}-{end}\"\n\n        try:\n            # TODO: numberOfHistoricalDaysToCrawl should be bigger enough\n            url = INDEX_BENCH_URL.format(\n                index_code=symbol, numberOfHistoricalDaysToCrawl=10000, startDate=start, endDate=end\n            )\n            resp = requests.get(url, headers={\"referer\": \"http://fund.eastmoney.com/110022.html\"}, timeout=None)\n\n            if resp.status_code != 200:\n                raise ValueError(\"request error\")\n\n            data = json.loads(resp.text.split(\"(\")[-1].split(\")\")[0])\n\n            # Some funds don't show the net value, example: http://fundf10.eastmoney.com/jjjz_010288.html\n            SYType = data[\"Data\"][\"SYType\"]\n            if SYType in {\"每万份收益\", \"每百份收益\", \"每百万份收益\"}:\n                raise ValueError(\"The fund contains 每*份收益\")\n\n            # TODO: should we sort the value by datetime?\n            _resp = pd.DataFrame(data[\"Data\"][\"LSJZList\"])\n\n            if isinstance(_resp, pd.DataFrame):\n                return _resp.reset_index()\n        except Exception as e:\n            logger.warning(f\"{error_msg}:{e}\")\n\n    def get_data(\n        self, symbol: str, interval: str, start_datetime: pd.Timestamp, end_datetime: pd.Timestamp\n    ) -> [pd.DataFrame]:\n        def _get_simple(start_, end_):\n            self.sleep()\n            _remote_interval = interval\n            return self.get_data_from_remote(\n                symbol,\n                interval=_remote_interval,","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/scripts/data_collector/fund/collector.py#L102-L138","documentation":"Raised by FundCollector.get_data_from_remote when the fund's SYType field (from eastmoney's LSJZ NAV payload) is one of {'每万份收益','每百份收益','每百万份收益'} — per-10000/100/1M-share yield funds (money-market style) that do not publish net asset value per unit, so NAV normalization is impossible. Like 578, it is caught by the outer handler: logged as a warning and the method returns None.","triggerScenarios":"Collecting data for a money-market/wealth-management fund code (e.g. 010288-style codes referenced in the code comment) whose eastmoney page shows 每*份收益 instead of unit NAV.","commonSituations":"Batch-collecting an instrument list that includes money market funds (货币基金) alongside regular funds; users unaware that MMFs quote yield-per-lot rather than NAV.","solutions":["Exclude money-market funds from the collection list (filter codes known to be MMFs) — the collector deliberately skips them.","If you need their returns, collect 万份收益 series from eastmoney separately and convert, rather than expecting the NAV pipeline to handle them.","Treat the logged warning as expected skip behavior when it appears for MMF codes; no code fix needed for regular funds."],"exampleFix":"# before\n# collecting all fund codes including MMFs\nrun download_data --source_dir ... \n\n# after\n# filter out money market funds (SYType 每*份收益) from instrument list first\nfunds = [f for f in funds if not is_money_market_fund(f)]","handlingStrategy":"fallback","validationCode":"# pre-filter money market funds from the instrument list before collecting\nSY_YIELD_TYPES = {\"每万份收益\", \"每百份收益\", \"每百万份收益\"}\ndef is_nav_fund(symbol) -> bool:\n    # probe SYType once; MMFs are excluded from collection\n    ...","typeGuard":null,"tryCatchPattern":"try:\n    df = FundCollector.get_data_from_remote(symbol, interval, start, end)\nexcept ValueError as e:\n    if \"每*份收益\" in str(e):\n        logger.info(f\"{symbol}: money-market fund, skipped\")\n        df = None\n    else:\n        raise","preventionTips":["Curate the fund list: exclude money-market/wealth-management funds (they quote per-lot yield, not NAV).","Expect logged skips for MMF codes; monitor warnings rather than treating them as failures.","If MMF returns are needed, collect the 万份收益 series with a dedicated pipeline."],"tags":["qlib","data-collector","fund","eastmoney","money-market"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}