/**
 * performance-attribution.ts — MCP tool handler for `performance_attribution`.
 *
 * Fetches prices for all positions and the benchmark, computes portfolio- and
 * benchmark-level return series, calculates the full set of risk-adjusted
 * performance ratios, breaks down sector exposure, and identifies the top/bottom
 * contributors by P&L contribution.
 *
 * Tier behaviour (authContext.tier drives this, NOT middleware gating):
 *   FREE  — returns basic ratios (Sharpe, Sortino, total_return, annualized_return)
 *            plus sector_exposure. top/bottom contributors are included but
 *            factor-level attribution fields are omitted.
 *   PAID  — returns all fields including Treynor, Calmar, Information Ratio,
 *            tracking error, and full top/bottom contributor detail.
 *
 * Handler signature:
 *   handlePerformanceAttribution(input, env, authContext) -> ToolResult
 */
import type { PerformanceAttributionInput } from "../schemas/performance-attribution.js";
import type { AuthContext } from "../middleware/auth.js";
export interface Env {
    PRICE_CACHE: KVNamespace;
    USER_STATE: DurableObjectNamespace;
}
export interface ToolResult {
    content: [{
        type: "text";
        text: string;
    }];
    isError?: boolean;
}
/**
 * Handle the `performance_attribution` MCP tool.
 *
 * @param input        Validated input (parsed by Zod schema upstream).
 * @param env          Cloudflare Worker environment bindings.
 * @param authContext  Resolved auth/tier context from middleware.
 * @returns            ToolResult with JSON-serialised PerformanceAttributionResult.
 */
export declare function handlePerformanceAttribution(input: PerformanceAttributionInput, env: Env, authContext: AuthContext): Promise<ToolResult>;
//# sourceMappingURL=performance-attribution.d.ts.map