Evo macro cycle correlation

From OpenLAIR/OpenSkill · View interactive version

Evo macro cycle correlation is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. Deflates nominal series to real values using CPI, applies log transformation and Hodrick-Prescott filter to extract cyclical components, and computes Pearson correlation between two cyclical series.

How to use this skill

Skill file

evo-macro-cycle-correlation

Deflates nominal macroeconomic series, applies HP filter for cycle extraction, and computes Pearson correlation between cyclical components.

Key Functions

`deflate_nominal_to_real(nominal, cpi)`

Converts nominal to real values: Real_t = (Nominal_t / CPI_t) * 100

`extract_hp_cycle(real_series, lamb=100)`

Applies np.log() then HP filter (statsmodels hpfilter) to extract cyclical component.

`compute_cycle_pearson_correlation(cycle1, cycle2)`

Computes Pearson r using scipy.stats.pearsonr (returns PearsonRResult.statistic)

`run_full_pipeline(pce_file, pfi_file, cpi_file, ...)`

Complete end-to-end pipeline: parse -> deflate -> HP filter -> correlate -> output.

Depends on evo-macro-data-ingestion for data parsing.

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-macro-cycle-correlation/scripts')
from utils import run_full_pipeline

correlation = run_full_pipeline(
    pce_file='/root/ERP-2025-table10.xls',
    pfi_file='/root/ERP-2025-table12.xls',
    cpi_file='/root/CPI.xlsx',
    start_year=1973,
    end_year=2024,
    hp_lambda=100,
    output_file='/root/answer.txt'
)

Technical Details

Deflation

HP Filter

Pearson Correlation

Year Range

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.