Open Source · MIT License · Go 1.26

v* Actuarial Engine

Zero-dependency. Extreme speed. Built for concurrent financial simulations.

28M+ Rows/sec CSV Parsing
0 External Dependencies
1.5× Faster than Polars

Features

Comprehensive actuarial toolkit with performance-first architecture

Extreme Performance

28M+ rows/sec CSV parsing with parallel chunked streaming. Pre-computed discount tables for O(1) lookups.

Zero Dependencies

Go Standard Library only. No supply-chain risk, no dependency hell, minimal attack surface.

Rate Conversions

Nominal ↔ effective rates, force of interest, v-star discount factor, Macaulay/modified duration, convexity.

Mortality Tables

CSV-loaded mortality tables with qx/px calculations, curtate life expectancy, and radix-based lx computations.

Annuities & Insurance

Whole life, term, deferred annuities (immediate & due). Net single premiums for whole life, term, and endowment.

Policy Reserves

Net premium, gross premium, prospective, and retrospective reserve calculations with expense modeling.

Monte Carlo Simulation

Geometric Brownian motion interest rate paths with Box-Muller transform. Deterministic seeding for auditability.

Risk Measures

Value at Risk (VaR), Conditional Tail Expectation (CTE/Expected Shortfall), and comprehensive risk reports.

Streaming I/O

Zero-allocation CSV parsing with parallel processing. Streaming JSON output without buffering all records.

Performance

Benchmarked on 10M row CSV (~288MB), 8-core Intel, Windows 11

v-star vs Polars

Metric v-star (Go) Polars 1.39
Duration 347ms 535ms
Throughput 28.8M rows/sec 18.7M rows/sec
Peak RSS 349 MB ~500 MB
After Processing 0.2 MB (GC'd) ~426 MB

v-star is ~1.5× faster with ~30% less memory. Both produce identical PV results.

Throughput Benchmarks

CSV Parsing
28M rows/s
PV Calculation
28M calcs/s
Monte Carlo
100k paths/s
Risk Measures
100k calcs/s

Roadmap

Where v-star is headed

Completed

v0.1 — Foundation

  • Core rate conversions and discount factors
  • v-star discount factor (v* = (1+j) × v)
  • Parallel CSV parser with streaming
  • CensusRecord parsing and valuation
  • CLI with subcommands
Completed

v0.2 — Actuarial Core

  • Mortality table loading (CSV, qx/px)
  • Whole life, term, deferred annuities
  • Net single premiums (whole life, term, endowment)
  • Policy reserves (net/gross/prospective/retrospective)
  • Monte Carlo GBM simulation
  • Risk measures (VaR, CTE)
  • Duration and convexity calculations
In Progress

v0.3 — Production Readiness

  • Lapse and surrender modeling
  • Expense modeling (fixed, percentage, stepped)
  • Profit testing and profit signatures
  • Tax calculations
  • Regression tests against Prophet/AXIS/Moses
  • IFoA CM1/CM2 exam table test suites
  • Multi-state model framework
Planned

v0.4 — Advanced Modeling

  • Stochastic mortality (Lee-Carter, CBD)
  • Asset-liability management (ALM)
  • Cash flow matching
  • Guarantee valuation (GMDB, GMWB)
  • IFRS 17 compliance calculations
  • Audit trail and result versioning
Future

v1.0 — Enterprise

  • Multi-currency support
  • Distributed computation
  • Python/R native bindings
  • WebAssembly for browser-based demos
  • Actuarial model DSL
  • Full IFRS 17 / Solvency II compliance

Release Notes

Version history and changelog

v0.2.0 April 2026 Current

Added

  • Mortality table CSV loading with qx/px column detection
  • Curtate life expectancy (Ex) calculations
  • Whole life, term, deferred annuities (immediate & due)
  • Net single premiums: whole life, term, endowment
  • Policy reserves: net premium, gross premium, prospective, retrospective
  • Monte Carlo GBM with deterministic seeding (PCG)
  • Risk measures: VaR, CTE/Expected Shortfall, full risk reports
  • Macaulay/modified duration and convexity
  • Streaming JSON output writer
  • Worker pool for parallel batch processing

Improved

  • CSV parser: zero-allocation path with unsafe.String
  • Quoted field handling with escaped quotes ("")
  • Parallel chunking with overlap for line boundary detection
  • Pre-computed discount table for O(1) lookups (terms 0–100)
v0.1.0 March 2026

Added

  • Core RateConverter with effective rate support
  • v-star discount factor: v* = (1+j) × v
  • Nominal ↔ effective rate conversions
  • Force of interest calculations
  • Annuity-certain (immediate & due)
  • Parallel CSV streaming with chunked processing
  • CensusRecord parsing from CSV
  • CLI with read, montecarlo, and bench subcommands
  • Present value calculation (standard and v-star)

Getting Started

Up and running in under a minute

Install

go get github.com/lubasinkal/v-star

Quick CLI

go build ./cmd/v-star
./v-star -i 0.05 -j 0.02

Library Usage

converter := rates.NewRateConverter(0.05)
pv := converter.PresentValue(100000, 20)
// pv = 37688.95

Stream CSV

opts := reader.CSVOptions{Header: true}
totalPV, count := reader.StreamCSVWithPV(
  "policies.csv", opts, converter.PresentValue
)

Ready to dive deeper?

Explore the full documentation, examples, and API reference on GitHub.