reddgr commited on
Commit
4cb284c
·
verified ·
1 Parent(s): a17adcf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -1
README.md CHANGED
@@ -11,4 +11,63 @@ license: apache-2.0
11
  short_description: Search over 12k companies by theme (VSS) or similarity (NNS)
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  short_description: Search over 12k companies by theme (VSS) or similarity (NNS)
12
  ---
13
 
14
+ ## Overview
15
+
16
+ **Swift Stock Screener (SSS)** is an interactive application that enables semantic and similarity-based stock screening across ~13,000 equities.
17
+ It combines **semantic vector search** on company descriptions with **nearest neighbor search** on financial fundamentals.
18
+
19
+ The app allows two main modes:
20
+ - **Theme search**: find stocks relevant to a concept (e.g., *“lithium”*, *“cloud computing”*).
21
+ - **Ticker similarity search**: find peers to a given stock (e.g., *NVDA* → other semiconductors).
22
+
23
+ Data (fundamentals and descriptions) is sourced from **Yahoo Finance**. Company **descriptions used in the semantic search** come directly from Yahoo Finance long summaries.
24
+
25
+ ---
26
+
27
+ ## Features
28
+
29
+ - **Semantic Theme Search**
30
+ Uses `FinLang/finance-embeddings-investopedia` to embed queries and company descriptions.
31
+ DuckDB with **HNSW vector index** executes approximate nearest neighbor search.
32
+ Re-ranking adds:
33
+ - **Literal rewards** (companies explicitly mentioning query terms boosted).
34
+ - **Brevity penalties** (companies with very short descriptions are penalized).
35
+
36
+ - **Ticker Similarity Search**
37
+ Uses normalized numeric fundamentals (e.g., Market Cap, P/E, Revenue Growth, Volatility).
38
+ Scikit-learn **NearestNeighbors** finds the closest peers.
39
+ A **Similarity Index (0–100)** is computed with a gamma distribution scaling to give intuitive scores.
40
+
41
+ - **Interactive Results Table**
42
+ Paginated grid view with columns:
43
+ - Name, Country, Sector, Market Cap
44
+ - 1yr Return, Volatility, P/E, Revenue Growth, Dividend Yield, Beta
45
+ Negative values are highlighted red.
46
+
47
+ - **Dynamic Filtering**
48
+ Click on a sector, industry, or country in the grid to filter results interactively.
49
+ Multiple filters can be applied in succession.
50
+
51
+ - **Company Details View**
52
+ - Company name + Yahoo Finance description.
53
+ - Full fundamentals table.
54
+ - **Radar chart** of 5 normalized metrics: Beta, Debt/Equity, 1yr Return, Revenue Growth, Volatility.
55
+
56
+ - **Controls**
57
+ - **Theme box**: free text search.
58
+ - **Ticker box**: find peers to a stock.
59
+ - **Search** / **Reset** / **Random ticker** buttons.
60
+ - Sorting by any metric.
61
+
62
+ ---
63
+
64
+ ## Architecture
65
+
66
+ - **Data**: Yahoo Finance fundamentals + descriptions.
67
+ - **Embeddings**: `FinLang/finance-embeddings-investopedia` (768-dim vectors).
68
+ - **Vector DB**: DuckDB with VSS extension + HNSW cosine index.
69
+ - **Ticker similarity**: Scikit-learn `NearestNeighbors` with Euclidean distance over normalized features.
70
+ - **UI**: Python + Gradio Blocks.
71
+ - **Visualization**: Plotly for radar chart.
72
+
73
+ ---