gcubed.reporting.intx_starting_points

Report equation-consistent starting-point candidates for database INTX values.

INTX_STARTING_POINT_REPORT_FILENAME = 'intx database starting point candidates.csv'
REPORT_COLUMNS: list[str] = ['region', 'linearisation_year', 'intn_variable', 'intx_variable', 'intn_database_source_year', 'intx_database_source_year', 'observed_intn_percentage_points', 'current_database_intx_percentage_points', 'rule_implied_intn_with_current_intx_percentage_points', 'rule_implied_intn_with_zero_intx_percentage_points', 'current_intx_rule_contribution_percentage_points', 'equation_residual_with_current_intx_percentage_points', 'local_intx_coefficient', 'suggested_database_intx_starting_point_percentage_points', 'suggested_change_from_current_database_intx_percentage_points', 'equation_residual_after_candidate_percentage_points', 'candidate_closes_equation', 'policy_rate_scale_percentage_points', 'candidate_magnitude_relative_to_policy_rate_scale', 'lagged_nominal_rate_percentage_points', 'inflation_target_percentage_points', 'inflation_rate_input_percentage_points', 'inflation_gap_percentage_points', 'output_growth_input_percentage_points', 'potential_output_growth_percentage_points', 'output_growth_gap_percentage_points', 'configured_neutral_real_rate_percentage_points', 'configured_neutral_nominal_anchor_percentage_points', 'review_priority', 'judgement_note']
def intx_starting_point_report( linear_model: gcubed.linearisation.linear_model.LinearModel, linearisation_database: gcubed.data.linearisation_database.LinearisationDatabase) -> pandas.DataFrame:

Calculate a local equation-consistent INTX candidate for every region.

The generated monetary-policy equation is evaluated using observed database RHS values, including observed current and lagged nominal rates. A central finite difference measures the local coefficient on each region's INTX. One Newton step then gives the INTX value that would align the rule-implied INTN with observed INTN, holding all other inputs fixed.

The result is a diagnostic starting point only. It deliberately reports scale and closure evidence rather than applying any database adjustment.

def write_intx_starting_point_report( linear_model: gcubed.linearisation.linear_model.LinearModel, linearisation_database: gcubed.data.linearisation_database.LinearisationDatabase) -> pandas.DataFrame:

Write and return the standard INTX database starting-point report.