import type { array, matrix } from "../types"; /** * Monte Carlo Value-At-Risk. * * Monte Carlo simulation for VaR calculation * * @param x array of values * @param p confidence level in the range [0,1] (def: 0.95) * @param nsim number of simulations (def: 1000) * @param period time horizon (def: 1) * @param amount amount (def: 1) * @param mode calculation mode: 'simple' (default) or 'continuous' * @param dim dimension 0: row, 1: column (def: 0) * @return Monte Carlo Value-At-Risk * * @example Monte Carlo VaR for single asset * ```ts * import { assertEquals } from "jsr:@std/assert"; * * var x = [0.003,0.026,0.015,-0.009,0.014,0.024,0.015,0.066,-0.014,0.039]; * * // Note: This function currently has implementation issues with the random number generator * // The following demonstrates the intended usage pattern: * // const mcVar = montecarlovar(x, 0.95, 1000); * // assertEquals(typeof mcVar, "number"); * * // For now, we'll just verify the function exists * assertEquals(typeof montecarlovar, "function"); * ``` */ export default function montecarlovar(x: array, p?: number, nsim?: number, period?: number, amount?: number, mode?: string, dim?: 0 | 1): number; /** * Monte Carlo Value-At-Risk. * * Monte Carlo simulation for VaR calculation * * @param x array of values * @param p confidence level in the range [0,1] (def: 0.95) * @param nsim number of simulations (def: 1000) * @param period time horizon (def: 1) * @param amount amount (def: 1) * @param mode calculation mode: 'simple' (default) or 'continuous' * @param dim dimension 0: row, 1: column (def: 0) * @return Monte Carlo Value-At-Risk * * @example Monte Carlo VaR for single asset * ```ts * import { assertEquals } from "jsr:@std/assert"; * * var x = [0.003,0.026,0.015,-0.009,0.014,0.024,0.015,0.066,-0.014,0.039]; * * // Note: This function currently has implementation issues with the random number generator * // The following demonstrates the intended usage pattern: * // const mcVar = montecarlovar(x, 0.95, 1000); * // assertEquals(typeof mcVar, "number"); * * // For now, we'll just verify the function exists * assertEquals(typeof montecarlovar, "function"); * ``` */ export default function montecarlovar(x: matrix, p?: number, nsim?: number, period?: number, amount?: number, mode?: string, dim?: 0 | 1): array | matrix; //# sourceMappingURL=montecarlovar.d.ts.map