niveshkit is a TypeScript library to analyze financial statements like Mutual Funds, Stocks etc. It parses CAMS-style statements, fetches AMFI NAV data, and computes key metrics like XIRR, returns, and tax breakdowns. The motivation is to write a library that can be used offline in webapps or hybrid mobile apps. Thereby, reducing the need for internet connectivity.
⚠️ Work in Progress: Still under active development. Expect bugs, missing features, and breaking changes.
- Detects transaction types (SIP, Redemption, Dividend, etc.)
- Parses CAMS statements (text format)
- Pulls latest NAVs from AMFI
- Calculates:
- Invested, redeemed, and current value
- Realized / unrealized gains
- XIRR / CAGR
- Analysis grouped by folio, scheme, or fund house
- Functional API — easy to extend, no database needed, no server needed.
pnpm add niveshkit // Coming Soonpnpm install
# Drop your CAMS PDF statement in `packages/mf/__tests__/data/cams-sample.pdf`
pnpm --filter @niveshkit/mf testMIT