[{"data":1,"prerenderedAt":249},["ShallowReactive",2],{"blog-v-star-v07":3},{"id":4,"title":5,"body":6,"date":232,"description":233,"extension":234,"featured":235,"meta":236,"navigation":237,"path":238,"seo":239,"series":240,"stem":241,"tags":242,"tldr":247,"__hash__":248},"blog\u002Fblog\u002Fv-star-v07.md","Stop Hardcoding Everything",{"type":7,"value":8,"toc":223},"minimark",[9,13,21,24,29,40,56,71,77,80,84,98,101,142,145,149,152,159,163,166,188,191,195,198,201,205,208,219],[10,11,12],"p",{},"The first version of v-star was basically me seeing how much I could abuse Go's concurrency to make a spreadsheet user's life miserable. All raw speed. 1M policies, 300ms, boom. I thought I had it figured out.",[10,14,15,16,20],{},"But here's the thing: raw speed is ",[17,18,19],"em",{},"easy",". Architecture is the hard part.",[10,22,23],{},"v0.7.0 is where I stopped treating this like a script and started treating it like a framework. The big move? Interfaces.",[25,26,28],"h2",{"id":27},"the-stop-hardcoding-pivot","The \"Stop Hardcoding\" Pivot",[10,30,31,32,36,37],{},"I realized I was trapped. If I wanted a different interest rate model, I had to rip out the guts of the simulator. ",[33,34,35],"del",{},"Who does that?"," ",[17,38,39],{},"I did.",[10,41,42,43,47,48,51,52,55],{},"So I killed the concrete dependencies. Now we have ",[44,45,46],"code",{},"PathGenerator",", ",[44,49,50],{},"ContingencyCalculator",", and ",[44,53,54],{},"MortalityTable"," as interfaces.",[10,57,58,59,63,64,66,67,70],{},"Until now, it was just Geometric Brownian Motion for path generation. Cool, but GBM just drifts. Real interest rates don't do that — they mean-revert. Enter the ",[60,61,62],"strong",{},"Vasicek Model",". Because I'm using a ",[44,65,46],{}," interface, I just plugged in a Vasicek generator and suddenly the simulation actually makes sense for real-world financial engineering. It's not just a feature, it's what makes the tool ",[17,68,69],{},"useful",".",[10,72,73,74,76],{},"Same for the ",[44,75,50],{},". I stopped doing just present values and started doing actual actuarial science — whole life, term insurance, deferred annuities, net single premiums. If it's a life-contingent cash flow, v-star can probably calculate it without me rewriting the core engine.",[10,78,79],{},"One interface change unlocked all of that. That's the power of programming to interfaces instead of concrete types.",[25,81,83],{"id":82},"the-unix-way","The Unix Way",[10,85,86,87,90,91,94,95,70],{},"v-star was always CLI-first, but v0.7.0 makes it ",[17,88,89],{},"composable",". I added ",[44,92,93],{},"StreamCensusFromReader",". The engine doesn't care if your data is in a file, an HTTP body, or some buffer in memory. It just wants an ",[44,96,97],{},"io.Reader",[10,99,100],{},"You can literally curl a CSV and pipe it straight into the engine:",[102,103,108],"pre",{"className":104,"code":105,"language":106,"meta":107,"style":107},"language-bash shiki shiki-themes vesper","curl -s https:\u002F\u002Fapi.provider.com\u002Fcensus | .\u002Fv-star read --stdin --benchmark\n","bash","",[44,109,110],{"__ignoreMap":107},[111,112,115,119,123,126,130,133,136,139],"span",{"class":113,"line":114},"line",1,[111,116,118],{"class":117},"sNEDb","curl",[111,120,122],{"class":121},"sZOz5"," -s",[111,124,125],{"class":121}," https:\u002F\u002Fapi.provider.com\u002Fcensus",[111,127,129],{"class":128},"sq0yK"," |",[111,131,132],{"class":117}," .\u002Fv-star",[111,134,135],{"class":121}," read",[111,137,138],{"class":121}," --stdin",[111,140,141],{"class":121}," --benchmark\n",[10,143,144],{},"And if you want the fastest possible I\u002FO, there's the mmap path. 10M rows in 0.80 seconds. Zero-copy parsing. As fast as the OS can read the disk.",[25,146,148],{"id":147},"the-http-api","The HTTP API",[10,150,151],{},"The biggest grown-up move in this version is the server. v-star is now a REST API. You don't need Go to use it. Call it from Python, R, or even Excel via HTTP.",[10,153,154,155,158],{},"Need a Monte Carlo risk report with VaR 95% and CTE 99%? Hit the ",[44,156,157],{},"\u002Fmontecarlo"," endpoint. Industry-standard risk metrics delivered as JSON in milliseconds. Same engine, wrapped in a way that makes it accessible to the rest of your stack.",[25,160,162],{"id":161},"the-flex-benchmarks","The Flex (Benchmarks)",[10,164,165],{},"Because I can't help myself:",[167,168,169,176,182],"ul",{},[170,171,172,175],"li",{},[60,173,174],{},"PV Calculation:"," 380 million calls per second",[170,177,178,181],{},[60,179,180],{},"Parallel Valuation:"," 272 million policies per second",[170,183,184,187],{},[60,185,186],{},"Monte Carlo:"," 3.7 million paths per second",[10,189,190],{},"Combine that speed with the new interfaces and you're not running a simulation. You're running a professional-grade actuarial lab on your laptop.",[25,192,194],{"id":193},"the-boring-stuff-that-matters","The Boring Stuff That Matters",[10,196,197],{},"Parallel Monte Carlo — each worker gets its own RNG so they aren't fighting over a lock. More cores = faster simulation.",[10,199,200],{},"Version injection via ldflags — no more hardcoding the version in main.go like a caveman. It's a tiny change, but it's the \"I actually know how to build Go tools\" flex.",[25,202,204],{"id":203},"whats-next","What's Next",[10,206,207],{},"The foundation is finally not made of cardboard. Custom mortality tables from real CSV files. Variance reduction with antithetic variates. Stepped and increasing benefits. The fun stuff.",[10,209,210,211,218],{},"Repo is at ",[212,213,217],"a",{"href":214,"rel":215},"https:\u002F\u002Fgithub.com\u002Flubasinkal\u002Fv-star",[216],"nofollow","github.com\u002Flubasinkal\u002Fv-star",". Go build it, or don't. I don't care.",[220,221,222],"style",{},"html pre.shiki code .sNEDb, html code.shiki .sNEDb{--shiki-default:#FFC799}html pre.shiki code .sZOz5, html code.shiki .sZOz5{--shiki-default:#99FFE4}html pre.shiki code .sq0yK, html code.shiki .sq0yK{--shiki-default:#A0A0A0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":107,"searchDepth":224,"depth":224,"links":225},2,[226,227,228,229,230,231],{"id":27,"depth":224,"text":28},{"id":82,"depth":224,"text":83},{"id":147,"depth":224,"text":148},{"id":161,"depth":224,"text":162},{"id":193,"depth":224,"text":194},{"id":203,"depth":224,"text":204},"2026-05-23","Interfaces, Vasicek models, and realizing concrete types are a trap.","md",false,{},true,"\u002Fblog\u002Fv-star-v07",{"title":5,"description":233},"V-Star","blog\u002Fv-star-v07",[243,244,245,246],"go","actuarial","architecture","simulation","Interfaces over concrete types unlocked the Vasicek model, composable CLI pipes, and a REST API — all without rewriting the engine. PV at 380M calls\u002Fsec, parallel valuation at 272M policies\u002Fsec. This is what treating actuarial software like a framework looks like.","CYs4vmQZcp1l5o5HnWAMBziU0tH3V5jwg2iPaf5HWGY",1781978556326]