Dashboard¶
The dashboard
package contains all components for the Streamlit dashboard UI,
including the main service layer, plotting functions, and UI widgets.
plot_calendar_heatmap ¶
Plot the calandar heatmap.
Source code in src/optpricing/dashboard/plots.py
plot_error_heatmap ¶
plot_error_heatmap(
market_surface: DataFrame,
model_surface: DataFrame,
model_name: str,
) -> go.Figure
Plots a heatmap of the pricing error (Model IV - Market IV) in basis points. FIXED: Handles duplicate index entries before pivoting.
Source code in src/optpricing/dashboard/plots.py
plot_iv_surface_3d ¶
Creates an interactive, INTERPOLATED 3D plot of the volatility surfaces.
Source code in src/optpricing/dashboard/plots.py
plot_smiles_by_expiry ¶
plot_smiles_by_expiry(
market_surface: DataFrame,
model_surfaces: dict[str, DataFrame],
) -> go.Figure
Generates a robust Plotly figure with volatility smiles for key expiries.
Source code in src/optpricing/dashboard/plots.py
build_sidebar ¶
Builds the consistent sidebar for the dashboard and returns the selections.
Uses st.query_params to manage state for deep-linking.
Returns:
Type | Description |
---|---|
tuple[str, str, str]
|
A tuple containing the selected ticker, snapshot_date, and model_name. |