Skip to main content

runBacktestingSimulation

chainalign-backend


chainalign-backend / services/backtestingService / runBacktestingSimulation

Function: runBacktestingSimulation()

runBacktestingSimulation(tenantId, historicalCycleId, simulationConfig): Promise<any>

Defined in: services/backtestingService.js:13

Runs a backtesting simulation for user calibration. This function simulates fetching historical S&OP plan data and actual results, runs a Monte Carlo simulation with the historical plan inputs, and compares the simulated outcomes with the actual historical outcomes.

Parameters

tenantId

UUID

The ID of the tenant.

historicalCycleId

UUID

The ID of the historical S&OP cycle to backtest.

simulationConfig

any

Configuration for the Monte Carlo simulation (e.g., iterations).

Returns

Promise<any>

A promise that resolves to the backtesting results.