{"record":{"id":"4d6ddbe86b1a033c","repo":"OpenBB-finance/OpenBB","slug":"error-no-premium-data-found-for-the-selected-stri","errorCode":null,"errorMessage":"Error: No premium data found for the selected strikes. Call: {call_strike_estimate}, Put: {put_strike_estimate}","messagePattern":"Error: No premium data found for the selected strikes\\. Call: (.+?), Put: (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/provider/utils/options_chains_properties.py","lineNumber":741,"sourceCode":"            short = True\n\n        strike_price = abs(strike)  # type: ignore\n        bid_ask = \"bid\" if short else \"ask\"\n        call_price_col = self._identify_price_col(chains, \"call\", bid_ask)  # type: ignore\n        put_price_col = self._identify_price_col(chains, \"put\", bid_ask)  # type: ignore\n        call_strike_estimate = self._get_nearest_strike(\"call\", days, strike_price, call_price_col, force_otm)  # type: ignore\n        # If a strike price is supplied, the put strike is the same as the call strike.\n        # Otherwise, the put strike is the nearest OTM put strike to the last price.\n\n        put_strike_estimate = self._get_nearest_strike(\"put\", days, strike_price, put_price_col, force_otm)  # type: ignore\n        call_premium = chains[chains.strike == call_strike_estimate].query(\"`option_type` == 'call'\")[  # type: ignore\n            call_price_col\n        ]\n        put_premium = chains[chains.strike == put_strike_estimate].query(\"`option_type` == 'put'\")[  # type: ignore\n            put_price_col\n        ]\n        if call_premium.empty or put_premium.empty:\n            raise OpenBBError(\n                \"Error: No premium data found for the selected strikes.\"\n                f\" Call: {call_strike_estimate}, Put: {put_strike_estimate}\"\n            )\n        put_premium = put_premium.values[0]\n        call_premium = call_premium.values[0]\n        dte = chains[chains.expiration.astype(str) == dte_estimate][\"dte\"].unique()[0]  # type: ignore\n        straddle_cost = call_premium + put_premium  # type: ignore\n        straddle_dict: dict = {}\n\n        # Includes the as-of date if it is historical EOD data.\n        if hasattr(chains, \"eod_date\"):\n            straddle_dict.update({\"Date\": chains.eod_date.iloc[0]})\n\n        straddle_dict.update(\n            {\n                \"Symbol\": chains.underlying_symbol.unique()[0],\n                \"Underlying Price\": underlying_price,\n                \"Expiration\": dte_estimate,","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/provider/utils/options_chains_properties.py#L723-L759","documentation":"Thrown by OptionsChainsData.straddle() when, after estimating the nearest call and put strikes for the target expiration, filtering the chains DataFrame by those strikes and option types yields an empty premium series. It means the strike rows returned by _get_nearest_strike() do not exist in the sliced expiration frame for the selected price column (bid/ask/last). The offending strikes are embedded in the message so you can see which values failed to match.","triggerScenarios":"Calling obb.derivatives.options.chains(...).straddle() (or chains.dataframe-based straddle) where the nearest-expiration slice has no call row at call_strike_estimate or no put row at put_strike_estimate for the price column chosen by _identify_price_col (e.g. 'bid'/'ask' columns present but NaN/absent for those strikes, or strike-price rounding mismatch between providers).","commonSituations":"Using a provider whose chain is sparse at the estimated ATM strikes; passing an explicit strike_price that does not exist in the chain (e.g. 152.5 when strikes are in 5-point increments); Illiquid symbols with one-sided quotes; filtering the chains DataFrame before calling straddle so the matched rows were removed.","solutions":["Pass an explicit strike_price that exists in chains.strikes (e.g. chains.strikes nearest value) instead of relying on auto-estimation.","Try a different days value so a different expiration (with denser quotes) is selected: straddle(days=60).","Inspect the slice before calling: chains.dataframe[chains.dataframe.expiration.astype(str) == chains._get_nearest_expiration(days)] and verify both 'call' and 'put' rows exist at the estimated strikes.","If the price column (bid/ask) is all-NaN for those strikes, switch providers (e.g. cboe/yfinance) or patch the missing quotes so _identify_price_col finds usable values."],"exampleFix":"# before\nres = chains.straddle(days=30)  # raises: no premium at estimated strikes\n\n# after\nimport numpy as np\nstrikes = np.array(chains.strikes)\nexplicit = strikes[min(range(len(strikes)), key=lambda i: abs(strikes[i] - chains.last_price))]\nres = chains.straddle(days=30, strike=explicit)","handlingStrategy":"validation","validationCode":"df = chains.dataframe\nexp = chains._get_nearest_expiration(days)\nslice_ = df[df['expiration'].astype(str) == exp]\ncol = chains._identify_price_col(slice_, 'call', 'last_price')\nstrikes = set(slice_[slice_.option_type == 'call'].strike)\nassert any(s in strikes for s in [target_strike]), 'call premium rows missing at strike'","typeGuard":"def has_premium_at(df, strike: float, option_type: str, col: str) -> bool:\n    rows = df[(df.strike == strike) & (df.option_type == option_type)]\n    return not rows.empty and rows[col].notna().any() and (rows[col] > 0).any()","tryCatchPattern":"from openbb_core.app.model.abstract.error import OpenBBError\ntry:\n    chains.straddle(days=30)\nexcept OpenBBError as e:\n    if 'No premium data found' in str(e):\n        # retry with nearest listed strike\n        ...","preventionTips":["Snap requested strikes to chains.strikes values before passing them.","Verify the chosen expiration slice has both call and put rows with a usable price column before calling straddle().","Prefer providers with dense bid/ask coverage for strategy analysis."],"tags":["options","pandas","openbb","data-quality"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}