# Investment Profitability Comparator MCP

> Investment Profitability Comparator compares the final, after-tax returns of common fixed-income investments like CDB, Treasury Selic, Savings, and DI Funds. It automatically applies complex Brazilian regressive income tax rules based on how long you hold your money, giving you a clear side-by-side view of which instrument yields the best net profit.

## Overview
- **Category:** finance
- **Price:** Free
- **Tags:** fixed-income, cdi, taxation, profitability, comparison

## Description

Figuring out which investment is actually better can be a nightmare. You run numbers on one type of bond, then you have to manually check the tax rules for another, and if you forget the holding period, your whole calculation is wrong. This MCP solves that. It provides an analytical engine designed to compare the true net profitability across multiple fixed-income types.

Instead of juggling spreadsheets and tax code articles, your agent handles the complexity. You just input the investment details—the principal amount, the duration, and the CDI rate. The system first determines the precise income tax percentage you'll face based on your holding time using the `get_tax_rate_by_duration` tool. Then it calculates the full profit breakdown for all supported instruments, providing a clean net result after taxes. This entire process is exposed through Vinkius, making advanced financial analysis accessible to anyone who needs clear answers, not just raw data points.

## Tools

### get_tax_rate_by_duration
Determines the specific income tax percentage that applies based on how long an investment is held.

### calculate_net_profit
Calculates and returns a breakdown showing the total profit, the amount of tax paid, and the final net profit for any set investment.

### compare_all_instruments
Provides an immediate side-by-side comparison of all available fixed-income types using your specified parameters.

## Prompt Examples

**Prompt:** 
```
Compare all investments for $10,000 over 400 days with a 12% CDI.
```

**Response:** 
```
For a $10,000 investment over 400 days at 12% CDI, the net results are: CDB (100% CDI): $1,035.20, Treasury Selic: $1,035.20, Savings: $850.00, DI Fund: $1,035.20.
```

**Prompt:** 
```
What is the tax rate for an investment held for 200 days?
```

**Response:** 
```
The applied income tax percentage for 200 days is 17.5%.
```

**Prompt:** 
```
Calculate net profit for $5,000 at 11% CDI for 800 days with a 100% multiplier.
```

**Response:** 
```
The gross profit is $440.00, the tax amount is $88.00, and the final net profit is $352.00.
```

## Capabilities

### Compare multiple funds
Get an immediate side-by-side view of CDB, Treasury Selic, Savings, and DI Funds' potential returns.

### Calculate net profit breakdown
Determine the gross profit, the tax amount withheld, and the final cash you walk away with for a specific investment setup.

### Check current tax rates
Find the exact income tax percentage applied to an investment based on its holding duration.

## Use Cases

### Deciding between savings and bonds
A client asks, 'Is my regular savings account better than a Treasury Selic bond?' Your agent runs the comparison using `compare_all_instruments` for $10k over 400 days. The results show that while both have high net returns, the Savings option has significantly less capital growth due to tax structure.

### Validating a short-term investment
You need to know the actual return on a bond held for only 150 days. You first use `get_tax_rate_by_duration` to get the immediate tax rate, then feed that result into `calculate_net_profit` to see the true cash payout.

### Optimizing a portfolio mix
A wealth manager wants to compare CDB and DI Funds. They run `compare_all_instruments`, adjusting variables until they find the optimal blend that maximizes net profit while minimizing tax exposure for their client.

## Benefits

- Avoid tax surprises. The `get_tax_rate_by_duration` tool finds the exact income tax percentage based on holding time, so you never guess what the government takes.
- Get a full financial picture with one click. Running `compare_all_instruments` shows CDB, Treasury Selic, Savings, and DI Funds side-by-side for easy comparison.
- Know exactly where your money goes. The `calculate_net_profit` tool breaks down the gross profit, tax amount, and final net cash you receive.
- Stop cross-referencing tax codes. This MCP handles the complex rules of Brazilian regressive income tax automatically, saving hours of manual work.
- Model multiple scenarios fast. You can test several investment amounts or durations without having to restart your calculations.

## How It Works

The bottom line is you get one clean report showing which investment yields the most money after taxes.

1. Input your core variables: the initial capital, the anticipated term (duration), and the interest rate (CDI).
2. The MCP first runs a tax check using `get_tax_rate_by_duration` to nail down the precise income tax percentage applicable to that specific duration.
3. Finally, it executes all supported calculations through `compare_all_instruments`, presenting a clear comparison of net returns for every available instrument type.

## Frequently Asked Questions

**How does the `compare_all_instruments` tool work?**
The MCP runs a full comparison of CDB, Treasury Selic, Savings, and DI Funds using your input parameters. It provides one single view showing the expected net profit for every supported type.

**What does `get_tax_rate_by_duration` tell me?**
This tool gives you the exact income tax percentage applied to your investment based solely on how many days it is held. You need this rate before calculating the final profit.

**Do I still need `calculate_net_profit` if I run a comparison?**
While `compare_all_instruments` provides the overview, running `calculate_net_profit` allows you to deep-dive into just one specific investment setup, giving you the detailed breakdown of profit and tax amount.

**Does this MCP handle all types of bonds?**
No. This tool is specialized for fixed-income instruments like CDB, Treasury Selic, Savings, and DI Funds. For variable assets, you'll need a different kind of analysis.

**What happens if I use `get_tax_rate_by_duration` with an invalid or zero duration?**
The tool returns a specific error message explaining the required input format. It prevents calculation failures by forcing you to specify a valid holding period in days for accurate tax assessment.

**Can I use `compare_all_instruments` to compare investments denominated in currencies other than BRL?**
No. This MCP is designed exclusively for fixed-income instruments measured and compared using the Brazilian Real (BRL). Calculations are limited to local currency data.

**Does `calculate_net_profit` require me to first run `get_tax_rate_by_duration`?**
No, the tool accepts duration directly in its parameters. However, using a tax rate derived from this MCP ensures consistency across all your financial calculations.

**Does `compare_all_instruments` guarantee that all listed instruments are comparable?**
Yes. The MCP is built specifically to compare CDB, Treasury Selic, Savings, and DI Funds side-by-side, ensuring standardized metrics for net returns after tax.