000-docs/000a-planned-skills/prediction-markets/nixtla-correlation-mapper/SKILL.md
Analyzes multi-contract correlations and generates hedge recommendations. Use when managing a portfolio of correlated assets and needing to mitigate risk. Trigger with "analyze correlations", "suggest hedge", "portfolio risk assessment".
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:
tools
This skill assists with managing database sharding strategies. It is activated when the user needs to implement horizontal database sharding to scale beyond single-server limitations. The skill supports designing sharding strategies, distributing data across multiple database instances, and implementing consistent hashing, automatic rebalancing, and cross-shard query coordination. Use this skill when the user mentions "database sharding", "sharding implementation", "scale database", or "horizontal partitioning". The plugin helps design and implement sharding for high-scale applications.
tools
This skill enables Claude to perform comprehensive database security scans using the database-security-scanner plugin. It is triggered when the user requests a security assessment of a database, including identifying vulnerabilities like weak passwords, SQL injection risks, and insecure configurations. The skill leverages OWASP guidelines to ensure thorough coverage and provides remediation suggestions. Use this skill when the user asks to "scan database security", "check database for vulnerabilities", "perform OWASP compliance check on database", or "assess database security posture". The plugin supports PostgreSQL and MySQL.
testing
This skill enables Claude to design and visualize database schemas. It leverages normalization guidance (1NF through BCNF), relationship mapping, and ERD generation to create efficient and well-structured databases. Use this skill when the user requests to "design a database schema", "create a database model", "generate an ERD", "normalize a database", or needs help with "database design best practices". The skill is triggered by terms like "database schema", "ERD diagram", "database normalization", and "relational database design".
tools
This skill enables Claude to manage database replication, failover, and high availability configurations using the database-replication-manager plugin. It is designed to assist with tasks such as setting up master-slave replication, configuring automatic failover, monitoring replication lag, and implementing read scaling. Use this skill when the user requests help with "database replication", "failover configuration", "high availability", "replication lag", or "read scaling" for databases like PostgreSQL or MySQL. The plugin facilitates both physical and logical replication strategies.