CLI screener for US stocks based on LLM + financial metrics (P/FCF, EV/EBITDA, SOTP, float/EV)
Project description
ai-asset-screener
General info
ai-asset-screener is a CLI tool for fast, fundamentals-driven equity screening with LLM-assisted reading of 10-K filings. It pulls core metrics from Yahoo Finance, enriches them with fair-value EV adjustments and insurance float extracted from 10-Ks, and builds a segment-level SOTP model. The tool issues BUY/SELL/UNSURE signals per metric and per peer group using robust, outlier-aware rules, then aggregates them into a final verdict. Configuration is done via environment variables (.env supported): LLM_MODEL (required), plus either an OpenAI-compatible LLM_ENDPOINT or LLM_OPENAI_API_KEY. Results are printed as readable console reports with group details and a summary table; intermediate data and 10-K parses are cached under cache/. Logging goes to asset.log.
Features list
-
Data foundation
- Yahoo Finance fetch (market cap, EV, debt, cash, FCF TTM, EBIT/EBITDA TTM, Forward P/E) with local JSON caching per ticker.
- EDGAR 10-K ingestion (via
edgartools) to analyze notes and segment disclosures; large-file chunking and caching.
-
Fair-value EV adjustments (10-K notes => EV)
- LLM extracts candidate items with signed deltas (USD millions): e.g., lease liabilities, pension deficits, TRA payables, contingent consideration, AROs, environmental liabilities, FV uplifts/discounts.
- Canonicalization + whitelist/blacklist filters (drops obligations without recognized liabilities, operating-lease obligations schedules, VIE “exposures”, deferred taxes, etc.).
- Sanity caps by category and as a fraction of EV; duplicates merged; EV and EV/EBITDA recomputed.
-
Insurance float model (insurers only)
-
LLM reads balance/notes to assemble float components (USD millions):
- Unpaid losses & LAE (net), Unearned premiums (net), Future policy benefits, Policyholders’ account balances, Other insurance liabilities; − Reinsurance recoverable, (Re)insurance balances receivable, Deferred charge assets for retroactive reinsurance.
-
Strict netting rules (prefer NET where disclosed), scale sanity checks, and Float/EV ratio computed.
-
-
SOTP (Sum-of-the-Parts) from operating segments
- LLM extracts operating segments (ASC 280) for the latest year and parses a clean table:
Segment | Revenue | Operating income. - Segment valuation via peer median EV/EBIT; fallback: EV/EBITDA × 1.25 when EV/EBIT is sparse.
- Loss-making segments: insurers => EV≈0 (conservative); others => fallback EV/Sales ≈ 1× if revenue is available.
- Outputs per-segment implied EVs, peer bucket used, multiples applied, and a premium/discount vs current EV.
- LLM extracts operating segments (ASC 280) for the latest year and parses a clean table:
-
Signals & robustness
-
Metric signals (IQR rule):
- Forward P/E, P/FCF, EV/EBITDA => BUY if value < Q1, SELL if > Q3, else UNSURE (with caps for outliers).
- Float/EV signal for insurers uses peer quartiles within subsector (P&C / Life / Reins / Conglom).
-
SOTP signal: discount/premium threshold ±10% => BUY/SELL; otherwise UNSURE.
-
Majority vote across available signals with tie-break priority: EV/EBITDA > P/FCF > Forward P/E.
-
-
Peer groups & auto-scoping
- Built-in universes (e.g., BIG_TECH, SEMI, CLOUD_SOFTWARE, INTERNET_ADS, ECOMMERCE, AUTO_EV, ASSET_MANAGERS, CONGLOMERATES, INSURANCE, CRYPTO miners/exchanges).
- Auto-selection of relevant groups for a ticker or explicit filtering via
--group.
-
DX & ops
.envsupport; clear stdout reports (per group + consolidated table).- Persistent caching for Yahoo snapshots and 10-K-derived artifacts.
- Structured logging to
asset.log.
How to run:
pip install -e .
ai-asset-screener --ticker=ADBE --group=BIG_TECH_CORE --use-cache
.env file example:
LLM_ENDPOINT = "http://localhost:1234/v1"
LLM_MODEL = "openai/gpt-oss-20b"
Add LLM_OPENAI_API_KEY if you use commercial OpenAI API and remove LLM_ENDPOINT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_asset_screener-0.1.0.tar.gz.
File metadata
- Download URL: ai_asset_screener-0.1.0.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
509971a67d0bcbe3605569f0d3593e9fd86cbdd8679606fcdc1828ad66ca8776
|
|
| MD5 |
a9acbea9cf32264dc01e31175d391daa
|
|
| BLAKE2b-256 |
97459caee8f4a31bd9fec1ba91412e8a5eb83858e2493226f638789e03b51e11
|
File details
Details for the file ai_asset_screener-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_asset_screener-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5589f8452dc2519ac52e774e1bb5b82da3d788694b027a0598c623661604b1c5
|
|
| MD5 |
6c10bedf7db903758a9603252d011523
|
|
| BLAKE2b-256 |
012b8bf37f9a2527366c632b50f9d808bd90db4d3a04576902be5290d4f0783a
|