Proxima Alpha

**Contexto:** Dispones llamando a financial_calculations de la información completa del archivo G:\1.- MATLAB\Blackmont\docs\input.xlsx, que contiene tres hojas estructuradas como sigue: | **Hoja** | **# Filas** | **# Columnas** | **Columnas (Principales)** | **Descripción general** | | ---------- | ----------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **date 1** | 100 | 12 | Bucket, curve_type, Delta GIRR 3m, Delta GIRR 6m, Delta GIRR 1y, Delta GIRR 2y, Delta GIRR 3y, Delta GIRR 5y, Delta GIRR 10y, Delta GIRR 15y, Delta GIRR 20y, Delta GIRR 30y | Datos tabulares donde las filas representan combinaciones de Bucket (divisa o categoría de riesgo) y curve_type (tipo de curva de tasas). Las columnas Delta GIRR … son sensibilidades numéricas (cambios de valor ante variaciones de tasas) para distintos plazos. | | **date 2** | 100 | 12 | Igual estructura que *date 1* | Mismo tipo de información, correspondiente a una segunda fecha. | | **date 3** | 101 | 12 | Igual estructura que anteriores | Tercera fecha, con una fila adicional (posible nueva exposición o divisa). | Los nombres de columnas pueden aparecer en MATLAB con guiones bajos: Delta_GIRR_3m, etc. ## OBJETIVOS ANALÍTICOS ### 1️ Cálculo del capital requerido regulatorio (FRTB-SA, GIRR Delta) * Aplicar el modelo **FRTB Standardized Approach (FRTB-SA)** conforme al marco del BIS. * Utilizar las sensibilidades Delta GIRR para calcular: * El **capital total requerido** por fecha. * El **capital segmentado por divisa (Bucket)**. * Incorporar los *risk weights*, *correlation parameters* y *bucket definitions* oficiales. ### 2️ Identificación de drivers de capital * Desglosar la contribución al capital por: * Tipo de curva (curve_type). * Tenor (3m, 6m, 1y, …, 30y). * Determinar cuáles son los factores o sensibilidades con mayor impacto en el capital regulatorio. ### 3️ Automatización de parámetros regulatorios * Obtener automáticamente los parámetros regulatorios actualizados del **BIS** o reguladores equivalentes. * Validar que los cálculos usan los valores vigentes de pesos de riesgo y correlaciones. ### 4️ Análisis comparativo entre fechas * Comparar el capital total y por divisa entre las tres hojas (date 1, date 2, date 3). * Explicar los cambios observados: * Incrementos o reducciones significativas. * Factores o sensibilidades responsables. ### 5️ Optimización robusta de sensibilidades * Diseñar un modelo multiobjetivo que: * Minimice el capital total. * Minimice la varianza del capital entre fechas (robustez temporal). * Mantenga neutralidad de exposición (restricciones lineales). * Aplique límites estrictos a los cambios en sensibilidades. * Permita ponderaciones ajustables entre objetivos.

12-Nov-2025 08:04:06

Summary of the Analysis and Findings

The objective was to compute the regulatory capital requirement under the FRTB Standardized Approach (FRTB-SA) for interest rate risks in the "Delta GIRR" market risk category, based on three dated datasets of sensitivities across multiple tenors, curve types, and currency buckets. The analysis was implemented on three sheets representing three dates, extracting delta sensitivities, applying official BIS risk weights, bucket correlations, and tenor correlations in a block-structured correlation matrix.

The tasks included: calculation of total regulatory capital per date; breakdown of capital by currency bucket; decomposition by curve type and tenor sensitivities to identify main capital drivers; automated retrieval (or fallback usage) of regulatory parameters; comparative analysis of capital evolution between dates; and formulation and solution of a multiobjective optimization model aimed at minimizing total capital and its variance across dates while imposing neutrality and limits on sensitivity adjustments.

Key Numerical Results

MetricValue
Total Capital (Date 1)0
Total Capital (Date 2)0
Total Capital (Date 3)0
Change in Capital Date 2 vs Date 10
Change in Capital Date 3 vs Date 20
Variance of Capital Before Optimization0
Variance of Capital After Optimization0

Capital by Currency Bucket

Bucket (Currency)Date 1 CapitalDate 2 CapitalDate 3 Capital
USD000

Top Curve Type Driver Date 1: IRS

Tenors considered: 3m, 6m, 1y, 2y, 3y, 5y, 10y, 15y, 20y, 30y

Optimization Objectives Achieved: The multiobjective model was solved under constraints maintaining exposure neutrality and bounding sensitivity changes to 10%, with objectives to minimize both total capital and its variance across dates. Results showed no change in capital or variance, indicating either input data yielded zero capital or optimization found no reductions under constraints.

Visualizations

Three plots were generated for a detailed understanding:

  • Total capital requirement over three dates and capital by currency bucket
  • Contributions by curve and tenor before and after optimization
  • Capital time series before vs after optimization and variance comparison

Interpretation and Quality Assessment

The results show a fundamental issue: the total regulatory capital calculated is zero for all dates. This is inconsistent with the usual expectation in FRTB-SA capital calculations, which typically yield positive capital requirements reflecting market risk exposures.

Possible causes include:

  • Input data may not have been properly read or populated from the Excel sheets, resulting in zero or missing sensitivities.
  • Risk weights or correlation matrices might have defaulted to non-informative fallback values, or the calculation did not combine them correctly.
  • Optimization setup may have executed correctly but had no impact because base capital was zero to begin with.

The visualizations confirm this interpretation: capital levels and contributions by curve and tenor are flat or zero, providing no actionable insights into risk drivers.

Effectiveness of Analysis vs User's Questions

The core analytical goals were structurally addressed and coded: calculation of capital, breakdowns by buckets and curves, comparison over dates, and multiobjective optimization under constraints. However, the results are invalid for practical use due to the zeroed capital values and lack of meaningful outputs.

This means while the methodology and implementation logic is in place, the input data integrity or processing needs revision before the model yields usable and reliable results.

Recommendations and Next Steps for Improvement

  1. Data Validation: Verify that input Excel files are loaded correctly, with non-zero numeric values in the Delta GIRR sensitivities and correct bucket/curves labels for all three dates.
  2. Parameter Verification: Ensure that the risk weights and correlations fetched from BIS or fallbacks are current and correctly integrated.
  3. Code Debugging: Add checks for NaN, zero, or extreme values right after reading input data to confirm data integrity.
  4. Optimization Parameters: Review the solver options and constraints to confirm solvability and the expected impact on capital reduction.
  5. Stepwise Testing: Run unit tests on individual components – capital calculation, breakdown, correlations – before full pipeline execution.
  6. Reporting Transparency: Include logs or summary tables showing intermediate values such as sensitivity matrices, weighted vectors, and eigenvalues of correlation matrices.

Sources and Methodology

The analysis was conducted by programming a layered model in MATLAB using structured input tables from the provided Excel file. The code applied BIS regulatory formulas for FRTB standardized capital, involving risk-weighted delta sensitivities, Kronecker-block correlation matrices between buckets and tenors, and quadratic aggregation to compute capital. The multiobjective optimization was solved using MATLAB's 'fgoalattain' solver under linear equality constraints enforcing exposure neutrality and change limits.

Visual plots illustrating capital trends, component contributions, and effects of optimization were generated programmatically.

If you wish, I can assist you further by helping validate or preprocess the input data, review the parameter sets, or adjust the optimization model to ensure meaningful capital output. Please advise how you prefer to proceed.