pub fn simulate_at_dates<M: SimulationModel>(
model: &mut M,
valuation_date: NaiveDate,
observation_dates: &[NaiveDate],
n_paths: usize,
max_step_days: u32,
day_counter: &dyn DayCounters,
) -> DatedPaths<M::State>Expand description
Run a date-driven Monte Carlo: build an integration grid (observation
dates ∪ uniform max_step_days-spaced refinement), evolve each path
via the model’s step, and capture state at each observation date.
valuation_date—t = 0reference. All integration times are measured from here viaday_counter.observation_dates— must all be strictly aftervaluation_date.max_step_days— integration step cap in calendar days. Use 1 for daily precision; larger values trade MC accuracy for speed.
The integration grid is deduplicated and sorted; observation dates always land exactly on grid points so state is captured without interpolation error.