English |
繁體中文 |
臺語 |
简体中文 |
日本語 |
한국어
Open Stock Picker is a multilingual AI-assisted stock research web app. Its main workflow is no-code market scanning: choose markets and a strategy, then let the Python backend discover, score, and rank higher-quality stocks for investment research across China A-shares, Hong Kong, Japan, South Korea, Singapore, the United States, and Taiwan.
It is designed for real research workflows, not a static portfolio mockup. The app does not execute trades and does not store broker credentials.
Hosted preview: tamyu321-source.github.io/stock-picker
The hosted GitHub Pages build runs in static demo mode with sample data. Run the Flask backend locally to use live market data, RSS/news crawling, and streaming scans.
- Scan markets directly without entering tickers first.
- See live, incremental picks while the backend is still analyzing.
- Cancel longer scans without losing any picks that already streamed in.
- Compare stock-level and sector-level results from the same scored candidate set.
- Save recent scans locally and export research notes as Markdown or JSON.
- Inspect explainable 100-point scoring across momentum, value, news sentiment, risk, and quality.
- Use English, Simplified Chinese, Traditional Chinese, Taiwanese, Japanese, or Korean UI.
- Narrow a scan with ticker or company-name input when you already know what to research.
- Vue 3 + Vite frontend with persistent settings and responsive research workspace.
- Python Flask backend with live data providers, RSS/news crawling, and explainable scoring.
- Direct market scanning without requiring users to enter stock codes first.
- Automatic market-universe discovery instead of a hard-coded stock list.
- Streaming NDJSON API so picks appear progressively during longer scans.
- Cancellable scan requests wired through browser
AbortController. - Shared in-memory TTL cache for repeated market-data and news requests.
- Local saved-scan history plus Markdown and JSON export for follow-up research.
- Live price history through Yahoo Finance chart endpoints, with optional
yfinancesupport when installed. - Market-specific RSS/news crawling through Google News, Eastmoney fallbacks, and local source filters.
- Default strategies for balanced, growth, and defensive value investing.
- Custom strategy sliders for momentum, valuation, sentiment, risk, and quality weights.
- Buy, watch, and sell verdicts with decision reasons, source links, action plans, and risk controls.
| Market | Ticker examples | Discovery notes |
|---|---|---|
| United States | AAPL, MSFT, NVDA |
Yahoo Finance screeners and news search |
| China A-shares | 600519.SS, 300750.SZ |
Eastmoney market lists, local names, and fallback metadata |
| Hong Kong | 0700.HK, 9988.HK |
Eastmoney Hong Kong lists and company aliases |
| Japan | 7203.T, 6758.T |
Curated liquid universe plus Yahoo-style symbols |
| South Korea | 005930.KS, 000660.KS |
Curated liquid universe plus Yahoo-style symbols |
| Singapore | D05.SI, C38U.SI |
SGX securities API sorted by volume |
| Taiwan | 2330.TW, 2317.TW |
TWSE open data, local company names, and Yahoo/TWSE fallback |
Vue 3 web app
-> /api/config strategy, market, and default ticker metadata
-> /api/analyze live data fetch, RSS crawl, scoring, verdicts, explanations
-> /api/analyze/stream incremental NDJSON scan events
Flask backend
-> backend/universe.py dynamic market-universe discovery
-> backend/providers.py market data providers and RSS/news crawlers
-> backend/cache.py short-lived in-memory cache for repeated provider calls
-> backend/services.py metric calculation, strategy selection, explainable scoring
-> backend/app.py REST API
Install frontend dependencies:
npm installInstall backend dependencies:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtRun the backend:
python -m backend.appRun the frontend in a second terminal:
npm run devOpen http://127.0.0.1:5173.
- GitHub Pages serves the Vue build only. It uses built-in sample data so visitors can inspect the interface without running Python.
- Local development with
python -m backend.appenables live/api/config,/api/analyze, and/api/analyze/stream. - The app shows a data-mode status in the top strip so users can tell whether they are looking at sample data or live backend output.
The main user flow is to leave the optional stock field empty. The backend then discovers candidates at request time and ranks them as investment research ideas.
Discovery priority for blank scans:
- Local finance-news sources.
- Google News market searches.
- Market-universe APIs such as Yahoo, Eastmoney, SGX, and TWSE.
- Curated fallback symbols when live sources are unreachable.
The API response includes scan.source, scan.requested, scan.succeeded, scan.displayed, scan.failed, and scan.discoveryErrors so the UI can show whether a scan came from live universe discovery, news-led discovery, or a fallback.
The score is intentionally explainable:
momentum: recent price trend from live historical closes.value: valuation score from trailing PE, forward PE, price-to-book, and available proxy metrics.sentiment: recent market-specific news content, weighted by source credibility, article recency, company relevance, title, and RSS summary.risk: beta, realized volatility, and severe price-action checks.quality: ROE, profit margin, debt-to-equity, growth, size, and liquidity when available.
The strategy weights determine how these metrics combine into a final score. The result is research support, not financial advice.
Backend API tests use dependency-injected fake providers so CI does not depend on external network calls:
python -m unittest discover backend/testsFrontend production build:
npm run buildPull requests are expected to pass both checks in GitHub Actions.
- Add caching before scanning large watchlists. A Redis or SQLite cache is enough for a first production version.
- The default Flask app already includes a short-lived in-memory cache for repeated scans in one process.
- Add rate limits and request timeouts for every external provider.
- For higher reliability, replace or supplement Yahoo Finance with a paid market-data API.
- Keep all API keys in environment variables and never commit
.envfiles. - Do not add broker order placement until authentication, audit logs, compliance review, and risk controls are built.
For GitHub Pages plus Google Cloud Run, see docs/github-pages-cloud-run.zh-TW.md. For GitHub Actions auto-deploy to Cloud Run, see docs/github-pages-cloud-run-auto-deploy.zh-TW.md. For login, per-key user state, and admin setup, see docs/auth-user-management.zh-TW.md. For Google Cloud Shell bash commands, see docs/cloud-shell-deploy-commands.md.
Linux example:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
npm ci
npm run build
gunicorn 'backend.app:app' --bind 127.0.0.1:8000Windows example:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
npm install
npm run build
waitress-serve --listen=127.0.0.1:8000 backend.app:appUse Nginx, IIS, or another reverse proxy to serve dist/ and forward /api to the Flask service.
See CONTRIBUTING.md for the local workflow, validation commands, and contribution scope.
See SECURITY.md for reporting guidance and the current security model.
This application is for investment research workflow support only. It is not financial advice and does not execute trades.