@railpath/finance-toolkit
Version:
Production-ready finance library for portfolio construction, risk analytics, quantitative metrics, and ML-based regime detection
18 lines (17 loc) • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VaRResultSchema = void 0;
const zod_1 = require("zod");
/**
* Zod schema for VaR calculation result
*/
exports.VaRResultSchema = zod_1.z.object({
/** VaR value (absolute loss threshold) */
value: zod_1.z.number().nonnegative().describe('VaR value (absolute loss threshold)'),
/** Confidence level used */
confidenceLevel: zod_1.z.number().min(0).max(1),
/** Method used */
method: zod_1.z.string(),
/** CVaR (Conditional VaR / Expected Shortfall) */
cvar: zod_1.z.number().nonnegative().optional(),
});