quantitivecalc
Version:
A TypeScript library providing advanced quantitative finance functions for risk analysis, performance metrics, and technical indicators. (Currently in development)
17 lines • 1.33 kB
TypeScript
/**
* Calculates Bollinger Bands for a given dataset.
*
* Bollinger Bands consist of three lines: the middle band (simple moving average),
* the upper band (SMA + N standard deviations), and the lower band (SMA - N standard deviations).
*
* @param data - Array of data objects to calculate Bollinger Bands for.
* @param sourceColumn - The key in each data object containing the source value (e.g., closing price).
* @param upperColumn - The key to store the calculated upper band value. Defaults to 'bb_upper'.
* @param middleColumn - The key to store the calculated middle band (SMA) value. Defaults to 'bb_middle'.
* @param lowerColumn - The key to store the calculated lower band value. Defaults to 'bb_lower'.
* @param windowSize - The number of periods to use for the moving average and standard deviation. Defaults to 20.
* @param numStdDev - The number of standard deviations to use for the upper and lower bands. Defaults to 2.
* @returns A new array of data objects with Bollinger Bands columns added.
*/
export declare function calculateBollingerBands(data: Array<Record<string, unknown>>, sourceColumn: string, upperColumn?: string, middleColumn?: string, lowerColumn?: string, windowSize?: number, numStdDev?: number): Array<Record<string, unknown>>;
//# sourceMappingURL=calculateBollingerBands.d.ts.map