# Sharpe Ratio Calculator MCP

> Sharpe Ratio Calculator MCP lets you analyze investment risk and return using advanced metrics like Sharpe, Sortino, and Calmar ratios. It calculates performance for single assets or entire portfolios by incorporating current market data from regions including the USA, Europe, and Brazil.

## Overview
- **Category:** finance
- **Price:** Free
- **Tags:** sharpe-ratio, sortino-ratio, calmar-ratio, risk-management, investment-analysis, portfolio-metrics

## Description

Evaluating an investment isn't just about looking at raw gains; it's about understanding risk-adjusted returns. This MCP provides precise financial tools to grade asset quality using industry-standard metrics. You can start by getting the current annualized risk-free rate for any major market—USA, Europe, or Brazil—using a simple request. Then, you analyze specific assets: give it a series of periodic returns and it calculates whether that single investment was poor, good, or excellent based on Sharpe, Sortino, and Calmar ratios. If you're managing multiple holdings, you can run the entire portfolio through the system to get weighted aggregate metrics in one go. Vinkius makes this possible by connecting these specialized financial tools directly into your favorite AI client, so you don't have to jump between separate terminals or spreadsheets.

## Tools

### calculate_asset_metrics
Calculates Sharpe, Sortino, and Calmar ratios for a single stream of periodic returns.

### calculate_portfolio_metrics
Computes aggregated performance metrics across multiple assets using specific weightings.

### get_market_benchmark
Retrieves the current annual risk-free rate for a selected geographic market (USA, Europe, or Brazil).

## Prompt Examples

**Prompt:** 
```
What is the risk-free rate for the USA market?
```

**Response:** 
```
The annualized risk-free rate for the USA market is 5.33%.
```

**Prompt:** 
```
Calculate metrics for these monthly returns in Brazil: [0.02, -0.01, 0.03, 0.01, -0.02]
```

**Response:** 
```
For the provided returns in Brazil, the Sharpe Ratio is 1.45, the Sortino Ratio is 1.82, and the Calmar Ratio is 2.10, resulting in a Good performance tier.
```

**Prompt:** 
```
Analyze a portfolio with two assets: Asset A (returns [0.05, 0.02], weight 0.6) and Asset B (returns [0.01, -0.01], weight 0.4) in the Europe market.
```

**Response:** 
```
The aggregate portfolio metrics for the Europe market are: Sharpe Ratio: 1.25, Sortino Ratio: 1.40, and Calmar Ratio: 1.85.
```

## Capabilities

### Check current risk-free market rates
Get the annualized risk-free rate for a selected major market (USA, Europe, or Brazil).

### Grade individual asset performance
Calculate Sharpe, Sortino, and Calmar ratios for any single series of investment returns.

### Analyze weighted portfolio metrics
Compute aggregate risk-adjusted performance metrics across a collection of assets based on specific weightings.

## Use Cases

### Comparing a new fund vs. the index
A portfolio manager needs to know if Fund X is better than the S&P 500 benchmark. They ask their agent to run both sets of returns through `calculate_portfolio_metrics`, getting an aggregate Sharpe Ratio and comparing it directly against the market's risk-free rate from `get_market_benchmark`.

### Stress testing a single holding
A quant needs to know if their new tech stock holds up. They input several months of returns into `calculate_asset_metrics`. The agent immediately tells them the asset's Calmar Ratio and whether its performance tier is 'Good' or worse.

### Global portfolio review
An advisor manages clients with holdings across different continents. They ask the agent to get benchmarks for both Europe and Brazil using `get_market_benchmark`, then run the full, weighted global portfolio through `calculate_portfolio_metrics`.

### Identifying underperforming assets
The team has a large basket of investments. Instead of manually checking each one, they use `calculate_asset_metrics` on groups of returns to quickly pinpoint which holdings fall into the 'Poor' performance tier.

## Benefits

- Determine performance quality for single assets. Just feed the returns into `calculate_asset_metrics` and get a clear grade: Poor, Good, or Excellent.
- Handle multi-asset analysis efficiently. Use `calculate_portfolio_metrics` to model how a weighted collection of holdings performs as one unit.
- Stay current on risk benchmarks. Before calculating anything, use `get_market_benchmark` to fetch the latest annualized risk-free rates for USA, Europe, or Brazil.
- Consolidate your reporting. Instead of running three separate calculations (single asset, portfolio, market rate), you do it all in one agent call.
- Improve model accuracy. You get standard ratios like Sharpe and Sortino calculated against real-world risk data, not just theoretical inputs.

## How It Works

The bottom line is that you get actionable risk metrics and grades on your investments without manually running formulas in multiple tabs.

1. First, you ask your agent for the current market context, like the risk-free rate for the USA.
2. Next, you provide the data: either a list of returns for one asset or the returns and weights for an entire portfolio.
3. Finally, the MCP runs all calculations, returning specific ratios (Sharpe, Sortino, Calmar) and a performance rating.

## Frequently Asked Questions

**How does Sharpe Ratio Calculator handle different global markets?**
The MCP supports three major markets: USA, Europe, and Brazil. You first use `get_market_benchmark` to retrieve the specific annualized risk-free rate for whichever region your returns belong to.

**Do I need to provide asset weights for all analyses?**
You only need weights when analyzing multiple assets together. If you are calculating metrics for a single stock, you just need the series of periodic returns using `calculate_asset_metrics`.

**What is the difference between `calculate_asset_metrics` and `calculate_portfolio_metrics`?**
`calculate_asset_metrics` treats a single set of returns as one entity. `calculate_portfolio_metrics` takes multiple assets, each with its own returns and weightings, to give you an aggregate metric.

**Can I get the risk-free rate for a market not listed in Sharpe Ratio Calculator?**
No, this MCP is limited to USA, Europe, or Brazil markets. If your region isn't supported, you'll need an MCP that covers that specific geography.

**Does the calculator give a performance grade?**
Yes, after running the ratios through `calculate_asset_metrics` or `calculate_portfolio_metrics`, the result includes a clear performance tier: Poor, Good, or Excellent.