
Shikamaru: Day-Count and Accrued Interest Engine
@JayOfemi
关于 Shikamaru: Day-Count and Accrued Interest Engine
Provably correct day-count and accrued-interest calculations. A small, dependency-light TypeScript library and an MCP server, so an AI agent can get the exact number instead of guessing.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"shikamaru": {
"command": "npx",
"args": [
"-y",
"--package=@jayofemi/shikamaru",
"shikamaru-mcp"
]
}
}
}工具
3Exact day-count fraction between two dates under a market convention. Dates are ISO YYYY-MM-DD. Deterministic; do not estimate this with a model.
Exact simple accrued interest (notional * rate * day-count fraction) between two dates. Dates are ISO YYYY-MM-DD; rate is the annual rate as a decimal (0.05 = 5%). Deterministic.
List the supported day-count conventions.
概览
What is Shikamaru: Day-Count and Accrued Interest Engine?
Shikamaru is a small, dependency-light TypeScript library and MCP server that provides provably correct day-count, holiday-calendar, business-day, and payment-schedule calculations. It is designed for AI agents that need exact dates or numbers instead of guessing.
How to use Shikamaru: Day-Count and Accrued Interest Engine?
Install the npm package (npm install @jayofemi/shikamaru), then build and run the MCP server from source (npm run build && node dist/server.js) or launch it directly via npx @jayofemi/shikamaru. Any MCP client (Claude Desktop, IDE, etc.) can connect over stdio.
Key features of Shikamaru: Day-Count and Accrued Interest Engine
- Day-count fraction under seven market conventions (30/360, ACT/360, etc.)
- Simple accrued interest: notional × rate × day-count fraction
- Holiday calendars: us-federal, nyse, sifma-us, target, uk
- Business-day math: is-business-day, next/previous, ISDA adjustments, T+N settlement
- Payment schedules: monthly to annual, backward or forward roll, short/long stubs
- Continuous correctness verification against QuantLib via CI
Use cases of Shikamaru: Day-Count and Accrued Interest Engine
- Get exact day-count fractions for bond or swap pricing
- Compute accrued interest for a given notional, rate, and date range
- Determine settlement dates (e.g., T+2) respecting market holidays
- Generate periodic payment schedules with proper business-day adjustments
FAQ from Shikamaru: Day-Count and Accrued Interest Engine
What day-count conventions does it support?
It supports seven conventions: 30/360, 30E/360, 30E/360 ISDA, ACT/360, ACT/365F, ACT/ACT ISDA, and ACT/ACT ICMA (with reference periods and stub decomposition).
How are holiday calendars maintained?
Calendars are implemented as rules in code plus a pinned table of historical one-off closures. A scheduled CI run checks every calendar against the latest QuantLib weekly to detect drift.
What are the runtime requirements?
The server requires Node.js and npm. It is a dependency-light TypeScript package with no external data feeds.
How is correctness verified?
The library tests against published reference vectors (ISDA worked examples, official holiday lists) and differential batteries against QuantLib. CI regenerates these batteries from the latest QuantLib on every push and weekly.
How can I test the MCP server?
Use the official MCP Inspector: after building, run npx @modelcontextprotocol/inspector node dist/server.js. It opens a local UI that lists tools and allows calling them, e.g., day_count_fraction with start 2003-11-01, end 2004-05-01, convention ACT/ACT ISDA returns about 0.4977.
其他 分类下的更多 MCP 服务器

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
评论