import type { ShortSnapshot } from "../types.js"; /** * FINRA bi-monthly short interest file URL. * Verified pattern (2026-04): pipe-delimited despite the .csv extension, * camelCase column names. Files publish ~7 business days after settlement. */ export declare function buildShortInterestUrl(reportDateYYYYMMDD: string): string; export interface RawShortInterestRow { symbol: string; settlementDate: string; sharesShort: number; prevSharesShort: number; avgDailyVolume: number | null; daysToCover: number | null; } /** * Parse a FINRA bi-monthly short interest file (whole-market, pipe-delimited). * Header columns are matched by regex to tolerate both the legacy "Symbol|...| * Current Shares Short Quantity" form and the current "symbolCode|...| * currentShortPositionQuantity" camelCase form. */ export declare function parseShortInterestFile(text: string): Map; /** * Convert YYYYMMDD or YYYY-MM-DD to ISO YYYY-MM-DD. Pass-through for * already-ISO inputs (the current FINRA file format reports settlementDate * as YYYY-MM-DD directly). */ export declare function reportDateToIso(date: string): string; /** * Generate the most recent N bi-monthly settlement dates ending on or before `now`. */ export declare function recentSettlementDates(now: Date, count: number): string[]; /** * Fetch one ticker's short-interest snapshots for the most recent N bi-monthly * settlement dates, with delta vs prior period for each entry that has a prior. * * pctOfFloat is computed as `sharesShort / sharesOutstanding` using the latest * SEC XBRL `dei:EntityCommonStockSharesOutstanding` fact for the ticker. This * is the standard SI/SO ratio (commonly conflated with "% of float" — true * public float requires restricted-share data not available via free SEC data). * Returns null when the company has no XBRL filings or the lookup fails. */ export declare function getShortInterestSnapshots(ticker: string, periodsBack: number, now?: Date): Promise;