Daily Workflow#
Orchestrates the calibration of a single model for a single snapshot of market data.
This class encapsulates the entire process for a given day: 1. Fits market-implied risk-free rate (r) and dividend yield (q). 2. Prepares initial parameter guesses, optionally using historical data. 3. Calibrates the model to front-month options. 4. Evaluates the calibrated model's performance (RMSE) on the full option chain.
Source code in src/quantfin/workflows/daily_workflow.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
__init__(market_data: pd.DataFrame, model_config: dict[str, Any])
#
Initializes the daily workflow.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
market_data
|
DataFrame
|
A DataFrame containing the option chain for a single snapshot date. |
required |
model_config
|
dict[str, Any]
|
A dictionary defining how to calibrate the model. |
required |
Source code in src/quantfin/workflows/daily_workflow.py
run()
#
Executes the full calibration and evaluation workflow.
This method performs all steps in sequence and populates the self.results
dictionary with the outcome, including status, calibrated parameters,
and final RMSE. It includes error handling to ensure the workflow
doesn't crash on failure.