# Discretization Methods

**URL:** <https://discourse.vfitoolkit.com/t/discretization-methods/708>\
**Category:** Uncategorized\
**Created:** [September 16, 2026, 4:50am UTC](https://discourse.vfitoolkit.com/t/discretization-methods/708 "2026-09-16T04:50:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertdkirkby](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/robertdkirkby/32/287_2.png) [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)\
**Post date:** [September 16, 2026, 4:50am UTC](https://discourse.vfitoolkit.com/t/discretization-methods/708/1 "2026-09-16T04:50:03Z")

</div>

Built a large test bank for the discretization methods.

> <https://github.com/vfitoolkit/vfitoolkitTests/commit/7e7d287a3602f11de107adc4e717bebcee3441cf>
>
> Organised by the PROCESS being discretized rather than by command, so every
> meth…od that can handle a given process is run against the same analytic truth
> and against each other. P0 instruments, P1 iid normal, P2 AR(1) normal, P3
> AR(1) with gaussian-mixture innovations, P4 AR(1) with stochastic volatility,
> P5 VAR(1), P6 life-cycle AR(1), P7 life-cycle AR(1) with gaussian mixture,
> P8 life-cycle VAR(1), P9 a normal distribution on a given grid.
> 
> 3051 checks over 87 files and 47 figures. Seven failures, all \[T2\] accuracy
> bars: four in P2 and two in P3 are worst-over-the-sweep measures dominated by
> the coarsest grid, where the paired finest-grid checks pass comfortably; P4's
> excess-kurtosis monotonicity is a real finding about grid truncation rather
> than a defect.
> 
> Checks are tiered. T0 is the same arithmetic reached two ways, T1 an algebraic
> identity through different code, T2 accuracy against analytic truth, MC a
> Monte Carlo bound at 4\*se. DiscSummary reads the diary back at the end and
> prints one verdict, because the bank prints its results in four formats and
> a reader who scans for one of them will report a clean run having not looked
> at the other three.
> 
> The truth is recomputed inside each subcode, never read from the command's own
> otheroutputs - using a command's answer as its own oracle makes every accuracy
> number a tautology. Life-cycle blocks get exact age profiles from the cumulant
> recursion; P6 to P8 additionally use the frozen-life-cycle identity, where
> constant parameters must collapse a life-cycle command onto the stationary one
> it extends.
> 
> Found B24 through B33 in the toolkit, the last four fixed in 498cdc6d. B33 in
> particular needed this bank's shape to find: it is silent unless the process
> parameters actually vary with age, so every frozen-parameter identity matched
> exactly while it was live.
> 
> Co-Authored-By: Claude Opus 5 \<noreply@anthropic.com\>

Tests all sorts of things, and [included cleaning up some minor aspects and implementing some missing options](https://github.com/vfitoolkit/VFIToolkit-matlab/commit/498cdc6dc2d6c073f08d3f4a6a7991c53b95b3fd). As part of this I eliminated the dependence on Matlab Toolboxes (mostly around eliminating use of normcdf) except for multivariate normals . This leaves all the discretization methods much better tested than before, and with better default settings. It also puts me in a position up to add a couple of new discretization methods, hopefully coming soon.
