├── .gitattributes ├── Dati ├── 6M │ ├── EUR6MFRA=.xlsm │ ├── EURAB6EIRS=.xlsm │ └── EURAB6EIRSZ=FMD.xlsm ├── EUESTECBF=ICAP.xlsm ├── EUR3MFRA=.xlsm ├── EURAB3EIRS=.xlsm ├── EURDEPO=.xlsm ├── EURESTOIS=.xlsm ├── FUTURE3M.xlsm └── txt files │ ├── 3MFUTURE.txt │ ├── 6M │ ├── EUR6MFRA=.txt │ ├── EURAB6EIRS=.txt │ └── EURAB6EIRSZ=FMD.txt │ ├── EUESTECBF=ICAP.txt │ ├── EUR3MFRA=.txt │ ├── EURAB3EIRS=.txt │ ├── EURDEPO=.txt │ └── EURESTOIS=.txt ├── MainNotebook.ipynb ├── README.txt ├── Thesis_Lorenzo_Gallina.pdf ├── figures ├── 3mvs6m.png ├── 6m wrong.png ├── different sets.png ├── dual curve.png ├── estr_overnight.png ├── estr_zero.png ├── only no synth 3m.png ├── single vs dual forward.png ├── single vs dual zero.png ├── spreadsimulation.png ├── synth-nosynth.png └── synthoverlapping.png └── other ├── Old script.ipynb └── Shift_function_not_used.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Dati/6M/EUR6MFRA=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/6M/EUR6MFRA=.xlsm -------------------------------------------------------------------------------- /Dati/6M/EURAB6EIRS=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/6M/EURAB6EIRS=.xlsm -------------------------------------------------------------------------------- /Dati/6M/EURAB6EIRSZ=FMD.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/6M/EURAB6EIRSZ=FMD.xlsm -------------------------------------------------------------------------------- /Dati/EUESTECBF=ICAP.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/EUESTECBF=ICAP.xlsm -------------------------------------------------------------------------------- /Dati/EUR3MFRA=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/EUR3MFRA=.xlsm -------------------------------------------------------------------------------- /Dati/EURAB3EIRS=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/EURAB3EIRS=.xlsm -------------------------------------------------------------------------------- /Dati/EURDEPO=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/EURDEPO=.xlsm -------------------------------------------------------------------------------- /Dati/EURESTOIS=.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/EURESTOIS=.xlsm -------------------------------------------------------------------------------- /Dati/FUTURE3M.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/FUTURE3M.xlsm -------------------------------------------------------------------------------- /Dati/txt files/3MFUTURE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/3MFUTURE.txt -------------------------------------------------------------------------------- /Dati/txt files/6M/EUR6MFRA=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/6M/EUR6MFRA=.txt -------------------------------------------------------------------------------- /Dati/txt files/6M/EURAB6EIRS=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/6M/EURAB6EIRS=.txt -------------------------------------------------------------------------------- /Dati/txt files/6M/EURAB6EIRSZ=FMD.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/6M/EURAB6EIRSZ=FMD.txt -------------------------------------------------------------------------------- /Dati/txt files/EUESTECBF=ICAP.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/EUESTECBF=ICAP.txt -------------------------------------------------------------------------------- /Dati/txt files/EUR3MFRA=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/EUR3MFRA=.txt -------------------------------------------------------------------------------- /Dati/txt files/EURAB3EIRS=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/EURAB3EIRS=.txt -------------------------------------------------------------------------------- /Dati/txt files/EURDEPO=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/EURDEPO=.txt -------------------------------------------------------------------------------- /Dati/txt files/EURESTOIS=.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Dati/txt files/EURESTOIS=.txt -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | ## Multiple Curve Construction Study - €STR and Euribor 2 | 3 | ### Table of Contents 4 | - Overview 5 | - Section 1: Data Import and Preparation 6 | - Section 2: Convert Maturities and Set Evaluation Date 7 | - Section 3: Building the €STR Discount Curve 8 | - Section 4: ECB Liquidity Check for Short-Term Rate Analysis 9 | - Section 5: Construction of the 3-Month Euribor Curve - No Synthetic Deposits 10 | - Section 6: Calculation of Basis and Creation of Synthetic Deposits 11 | - Section 7: Construction of the Euribor3M Forward Curve with Synthetic Deposits 12 | - Section 8: Comparing Forward Euribor Curves With and Without Synthetic Deposits 13 | - Section 9: Comparison of Dual Curve and Single Euribor3M Forward Curves - Discounting Impact 14 | - Section 10: Construction of the Euribor6M Forward Curve and Comparison with the Euribor3M Forward Curve - The Importance of Being Tenor Consistent 15 | - Section 11: Constructing and Evaluating Euribor3M Forward Curves via Diverse Bootstrapping Instrument Configurations 16 | - Section 12: Stability Assessment of Bootstrapping Sets 17 | 18 | ### Overview 19 | This study constructs multiple interest rate curves for €STR and Euribor using various instrument sets. The methodology is based on Ametrano and Bianchetti’s work, implemented in Python with QuantLib. Data is sourced as a snapshot from Refinitiv, up-to-date as of July 13, 2024. 20 | 21 | ### Section 1: Data Import and Preparation 22 | This section imports necessary libraries and reads data from specified files. The data is processed to calculate mid rates. 23 | 24 | ### Section 2: Convert Maturities and Set Evaluation Date 25 | Functions are defined to convert maturity strings into QuantLib periods, process the dataset, and set the evaluation date for calculations. 26 | 27 | ### Section 3: Building the €STR Discount Curve 28 | This section builds the €STR discount curve using selected deposits, OIS pre-ECB, forward OIS ECB, and OIS post-ECB data, with an option to visualize the yield curve. 29 | 30 | ### Section 4: ECB Liquidity Check for Short-Term Rate Analysis 31 | We analyze short-term rate changes by using flat forward rates and comparing €STR forward rates with ECB forward rates to detect potential liquidity jumps. 32 | 33 | ### Section 5: Construction of the 3-Month Euribor Curve - No Synthetic Deposits 34 | This section constructs the 3-month Euribor curve without synthetic deposits, including FRA, futures, and swap rate helpers. 35 | 36 | ### Section 6: Calculation of Basis and Creation of Synthetic Deposits 37 | We calculate the basis (spread) between the forward 3-month Euribor and €STR rates, and create synthetic deposit helpers for accurate Euribor curve construction. 38 | 39 | ### Section 7: Construction of the Euribor3M Forward Curve with Synthetic Deposits 40 | This section builds the Euribor3M forward curve using synthetic deposits, FRA, futures, and swaps, and visualizes the resulting forward rates. 41 | 42 | ### Section 8: Comparing Forward Euribor Curves With and Without Synthetic Deposits 43 | A detailed analysis comparing forward Euribor curves with and without synthetic deposits, focusing on short-term rate projections and basis point differences. 44 | 45 | ### Section 9: Comparison of Dual Curve and Single Euribor3M Forward Curves - Discounting Impact 46 | We construct Euribor curves using both dual and single curve approaches, comparing zero and forward rates to highlight differences in future rate expectations. 47 | 48 | ### Section 10: Construction of the Euribor6M Forward Curve and Comparison with the Euribor3M Forward Curve - The Importance of Being Tenor Consistent 49 | This section constructs the Euribor6M forward curve and compares it with the Euribor3M forward curve to identify differences between the two. 50 | 51 | ### Section 11: Constructing and Evaluating Euribor3M Forward Curves via Diverse Bootstrapping Instrument Configurations 52 | We develop and evaluate Euribor3M forward curves using various bootstrapping configurations, comparing structural variations and rate projections. 53 | 54 | ### Section 12: Stability Assessment of Bootstrapping Sets 55 | This section assesses the stability of Euribor3M forward curve bootstrapping sets under simulated market shocks, analyzing tracking errors and curve sensitivity. 56 | 57 | 58 | -------------------------------------------------------------------------------- /Thesis_Lorenzo_Gallina.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/Thesis_Lorenzo_Gallina.pdf -------------------------------------------------------------------------------- /figures/3mvs6m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/3mvs6m.png -------------------------------------------------------------------------------- /figures/6m wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/6m wrong.png -------------------------------------------------------------------------------- /figures/different sets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/different sets.png -------------------------------------------------------------------------------- /figures/dual curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/dual curve.png -------------------------------------------------------------------------------- /figures/estr_overnight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/estr_overnight.png -------------------------------------------------------------------------------- /figures/estr_zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/estr_zero.png -------------------------------------------------------------------------------- /figures/only no synth 3m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/only no synth 3m.png -------------------------------------------------------------------------------- /figures/single vs dual forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/single vs dual forward.png -------------------------------------------------------------------------------- /figures/single vs dual zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/single vs dual zero.png -------------------------------------------------------------------------------- /figures/spreadsimulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/spreadsimulation.png -------------------------------------------------------------------------------- /figures/synth-nosynth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/synth-nosynth.png -------------------------------------------------------------------------------- /figures/synthoverlapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MITRIDAT3/Multiple-Curve-Construction-Study/1fb189108b27f044486296a398588e009b05713e/figures/synthoverlapping.png -------------------------------------------------------------------------------- /other/Shift_function_not_used.py: -------------------------------------------------------------------------------- 1 | ois_data = [] 2 | deposit_data = [] 3 | fra_data3M = [] 4 | forwards_ois_ecb_data = [] 5 | swap_data3M = [] 6 | futures_data3M = [] 7 | settle_date = ql.Date(1, 1, 2020) 8 | 9 | 10 | 11 | 12 | 13 | 14 | # Define Shifts and Pivot Dates 15 | shift_start = -0.5 16 | shift_end = -0.1 17 | 18 | # Function to interpolate shifts smoothly between pivot dates 19 | def smooth_interpolation(maturity_date, shift_start, shift_end, settle_date, last_date): 20 | total_days = (last_date - settle_date) 21 | days_to_maturity = (maturity_date - settle_date) 22 | shift = shift_start + (shift_end - shift_start) * (days_to_maturity / total_days) 23 | return shift 24 | 25 | # Function to Apply Shocks to Data 26 | def apply_shock(data, shift_start, shift_end, settle_date, last_date, is_futures=False): 27 | shifted_data = data.copy() 28 | for index, row in shifted_data.iterrows(): 29 | maturity_date = row['Maturity_Date'] 30 | shift = smooth_interpolation(maturity_date, shift_start, shift_end, settle_date, last_date) 31 | 32 | if is_futures: 33 | shifted_data.at[index, 'Mid_Rate'] -= shift 34 | else: 35 | shifted_data.at[index, 'Mid_Rate'] += shift 36 | return shifted_data 37 | 38 | 39 | # Add Maturity Dates to Data 40 | ois_data['Maturity_Date'] = ois_data['Period'].apply(lambda x: ql.TARGET().advance(settle_date, x)) 41 | deposit_data['Maturity_Date'] = deposit_data['Period'].apply(lambda x: ql.TARGET().advance(settle_date, x)) 42 | fra_data3M['Maturity_Date'] = fra_data3M['Start_Period'].apply(lambda x: ql.TARGET().advance(settle_date, x)) 43 | forwards_ois_ecb_data['Maturity_Date'] = forwards_ois_ecb_data['Start_Period'] 44 | swap_data3M['Maturity_Date'] = swap_data3M['Period'].apply(lambda x: ql.TARGET().advance(settle_date, x)) 45 | futures_data3M['Maturity_Date'] = futures_data3M['Start_Date'] 46 | 47 | # Get Last Maturity Date 48 | all_maturities = pd.concat([ 49 | ois_data['Maturity_Date'], 50 | deposit_data['Maturity_Date'], 51 | fra_data3M['Maturity_Date'], 52 | forwards_ois_ecb_data['Maturity_Date'], 53 | swap_data3M['Maturity_Date'], 54 | futures_data3M['Maturity_Date'] 55 | ]) 56 | last_date = all_maturities.max() 57 | 58 | # Apply Shocks to Data 59 | s_ois_data = apply_shock(ois_data, shift_start, shift_end, settle_date, last_date) 60 | s_deposit_data = apply_shock(deposit_data, shift_start, shift_end, settle_date, last_date) 61 | s_fra_data3M = apply_shock(fra_data3M, shift_start, shift_end, settle_date, last_date) 62 | s_forwards_ois_ecb_data = apply_shock(forwards_ois_ecb_data, shift_start, shift_end, settle_date, last_date) 63 | s_swap_data3M = apply_shock(swap_data3M, shift_start, shift_end, settle_date, last_date) 64 | s_futures_data3M = apply_shock(futures_data3M, shift_start, shift_end, settle_date, last_date, is_futures=True) 65 | --------------------------------------------------------------------------------