003-skills/.claude/skills/nixtla-correlation-mapper/SKILL.md
Analyze multi-contract correlations for forecast-based hedge recommendations. Use when managing correlated assets. Trigger with 'analyze correlations' or 'suggest hedge'.
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-correlation-mapperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Identifies correlations between multiple contracts and generates hedging strategies for portfolio risk management.
Analyzes relationships between assets in a portfolio to suggest hedging strategies. Takes CSV data with multiple time series, calculates correlation matrix, identifies significant relationships, and outputs hedge recommendations with visualizations. Generates correlation heatmap, rolling correlation plots, and hedge effectiveness charts.
Tools: Read, Write, Bash, Glob, Grep
Environment: None required (optional: NIXTLA_TIMEGPT_API_KEY for forecasted correlations)
Packages:
pip install pandas numpy scipy matplotlib seaborn
Input Format: CSV with columns: unique_id (contract identifier), ds (date), y (price/value)
Load multi-series contract data and calculate returns. Uses {baseDir}/scripts/prepare_data.py.
python scripts/prepare_data.py contracts.csv --method log --output-dir results/
Output: prices_wide.csv, returns.csv
Calculate correlation matrix and identify significant pairs. Uses {baseDir}/scripts/correlation_analysis.py.
python scripts/correlation_analysis.py \
--returns results/returns.csv \
--method pearson \
--threshold 0.5 \
--rolling-window 30 \
--output-dir results/
Output: correlation_matrix.csv, correlation_pvalues.csv, high_correlations.json, rolling_correlations.csv
Calculate optimal hedge ratios using regression or minimum variance methods. Uses {baseDir}/scripts/hedge_recommendations.py.
python scripts/hedge_recommendations.py \
--returns results/returns.csv \
--correlation results/correlation_matrix.csv \
--method ols \
--top-n 10 \
--portfolio-value 100000 \
--output-dir results/
Output: hedge_recommendations.csv, hedge_recommendations.json, hedged_portfolio.csv
Generate correlation heatmap, rolling correlation plot, and hedge effectiveness chart. Uses {baseDir}/scripts/visualize.py.
python scripts/visualize.py \
--correlation results/correlation_matrix.csv \
--rolling results/rolling_correlations.csv \
--recommendations results/hedge_recommendations.json \
--output-dir results/ \
--top-n 5
Output: correlation_heatmap.png, rolling_correlation.png, hedge_effectiveness.png
Create comprehensive markdown report with all analysis results. Uses {baseDir}/scripts/generate_report.py.
python scripts/generate_report.py \
--correlation results/correlation_matrix.csv \
--high-correlations results/high_correlations.json \
--recommendations results/hedge_recommendations.json \
--output results/correlation_report.md
Output: correlation_report.md
Error: Input file not found
ls -laError: Missing required columns
unique_id, ds, y columnsError: Insufficient data points
Error: Invalid data format
y values are numeric (not strings)Error: Insufficient contracts
unique_id column has multiple distinct valuesInput (portfolio.csv):
unique_id,ds,y
BTC,2024-01-01,42000
ETH,2024-01-01,2200
BTC,2024-01-02,42500
ETH,2024-01-02,2250
Workflow:
python scripts/prepare_data.py portfolio.csv
python scripts/correlation_analysis.py
python scripts/hedge_recommendations.py
python scripts/visualize.py
python scripts/generate_report.py
Result: Correlation 0.85 between BTC-ETH, hedge ratio -0.95, variance reduction 72%
Input: 5 election-related prediction market contracts
Command:
python scripts/prepare_data.py elections.csv --output-dir election_analysis/
python scripts/correlation_analysis.py --threshold 0.7 --output-dir election_analysis/
python scripts/hedge_recommendations.py --top-n 5 --output-dir election_analysis/
python scripts/visualize.py --output-dir election_analysis/
python scripts/generate_report.py --output election_analysis/report.md
Result: Identified 3 pairs with correlation > 0.7, top hedge reduces variance by 62%
Scripts: All analysis scripts located in {baseDir}/scripts/
prepare_data.py: Data loading, pivoting, returns calculationcorrelation_analysis.py: Correlation matrix, p-values, rolling correlationshedge_recommendations.py: Hedge ratios, portfolio allocationvisualize.py: Heatmaps, rolling plots, effectiveness chartsgenerate_report.py: Comprehensive markdown reportCorrelation Methods: Pearson (linear), Spearman (rank-based), Kendall (concordance)
Hedge Methods: OLS regression (standard), Minimum variance (risk-minimizing)
Interpretation:
testing
This skill enables Claude to manage isolated test environments using Docker Compose, Testcontainers, and environment variables. It is used to create consistent, reproducible testing environments for software projects. Claude should use this skill when the user needs to set up a test environment with specific configurations, manage Docker Compose files for test infrastructure, set up programmatic container management with Testcontainers, manage environment variables for tests, or ensure cleanup after tests. Trigger terms include "test environment", "docker compose", "testcontainers", "environment variables", "isolated environment", "env-setup", and "test setup".
tools
This skill uses the test-doubles-generator plugin to automatically create mocks, stubs, spies, and fakes for unit testing. It analyzes dependencies in the code and generates appropriate test doubles based on the chosen testing framework, such as Jest, Sinon, or others. Use this skill when you need to generate test doubles, mocks, stubs, spies, or fakes to isolate units of code during testing. Trigger this skill by requesting test double generation or using the `/gen-doubles` or `/gd` command.
tools
This skill enables Claude to generate realistic test data for software development. It uses the test-data-generator plugin to create users, products, orders, and custom schemas for comprehensive testing. Use this skill when you need to populate databases, simulate user behavior, or create fixtures for automated tests. Trigger phrases include "generate test data", "create fake users", "populate database", "generate product data", "create test orders", or "generate data based on schema". This skill is especially useful for populating testing environments or creating sample data for demonstrations.
development
This skill analyzes code coverage metrics to identify untested code and generate comprehensive coverage reports. It is triggered when the user requests analysis of code coverage, identification of coverage gaps, or generation of coverage reports. The skill is best used to improve code quality by ensuring adequate test coverage and identifying areas for improvement. Use trigger terms like "analyze coverage", "code coverage report", "untested code", or the shortcut "cov".