A Model Context Protocol (MCP) server for convertible bond analysis using akshare data
Project description
BigAMCP Bond Analysis
A comprehensive Model Context Protocol (MCP) server for convertible bond analysis using akshare data.
Features
This MCP server provides the following tools for convertible bond analysis:
🔍 Bond Discovery
- find_bond_by_name: Search for convertible bonds by name with fuzzy matching
- get_bond_metrics: Get real-time metrics for specific bonds
📊 Market Analysis
- screen_discount_arbitrage: Find bonds with discount arbitrage opportunities
- screen_special_opportunities: Advanced screening combining discount and clause triggers
- get_upcoming_bonds: Discover upcoming bond issuances and subscription opportunities
⚡ Real-time Monitoring
- monitor_bond_spread: Monitor intraday spread for specific bonds
- track_bond_clause_triggers: Track redemption and put clause trigger status
Installation
Using uvx (Recommended)
uvx bigamcp-bond-analysis
Using pip
pip install bigamcp-bond-analysis
Usage
As MCP Server
Start the server with stdio transport (default):
bigamcp-bond-analysis
Or with SSE transport:
bigamcp-bond-analysis --transport sse --host localhost --port 8000
With MCP Inspector
Test the server using MCP Inspector:
npx @modelcontextprotocol/inspector uvx bigamcp-bond-analysis
Configuration for Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"bigamcp-bond-analysis": {
"command": "uvx",
"args": ["bigamcp-bond-analysis"]
}
}
}
Available Tools
find_bond_by_name
Search for convertible bonds by name.
Parameters:
bond_name_query(string): Search query for bond name
Example:
{
"bond_name_query": "平安"
}
get_bond_metrics
Get real-time metrics for specified bonds.
Parameters:
bond_codes(array): List of 6-digit bond codes
Example:
{
"bond_codes": ["113050", "128136"]
}
screen_discount_arbitrage
Screen for bonds with discount arbitrage opportunities.
Parameters:
min_discount_rate(number, optional): Minimum discount rate threshold (default: -0.01)
track_bond_clause_triggers
Track clause trigger status for a specific bond.
Parameters:
bond_code(string): 6-digit bond code
get_upcoming_bonds
Get upcoming bond events.
Parameters:
days_ahead(number, optional): Number of days to look ahead (default: 30)
monitor_bond_spread
Monitor intraday spread for a bond.
Parameters:
bond_code(string): 6-digit bond code
screen_special_opportunities
Advanced screening for special arbitrage opportunities.
Parameters:
discount_threshold(number, optional): Discount rate threshold (default: -0.01)trigger_proximity_threshold(number, optional): Proximity threshold for triggers (default: 0.8)redemption_clause_days(number, optional): Days for redemption clause (default: 15)put_clause_days(number, optional): Days for put clause (default: 30)
Data Source
This server uses akshare library to fetch real-time convertible bond data from various Chinese financial data sources.
Requirements
- Python 3.10+
- Internet connection for data fetching
Development
Setup Development Environment
git clone <repository-url>
cd bigamcp-bond-analysis
uv sync --dev
Run Tests
uv run pytest
Code Formatting
uv run black src tests
uv run ruff check src tests
Type Checking
uv run mypy src
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please open an issue on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bigamcp_bond_analysis-0.1.3.tar.gz.
File metadata
- Download URL: bigamcp_bond_analysis-0.1.3.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bad24e4fb54e1ba0194961898d5f56c4e39298b3d14a794d0188a6199599a3ff
|
|
| MD5 |
00956041a1a570f3c7d9e09c47fc0450
|
|
| BLAKE2b-256 |
aba427781687df3e15ff430b888487e1fd6fcc0d7bfbd777d60e00c399940aa0
|
File details
Details for the file bigamcp_bond_analysis-0.1.3-py3-none-any.whl.
File metadata
- Download URL: bigamcp_bond_analysis-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85f5a90063ce2012d2f59d871f4a6dca6fab46e4d921d3c54b2146261087e817
|
|
| MD5 |
aaee377076d7a718e84529929720e18e
|
|
| BLAKE2b-256 |
1b97127f235a32a55dcce3bd6dd7f2b8e5974f4c53087519a42a4d56e8afa4b8
|