@railpath/finance-toolkit
Version:
Production-ready finance library for portfolio construction, risk analytics, quantitative metrics, and ML-based regime detection
28 lines (27 loc) • 931 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BollingerBandsOptionsSchema = void 0;
const zod_1 = require("zod");
/**
* Schema for Bollinger Bands calculation options
*/
exports.BollingerBandsOptionsSchema = zod_1.z.object({
/**
* Array of price values (typically closing prices)
*/
prices: zod_1.z.array(zod_1.z.number()).min(1, 'Prices array must contain at least one value'),
/**
* Period for the moving average and standard deviation calculation
* Must be positive and not exceed the length of prices array
*/
period: zod_1.z.number()
.int('Period must be an integer')
.positive('Period must be positive'),
/**
* Standard deviation multiplier (typically 2)
* Must be positive
*/
stdDevMultiplier: zod_1.z.number()
.positive('Standard deviation multiplier must be positive')
.default(2)
});