V-STAR

The Actuarial Engine That Doesn't Suck

SPEED COMPARISON (10M ROWS)

v-star
Time-
Memory-
Polars
Time-
Memory-
Pandas
Time-
Memory-

v-star is ~1.5x faster than Polars and uses 30% less memory. And it's zero-dependency Go — no pip install, no version hell.

OVERVIEW

v-star is an actuarial calculation engine written in Go. It's designed to replace the slow, fragile spreadsheets actuaries use for valuation, pricing, and risk calculations.

What it's used for

  • Valuations — Calculate reserve liabilities (net premium, gross premium, prospective, retrospective)
  • Pricing — Present value of future cash flows, annuitant survival
  • Risk calculations — Monte Carlo simulation, VaR (Value at Risk), CTE (Conditional Tail Expectation)
  • Big data processing — Stream millions of policy records from CSV without loading everything into memory

Why use it

  • Speed — Processes 10M rows in 34ms (vs 30 seconds in Pandas)
  • No dependencies — Single binary. No pip install, no version conflicts
  • Auditable — Every formula is in the source code. You can read the math.
  • Memory efficient — Streams CSV data without loading into RAM

Who is this for

  • Actuarial students — Learn by reading the code. It's exactly what you'd write in an exam.
  • Actuaries — Replace slow Excel/VBA with something that actually runs
  • Developers — Build actuarial functionality into apps without wrapping Python/R libraries

How to apply

Use it as a library in your Go code:

pv := converter.PresentValue(10000, 20)
ann := ann.NewAnnuityImmediate(65, 1000)
report := risk.ComputeReport(losses)

Or run it as a server via HTTP:

curl -X POST localhost:8080/present-value -d '{"rate": 0.05, "records": [...]}'

Or process CSV files directly:

./v-star read policies.csv --benchmark

WHAT CAN IT DO?

Present Value

Discounted cash flows, the core of actuarial math

Annuities

Whole life, term, deferred

Reserves

Net premium, gross premium, prospective, retrospective

Monte Carlo

100k+ paths in under a second

Risk Measures

VaR, CTE — what risk managers actually care about

CSV Processing

Stream millions of rows without blowing up RAM

CODE

Present Value
pv := converter.PresentValue(10000, 20) // $36,688.95
Annuity with mortality
ann := ann.NewAnnuityImmediate(65, 1000)
pv := ann.PresentValue(1000000, 1.05)
Monte Carlo + VaR
rg := stochastic.NewRateGenerator(0.05, 0.02, 0.15, 42)
paths := rg.GeneratePaths(100000, 10, 1.0)
report := risk.ComputeReport(losses)
fmt.Println(report.VaR_95) // e.g., 1423092.50

Why Go?

  • Speed — Compiles to native code, no interpreter overhead
  • Zero deps — Just one binary. No pip, no version hell
  • Readable — Every formula is right there in the source
  • Portable — Runs anywhere