@@ -173,7 +173,7 @@ def iv_smile(
173173
174174 Returns:
175175 DataFrame containing:
176-
176+
177177 - ``strike``: Strike levels.
178178 - ``fitted_iv``: Fitted implied volatility from the calibrated model.
179179 - ``market_iv``: *(if include_observed=True)* Mid-price implied volatility
@@ -203,31 +203,32 @@ def iv_smile(
203203
204204 def plot (self , ** kwargs ) -> Any :
205205 """Plot the fitted implied volatility smile.
206-
206+
207207 Args:
208208 **kwargs: Arguments forwarded to ``oipd.presentation.iv_plotting.plot_iv_smile``.
209-
209+
210210 Returns:
211211 matplotlib.figure.Figure: The plot figure.
212- """
212+ """
213213 smile_df = self .iv_smile ()
214-
214+
215215 # Map our column names to what plot_iv_smile expects
216- plot_df = smile_df .rename (columns = {
217- "market_bid_iv" : "bid_iv" ,
218- "market_ask_iv" : "ask_iv" ,
219- "market_last_iv" : "last_iv"
220- })
216+ plot_df = smile_df .rename (
217+ columns = {
218+ "market_bid_iv" : "bid_iv" ,
219+ "market_ask_iv" : "ask_iv" ,
220+ "market_last_iv" : "last_iv" ,
221+ }
222+ )
221223
222224 # Extract reference price (forward) for log-moneyness plotting
223225 reference = None
224226 forward_price = self ._metadata .get ("forward_price" )
225227 if forward_price is not None :
226228 reference = ReferenceAnnotation (
227- value = float (forward_price ),
228- label = f"Forward: { float (forward_price ):.2f} "
229+ value = float (forward_price ), label = f"Forward: { float (forward_price ):.2f} "
229230 )
230-
231+
231232 # If no reference price is available, default to strike axis to avoid errors
232233 if reference is None and "axis_mode" not in kwargs :
233234 kwargs ["axis_mode" ] = "strike"
0 commit comments