# Portfolio Concentration Calculator MCP for AI Agents AI Agent Connect

> Portfolio Concentration Calculator MCP lets you measure investment risk by calculating Herfindahl-Hirschman Index (HHI) scores. It breaks down your holdings by asset type, industry sector, and geographic location to show exactly where you're over-exposed. Use it to spot hidden risks in your portfolio that simple diversification checks might miss.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_9gAr5PLZDGUpNesjXjAILhS4kXAUNlbN4JqUiHQz/ai-agent-connect
- **Tags:** hhi, portfolio, diversification, investment, risk

## Description

This Connector provides a specialized engine for analyzing portfolio diversification. It handles the heavy lifting of calculating Herfindahl-Hirschman Index (HHI) scores across different categories like geography or industry. If the numbers show you're too concentrated in one area, it suggests specific ways to rebalance. You'll get actionable advice on where to move capital to actually lower your risk profile. It's one of the many specialized tools in the Vinkius catalog that turns raw financial data into a clear risk strategy. Instead of staring at a spreadsheet of percentages, you get a clear "Concentrated" or "Diversified" status and a plan to fix it. You can ask your AI client to analyze your current holdings and get back a clear picture of your concentration risk. It takes the manual work out of auditing your assets. You no longer have to manually sort every ticker into a sector or check which countries your holdings are tied to. The Connector processes those attributes and gives you a mathematical breakdown of your exposure. It's built for people who want to move past simple diversification and into actual risk management. Because Vinkius hosts it, you can connect it to your favorite AI client and start auditing your investments immediately.

## Tools

### calculate_concentration_metrics
This tool computes your portfolio's HHI scores across different dimensions. It tells you exactly how concentrated your assets are in specific sectors or regions.

### validate_portfolio_data
This tool checks your input data for mathematical errors. It ensures your weights are correct before you run any risk analysis.

### get_diversification_recommendation
This tool provides specific advice on how to rebalance your holdings. It suggests industries or geographies to target to lower your risk.

## Prompt Examples

**Prompt:** 
```
I have 50% in Apple, 30% in Microsoft, and 20% in Tesla. What's my concentration risk?
```

**Response:** 
```
### Portfolio Risk Analysis

Based on your holdings, here is the concentration breakdown:

| Dimension | HHI Score | Status |
| :--- | :--- | :--- |
| **Technology Sector** | 0.34 | **Concentrated** |
| **USA Geography** | 1.00 | **Highly Concentrated** |

**Summary:** Your portfolio is heavily weighted toward the US tech market. You may want to consider diversifying into other industries or international markets.
```

**Prompt:** 
```
My tech sector concentration is too high. How do I fix it?
```

**Response:** 
```
To reduce your risk in the technology sector, consider the following rebalancing steps:

*   **Reduce Weight:** Trim positions in your largest tech holdings (e.g., Apple and Microsoft).
*   **Reallocate to Healthcare:** Consider moving 10-15% of your tech weight into the healthcare sector.
*   **Diversify Geography:** Look for international equities to balance your US-heavy exposure.

These moves will help lower your overall HHI score while maintaining your investment goals.
```

**Prompt:** 
```
Check these weights: 0.5 Tech/USA, -0.1 Energy/UK. Is this okay?
```

**Response:** 
```
❌ **Validation Failed**

I found an error in your portfolio data:
*   **Asset:** Energy / UK
*   **Issue:** The weight provided is **-0.1**. 

Weights must be positive values. Please correct this entry before I can run the concentration analysis for you.
```

## Capabilities

### Calculate HHI scores
Computes concentration metrics for your portfolio across asset, sector, and geography dimensions.

### Get rebalancing advice
Provides specific suggestions on how to redistribute weight to reduce concentration risk.

### Validate portfolio data
Checks your input data for mathematical errors like negative weights before you run analysis.

### Identify geographic clusters
Flags over-exposure to specific countries or regions within your investment holdings.

### Generate diversification ratings
Assigns a clear rating to your portfolio based on its concentration in various industries.

## Use Cases

### Spotting Sector Overexposure
A wealth manager notices a client is 40% in tech. They ask the agent to calculate HHI scores to see if it meets risk limits and identify which specific stocks are driving that concentration.

### Geographic Risk Audit
An analyst wants to see if a global fund is too US-heavy. The agent uses the tool to find the geographic concentration and provides a rating on how balanced the fund really is.

### Rebalancing a Concentrated Portfolio
An investor has too much in one industry. They ask for specific recommendations on how to redistribute that weight into underrepresented sectors like healthcare or energy.

### Validating Data Imports
A user pulls a CSV of holdings and wants to make sure the weights add up correctly before running a full risk analysis. The agent validates the numbers to prevent errors.

## Benefits

- Stop doing manual math. Use calculate_concentration_metrics to get instant HHI scores for any number of holdings, saving you from tedious spreadsheet work.
- Identify hidden risks. See exactly where you're over-exposed in specific sectors or countries without digging through rows of data.
- Get actionable advice. Use get_diversification_recommendation to find out exactly where to move capital to lower your risk and improve your balance.
- Ensure data accuracy. Run validate_portfolio_data first to make sure your input weights are correct and won't break your analysis.
- Speed up reporting. Generate risk ratings for multiple portfolios in seconds instead of hours of manual auditing for your clients.

## How It Works

The bottom line is you get an instant risk audit and a clear plan to balance your investments.

1. Provide your portfolio data to your AI client, including asset names, weights, sectors, and locations.
2. The Connector processes the data to calculate concentration metrics and risk scores.
3. You receive a summary of your risk levels along with specific rebalancing suggestions.

## Frequently Asked Questions

**What does HHI mean for my portfolio?**
HHI is a standard way to measure how concentrated your investments are. It helps you see if you're too heavy in one area, like a specific industry or country, rather than just looking at the number of stocks you own.

**How does the Portfolio Concentration Calculator help with diversification?**
It gives you a clear rating on your risk. It shows if you're over-concentrated in one sector or geography, helping you see where your portfolio is actually vulnerable.

**Can I use this for international stocks?**
Yes, it handles geographic dimensions. You can see how much of your portfolio is tied to specific countries and identify if you're too exposed to one region.

**How do I know if I'm too heavy in one industry?**
The tool calculates your industry concentration automatically. It tells you if you're over-exposed to things like tech or energy by providing a clear HHI score.

**Does this give me specific buy/sell advice?**
It provides diversification recommendations. It suggests where to move money to balance your portfolio based on your current concentration levels.

**Is this tool good for large institutional portfolios?**
Yes, it's built to handle large amounts of data. It's great for auditing many holdings at once to find hidden risks in large-scale investments.

**How do I make sure my portfolio data is correct?**
You can use the validation tool. It checks your weights to make sure the math is sound before you run your concentration analysis.

**What is the Herfindahl-Hirschman Index (HHI)?**
The HHI is a standard economic metric used to measure market or portfolio concentration. It is calculated by squaring the weight of each component and summing the results.

**How can I identify which part of my portfolio is too concentrated?**
You can use the `calculate_concentration_metrics` tool to see HHI scores and ratings for assets, sectors, and geographies. If a dimension shows a 'Concentrated' rating, it indicates high risk.

**Does the tool provide advice on how to fix concentration?**
Yes, by using the `get_diversification_recommendation` tool, you can receive specific instructions on which sectors or regions to reduce exposure to in order to improve diversification.