{"record":{"id":"49b156d960c34f79","repo":"OpenBB-finance/OpenBB","slug":"error-not-enough-information-to-complete-the-oper-49b156","errorCode":null,"errorMessage":"Error: Not enough information to complete the operation. Likely due to zero values in the IV field.","messagePattern":"Error: Not enough information to complete the operation\\. Likely due to zero values in the IV field\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/provider/utils/options_chains_properties.py","lineNumber":1819,"sourceCode":"\n            atm_put_strike = self._get_nearest_strike(\n                \"put\", day, force_otm=False\n            )  # noqa:F841\n            _puts = puts[puts[\"dte\"] == day][\n                [\"expiration\", \"option_type\", \"strike\", \"implied_volatility\"]\n            ]\n\n            if len(_puts) > 0:\n                put = _puts.set_index(\"expiration\").copy()  # type: ignore\n                put_atm_iv = put.query(\"`strike` == @atm_put_strike\")[\n                    \"implied_volatility\"\n                ]\n                if len(put_atm_iv) > 0:\n                    put[\"ATM IV\"] = put_atm_iv.iloc[0]\n                    put[\"Skew\"] = put[\"implied_volatility\"] - put[\"ATM IV\"]\n                    put_skew = concat([put_skew, put])\n        if call_skew.empty or put_skew.empty:\n            raise OpenBBError(\n                \"Error: Not enough information to complete the operation. Likely due to zero values in the IV field.\"\n            )\n        call_skew = call_skew.set_index([\"strike\", \"option_type\"], append=True)\n        put_skew = put_skew.set_index([\"strike\", \"option_type\"], append=True)\n        skew_df = concat([call_skew, put_skew]).sort_index().reset_index()\n        cols = [\"Expiration\", \"Strike\", \"Option Type\", \"IV\", \"ATM IV\", \"Skew\"]\n        skew_df.columns = cols\n        skew_df[\"Expiration\"] = skew_df[\"Expiration\"].astype(str)\n\n        return skew_df\n","sourceCodeStart":1801,"sourceCodeEnd":1830,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/provider/utils/options_chains_properties.py#L1801-L1830","documentation":"Raised by OptionsChainsData.skew() in the by-strike mode (moneyness=None): after iterating expirations and appending per-expiration call and put frames with 'ATM IV' and 'Skew' columns, either call_skew or put_skew is empty. Unlike the date mode, this branch computes skew across strikes for each expiration and needs both sides populated.","triggerScenarios":"Calling chains.skew() (default strike-mode) where no expiration produced both a call frame and put frame with valid IV - e.g. all put IVs are zero so put_skew never gets appended (the append only happens when len(put_atm_iv) > 0).","commonSituations":"Providers with one-sided IV coverage (puts quoted, calls IV=0, or vice versa); symbols with very few listed expirations where the single expiration lacks ATM IV; IV columns containing NaN cast to 0 upstream.","solutions":["Check per-side IV coverage: df.groupby('option_type').implied_volatility.apply(lambda s: (s > 0).sum()).","Switch to a provider/date with two-sided IV surfaces.","Populate or repair zero IVs before calling (e.g. recompute from option prices) if you own the data pipeline.","As a diagnostic, run skew(moneyness=..., date=...) mode which surfaces which side is missing via the sibling error."],"exampleFix":"# before\nskew_df = chains.skew()  # all put IV zero -> put_skew empty\n\n# after\ndata = obb.derivatives.options.chains('SPY', provider='cboe')\nskew_df = data.to_chains().skew()","handlingStrategy":"validation","validationCode":"df = chains.dataframe\npos_iv = df[df.implied_volatility > 0]\nassert (pos_iv.option_type == 'call').any(), 'no call IV'\nassert (pos_iv.option_type == 'put').any(), 'no put IV'","typeGuard":"def two_sided_iv(df) -> bool:\n    pos = df[df.implied_volatility > 0]\n    return set(pos.option_type) >= {'call', 'put'}","tryCatchPattern":"try:\n    chains.skew()\nexcept OpenBBError as e:\n    if 'Not enough information' in str(e):\n        chains.skew(moneyness=95, date=30)  # fall back to moneyness-date mode for diagnosis","preventionTips":["Verify both sides carry positive IV before strike-mode skew.","Repair or drop zero-IV rows upstream instead of relying on the library to fail."],"tags":["options","implied-volatility","openbb","data-quality"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}