SYMBOL INDEX (187 symbols across 27 files) FILE: scripts/backtest.py function fetch_historical_prices (line 33) | def fetch_historical_prices(ticker: str, start: str, end: str): function black_scholes_call (line 62) | def black_scholes_call(S: float, K: float, T: float, r: float, sigma: fl... function simulate_trade (line 77) | def simulate_trade(ticker: str, entry_date: str, hold_days: int = 90) ->... function run_backtest (line 143) | def run_backtest(): FILE: scripts/daily_scan.py function step_ingest (line 68) | def step_ingest(scorer: FundScorer, run_mode: str) -> Dict[str, list]: function step_build_signals (line 121) | def step_build_signals(raw: Dict, scorer: FundScorer, sf: SignalFilter) ... function step_filter (line 140) | def step_filter(signals: List[Signal], sf: SignalFilter) -> List[Signal]: function step_enrich (line 165) | def step_enrich(signals: List[Signal], run_mode: str) -> List[Dict]: function step_analyze (line 288) | def step_analyze(enriched: List[Dict]) -> List[Dict]: function step_persist_and_send (line 307) | def step_persist_and_send( function run_daily_light (line 390) | def run_daily_light(): function run_weekly_full (line 421) | def run_weekly_full(): function run_thirteenf (line 447) | def run_thirteenf(): function run_weekly_review (line 473) | def run_weekly_review(): function main (line 510) | def main(): FILE: src/ai/outcome_tracker.py function _fetch_price_at (line 21) | def _fetch_price_at(ticker: str, target_date: str) -> Optional[float]: function calculate_returns (line 58) | def calculate_returns(ticker: str, signal_date: str) -> Dict: function update_signal_outcomes (line 83) | def update_signal_outcomes(min_age_days: int = 30): function update_fund_performance (line 133) | def update_fund_performance(): function run_outcome_tracking (line 173) | def run_outcome_tracking(): FILE: src/ai/single_analyzer.py class SingleAnalyzer (line 118) | class SingleAnalyzer: method __init__ (line 121) | def __init__(self): method _format_history (line 128) | def _format_history(self, history: List[Dict]) -> str: method _format_options_block (line 142) | def _format_options_block(self, signal: Dict) -> str: method _format_catalyst (line 157) | def _format_catalyst(self, signal: Dict) -> str: method _format_price_context (line 169) | def _format_price_context(self, signal: Dict) -> str: method _call_api (line 175) | def _call_api(self, prompt: str) -> str: method analyze (line 184) | def analyze(self, signal: Dict, news: List[Dict]) -> Dict: method analyze_batch (line 263) | def analyze_batch(self, signals: List[Dict], news_map: Dict) -> List[D... FILE: src/alerts/email_sender.py function _format_signal (line 137) | def _format_signal(sig: Dict) -> str: function _format_exit (line 199) | def _format_exit(exit_data: Dict) -> str: function _format_warning (line 242) | def _format_warning(warning: Dict) -> str: function build_html (line 252) | def build_html( function send_email (line 371) | def send_email(subject: str, html: str) -> bool: function send_report (line 395) | def send_report( FILE: src/enrich/catalyst_finder.py function get_earnings_date (line 24) | def get_earnings_date(ticker: str) -> Optional[date]: function catalyst_score (line 53) | def catalyst_score(ticker: str, expiry_date: Optional[date] = None) -> D... FILE: src/enrich/macro_context.py function _polymarket (line 18) | def _polymarket(keywords: List[str]) -> List[Dict]: function _kalshi (line 39) | def _kalshi(keywords: List[str]) -> List[Dict]: function get_macro_context (line 59) | def get_macro_context(ticker: str, sector: str = "") -> Dict: FILE: src/enrich/options_prefilter.py function calculate_iv_rank (line 17) | def calculate_iv_rank(ticker: str, current_iv: float) -> float: function find_target_expiry (line 49) | def find_target_expiry(ticker: str) -> Optional[str]: function find_best_call (line 77) | def find_best_call(ticker: str, stock_price: float, expiration: str) -> ... function options_prefilter (line 136) | def options_prefilter(ticker: str) -> Dict: function conviction_modifier_for_iv (line 208) | def conviction_modifier_for_iv(iv_rank: float) -> float: function post_claude_options_check (line 223) | def post_claude_options_check(ticker: str) -> Dict: FILE: src/enrich/price_context.py function _fetch_history (line 25) | def _fetch_history(ticker: str, period: str = "1y") -> Optional[Dict]: function get_price_context (line 38) | def get_price_context(ticker: str) -> Dict: function format_for_prompt (line 93) | def format_for_prompt(context: Dict) -> str: FILE: src/enrich/sentiment.py function calculate (line 38) | def calculate(news: List[Dict]) -> float: FILE: src/execution/exit_manager.py function _calculate_pnl (line 24) | def _calculate_pnl(entry_mid: float, current_mid: float) -> float: function _days_to_expiry (line 31) | def _days_to_expiry(expiry: str) -> int: function _get_current_option_mid (line 39) | def _get_current_option_mid(ticker: str, strike: float, expiry: str) -> ... function _check_fund_sold (line 57) | def _check_fund_sold(position: Dict) -> bool: function _check_insider_sold (line 80) | def _check_insider_sold(position: Dict) -> bool: function check_exit_triggers (line 100) | def check_exit_triggers(position: Dict) -> Dict: function run_exit_check (line 205) | def run_exit_check() -> List[Dict]: FILE: src/execution/tradier_client.py class TradierClient (line 14) | class TradierClient: method __init__ (line 19) | def __init__(self, api_key: Optional[str] = None): method is_configured (line 30) | def is_configured(self) -> bool: method get_quote (line 36) | def get_quote(self, ticker: str) -> Optional[Dict]: method get_expirations (line 71) | def get_expirations(self, ticker: str) -> List[str]: method get_options_chain (line 90) | def get_options_chain(self, ticker: str, expiration: str, with_greeks:... method get_history (line 116) | def get_history(self, ticker: str, interval: str = "weekly", start: Op... function get_client (line 143) | def get_client() -> TradierClient: FILE: src/ingest/eight_k_fetcher.py function _extract_cik_from_url (line 36) | def _extract_cik_from_url(url: str) -> int: function _parse_item_score (line 46) | def _parse_item_score(summary: str) -> int: function fetch (line 62) | def fetch() -> List[Dict]: FILE: src/ingest/form4_fetcher.py function _extract_cik_from_url (line 30) | def _extract_cik_from_url(url: str) -> int: function _has_10b5_plan (line 41) | def _has_10b5_plan(text: str) -> bool: function _is_likely_sell (line 45) | def _is_likely_sell(title: str, summary: str) -> bool: function _fetch_raw (line 60) | def _fetch_raw() -> List[Dict]: function _detect_clustered (line 85) | def _detect_clustered(raw: List[Dict]) -> List[Dict]: function fetch (line 171) | def fetch() -> List[Dict]: FILE: src/ingest/gov_trades_fetcher.py function _trade_id (line 49) | def _trade_id(politician: str, ticker: str, date: str, txtype: str) -> str: function _is_buy (line 54) | def _is_buy(tx: str) -> bool: function _parse_amount (line 61) | def _parse_amount(s: str) -> int: function _clean_ticker (line 75) | def _clean_ticker(raw: str): function _cutoff (line 90) | def _cutoff() -> str: function _from_quiver (line 95) | def _from_quiver() -> List[Dict]: function _pol_score (line 142) | def _pol_score(name: str) -> int: function _dedup (line 149) | def _dedup(trades: List[Dict]) -> List[Dict]: function fetch (line 166) | def fetch(days_back: int = LOOKBACK_DAYS) -> List[Dict]: FILE: src/ingest/news_fetcher.py function _match (line 24) | def _match(text: str) -> bool: function _fetch_rss (line 29) | def _fetch_rss(url: str, source: str, ticker: str) -> List[Dict]: function fetch (line 46) | def fetch(ticker: str) -> List[Dict]: FILE: src/ingest/thirteenf_fetcher.py function _get_thresholds (line 26) | def _get_thresholds(): function _current_quarter (line 33) | def _current_quarter() -> str: function _date_to_quarter (line 38) | def _date_to_quarter(date_str: str) -> str: function _save_holdings (line 48) | def _save_holdings(cik: str, fund_name: str, quarter: str, function _get_quarters (line 72) | def _get_quarters(cik: str) -> List[str]: function _get_holdings (line 81) | def _get_holdings(cik: str, quarter: str) -> Dict[str, Dict]: function _get_portfolio_total (line 97) | def _get_portfolio_total(cik: str, quarter: str) -> int: function get_consecutive_increases (line 108) | def get_consecutive_increases(cik: str, ticker: str) -> int: function _company_to_ticker (line 194) | def _company_to_ticker(company: str) -> Optional[str]: function _cusip_cache_get (line 204) | def _cusip_cache_get(cusip: str) -> Optional[str]: function _cusip_cache_set (line 217) | def _cusip_cache_set(cusip: str, ticker: str, name: str = ""): function _resolve_ticker (line 230) | def _resolve_ticker(cusip: str, company: str) -> Optional[str]: function _get_submissions (line 259) | def _get_submissions(cik: str) -> dict: function _extract_infotable_xml (line 266) | def _extract_infotable_xml(full_txt: str) -> Optional[str]: function _findtext (line 287) | def _findtext(elem, tag: str) -> str: function _parse_infotable_xml (line 297) | def _parse_infotable_xml(xml_text: str, cik: str) -> Tuple[List[Dict], i... function _fetch_filing (line 369) | def _fetch_filing(cik: str, index: int = 0) -> Optional[Tuple[str, List[... function _real_conviction (line 431) | def _real_conviction(curr_val: int, prev_val: int, curr_shares: int, function _calculate_delta (line 505) | def _calculate_delta(current: List[Dict], previous: Dict[str, Dict], function _fetch_baseline (line 623) | def _fetch_baseline(cik: str, fund_name: str) -> bool: function fetch (line 634) | def fetch(funds_config: List[Dict], scorer) -> List[Dict]: FILE: src/score/fund_scorer.py function _normalize (line 9) | def _normalize(name: str) -> str: class FundScorer (line 14) | class FundScorer: method __init__ (line 15) | def __init__(self): method get_score (line 18) | def get_score(self, fund_name: str) -> int: method get_info (line 35) | def get_info(self, fund_name: str) -> Dict: FILE: src/score/signal_builder.py function is_valid_ticker (line 17) | def is_valid_ticker(ticker: str) -> bool: function build_signals_from_form4 (line 23) | def build_signals_from_form4(form4: List[Dict], function build_signals_from_13f (line 61) | def build_signals_from_13f(thirteenf_signals: List[Dict], function build_signals_from_8k (line 84) | def build_signals_from_8k(eight_k: List[Dict], function build_signals_from_gov (line 110) | def build_signals_from_gov(gov: List[Dict], function merge_by_ticker (line 157) | def merge_by_ticker(signals: List[Signal], sf: SignalFilter) -> List[Sig... FILE: src/score/signal_filter.py class Signal (line 24) | class Signal: class SignalFilter (line 44) | class SignalFilter: method is_valid (line 47) | def is_valid(self, s: Signal) -> bool: method weighted_score (line 73) | def weighted_score(self, s: Signal) -> float: method calculate_conviction (line 105) | def calculate_conviction(self, position_pct: float, days_since_buy: int, method calculate_strength (line 136) | def calculate_strength(self, sources: List[str]) -> int: method filter_and_rank (line 154) | def filter_and_rank(self, signals: List[Signal]) -> List[Signal]: FILE: src/utils/config.py function load (line 18) | def load(name: str) -> Dict: function get_threshold (line 52) | def get_threshold(category: str, key: str, default=None): function reload (line 63) | def reload(): FILE: src/utils/retry.py function retry (line 8) | def retry(times=3, delay=5, backoff=2): FILE: src/utils/storage.py function get_conn (line 17) | def get_conn(): function init_db (line 24) | def init_db(): function save_signal (line 170) | def save_signal(sig: dict): function get_fund_history (line 194) | def get_fund_history(fund_name: str, limit: int = 3) -> list: function get_fund_accuracy (line 206) | def get_fund_accuracy(fund_name: str) -> float: function is_duplicate (line 220) | def is_duplicate(ticker: str, signal_type: str, days: int = 5) -> bool: function save_position (line 232) | def save_position(pos: dict): function get_open_positions (line 252) | def get_open_positions() -> List[Dict]: function update_position (line 261) | def update_position(position_id: int, updates: dict): function close_position (line 272) | def close_position(position_id: int, exit_data: dict): function log_scan (line 293) | def log_scan(found: int, sent: int, status: str, error: str = "", run_mo... function log_source_health (line 305) | def log_source_health(source: str, count: int): function get_source_warnings (line 314) | def get_source_warnings(consecutive_days: int = 3) -> list: function save_form4_trades (line 346) | def save_form4_trades(trades: list): function get_recent_form4_by_ticker (line 364) | def get_recent_form4_by_ticker(ticker: str, days: int = 5) -> list: function cleanup_old_form4 (line 376) | def cleanup_old_form4(days: int = 90): function get_signal_fund_for_position (line 385) | def get_signal_fund_for_position(ticker: str, signal_date: str) -> Optio... function get_thirteenf_trend (line 396) | def get_thirteenf_trend(fund_name: str, ticker: str, quarters: int = 2) ... function get_form4_sells (line 407) | def get_form4_sells(ticker: str, days: int = 90) -> List[Dict]: FILE: src/utils/ticker_resolver.py function _get_user_agent (line 69) | def _get_user_agent() -> str: class _TransientError (line 91) | class _TransientError(Exception): class _PermanentMiss (line 95) | class _PermanentMiss(Exception): class _CIKCache (line 102) | class _CIKCache: method __init__ (line 103) | def __init__(self, maxsize: int = CACHE_L1_MAXSIZE, ttl: int = CACHE_T... method get (line 109) | def get(self, cik: int) -> Optional[str]: method set (line 121) | def set(self, cik: int, ticker: str, *, source: str = "?") -> None: method invalidate (line 131) | def invalidate(self, cik: int) -> None: method size (line 137) | def size(self) -> int: function _db_conn (line 149) | def _db_conn() -> Generator[sqlite3.Connection, None, None]: function _init_db (line 162) | def _init_db() -> None: function _l2_get (line 179) | def _l2_get(cik: int) -> Optional[str]: function _l2_set (line 194) | def _l2_set(cik: int, ticker: str, *, source: str) -> None: function _warm_l1_from_db (line 207) | def _warm_l1_from_db(limit: int = CACHE_L1_MAXSIZE) -> int: function _cache_get (line 229) | def _cache_get(cik: int) -> Optional[str]: function _cache_set (line 240) | def _cache_set(cik: int, ticker: str, *, source: str, overwrite: bool = ... function cache_invalidate (line 254) | def cache_invalidate(cik_raw: int | str) -> None: function _edgar_call_allowed (line 273) | def _edgar_call_allowed() -> bool: function _lookup_via_edgar (line 296) | def _lookup_via_edgar(cik: int) -> str: function _extract_ticker_from_title (line 343) | def _extract_ticker_from_title(title: str) -> Optional[str]: function _extract_cik (line 362) | def _extract_cik(title: str) -> Optional[str]: function resolve_ticker (line 375) | def resolve_ticker( function cache_stats (line 446) | def cache_stats() -> dict: function clear_cache (line 474) | def clear_cache(*, l1: bool = True, l2: bool = False) -> None: FILE: tests/test_ai.py function test_sentiment_bullish (line 11) | def test_sentiment_bullish(): function test_sentiment_bearish (line 20) | def test_sentiment_bearish(): function test_sentiment_neutral (line 29) | def test_sentiment_neutral(): function test_iv_modifier_curves (line 38) | def test_iv_modifier_curves(): FILE: tests/test_ingest.py function test_ticker_extraction_regex (line 12) | def test_ticker_extraction_regex(): function test_cik_extraction (line 20) | def test_cik_extraction(): function test_8k_item_score (line 26) | def test_8k_item_score(): function test_gov_ticker_clean (line 45) | def test_gov_ticker_clean(): function test_gov_amount_parse (line 54) | def test_gov_amount_parse(): FILE: tests/test_scoring.py function test_fund_scorer_known_fund (line 11) | def test_fund_scorer_known_fund(): function test_fund_scorer_ignored_fund (line 17) | def test_fund_scorer_ignored_fund(): function test_fund_scorer_unknown_fund (line 23) | def test_fund_scorer_unknown_fund(): function test_signal_filter_hard_gates (line 29) | def test_signal_filter_hard_gates(): function test_weighted_score_consecutive_quarters_bonus (line 56) | def test_weighted_score_consecutive_quarters_bonus(): function test_strength_combo (line 75) | def test_strength_combo():