/**
 * var.ts — Value at Risk (VaR) and Conditional VaR (Expected Shortfall) calculations.
 * Supports historical, parametric (normal), and Cornish-Fisher methods.
 * Pure functions, zero external dependencies beyond the engine's own statistics module.
 */
/** Result returned by all VaR functions */
export interface VaRResult {
    /** The VaR value (a positive number representing potential loss) */
    var: number;
    /** The confidence level used (e.g. 0.95) */
    confidenceLevel: number;
    /** The horizon in days */
    horizonDays: number;
    /** The method used */
    method: string;
}
/** Result returned by CVaR / Expected Shortfall */
export interface CVaRResult extends VaRResult {
    /** Conditional VaR (average loss beyond the VaR threshold) */
    cvar: number;
}
/**
 * Historical VaR — directly reads the loss quantile from the empirical distribution.
 * No distributional assumptions.
 *
 * @param returns - Array of historical portfolio returns (e.g. daily log returns).
 *                  Negative values represent losses.
 * @param confidenceLevel - Confidence level in (0, 1). E.g. 0.95 for 95% VaR.
 * @param horizonDays - Holding period in trading days. VaR is scaled by sqrt(horizon).
 *                      Default 1.
 * @returns VaR as a positive number (the loss threshold that is exceeded with
 *          probability 1 - confidenceLevel)
 */
export declare function historicalVaR(returns: number[], confidenceLevel: number, horizonDays?: number): VaRResult;
/**
 * Parametric (variance-covariance) VaR — assumes returns are normally distributed.
 * VaR = -mu + sigma * z_alpha, scaled by sqrt(horizon).
 *
 * @param returns - Array of historical portfolio returns
 * @param confidenceLevel - Confidence level in (0, 1)
 * @param horizonDays - Holding period in trading days. Default 1.
 * @returns VaR as a positive number
 */
export declare function parametricVaR(returns: number[], confidenceLevel: number, horizonDays?: number): VaRResult;
/**
 * Cornish-Fisher VaR — adjusts the normal quantile for skewness and excess kurtosis.
 * More accurate than parametric VaR for non-normal return distributions.
 *
 * The Cornish-Fisher expansion modifies the z-score:
 *   z_cf = z + (z^2 - 1)*S/6 + (z^3 - 3*z)*K/24 - (2*z^3 - 5*z)*S^2/36
 * where S = skewness, K = excess kurtosis, z = normal quantile.
 *
 * @param returns - Array of historical portfolio returns (at least 4 for kurtosis)
 * @param confidenceLevel - Confidence level in (0, 1)
 * @param horizonDays - Holding period in trading days. Default 1.
 * @returns VaR as a positive number, adjusted for higher moments
 */
export declare function cornishFisherVaR(returns: number[], confidenceLevel: number, horizonDays?: number): VaRResult;
/**
 * Conditional VaR (CVaR), also called Expected Shortfall (ES).
 * This is the expected loss given that the loss exceeds VaR.
 * CVaR is always >= VaR and is a more conservative risk measure.
 *
 * Uses the historical method: average of all returns that fall below the VaR threshold.
 *
 * @param returns - Array of historical portfolio returns
 * @param confidenceLevel - Confidence level in (0, 1)
 * @param horizonDays - Holding period in trading days. Default 1.
 * @returns Object containing both VaR and CVaR as positive numbers
 */
export declare function conditionalVaR(returns: number[], confidenceLevel: number, horizonDays?: number): CVaRResult;
//# sourceMappingURL=var.d.ts.map