UNPKG

@railpath/finance-toolkit

Version:

Production-ready finance library for portfolio construction, risk analytics, quantitative metrics, and ML-based regime detection

35 lines (34 loc) 971 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WilliamsRResultSchema = void 0; const zod_1 = require("zod"); /** * Schema for Williams %R calculation result */ exports.WilliamsRResultSchema = zod_1.z.object({ /** * Array of Williams %R values (-100 to 0) */ williamsR: zod_1.z.array(zod_1.z.number().min(-100).max(0)), /** * Array of highest high values in the period */ highestHigh: zod_1.z.array(zod_1.z.number()), /** * Array of lowest low values in the period */ lowestLow: zod_1.z.array(zod_1.z.number()), /** * The period used for calculation */ period: zod_1.z.number(), /** * Number of Williams %R values calculated */ count: zod_1.z.number(), /** * Indices where Williams %R values correspond to original prices * williamsR[i] corresponds to prices[indices[i]] */ indices: zod_1.z.array(zod_1.z.number()) });