Screen by Technical Signals (FinBridge DB)
screen_technicalScreen KR/US companies by technical signals over the latest indicator snapshots (v_indicators / indicators_latest, refreshed nightly). Signals and the sort key are fixed whitelists mapped to SQL predicates; every threshold is bound as a parameter, so inputs are never interpolated into SQL.
Args:
market: 'kr' (DART), 'us' (EDGAR), or 'all' (default)
signals: any of golden_cross, dead_cross, rsi_oversold (RSI<30), rsi_overbought (RSI>70), near_52w_high (within 3% of high), near_52w_low, above_sma20, volume_surge (vol_ratio>=2), macd_bullish (macd_hist>0), rs_leader (RS rating >=80 vs home market), rs_outperform (RS rating >=60). ANDed together; omit for none.
min_price: optional minimum close; min_vol_avg20: optional minimum 20-day average volume (liquidity filter)
sort_by: ret_1d|ret_5d|ret_20d|ret_60d|ret_120d|ret_250d|rsi14|vol_ratio|pct_from_52w_hi|pct_from_52w_lo|close|atr14|rs_pctile|rs_120d (default ret_20d)
order: 'asc'|'desc' (default 'desc'); limit: 1-100 (default 20); response_format: 'markdown'|'json'
Relative strength (rs_pctile 1-99, rs_120d) measures each stock vs its OWN national market (KR vs the KR universe, US vs the US universe): rs_pctile is the national percentile of blended 3/6/12-month momentum (IBD-style; 99=strongest); rs_120d is 6-month excess return in pp over the national median.
Returns: {count, market, signals, sort_by, order, rows:[{name, source, ticker|stock_code, as_of, close, rsi14, macd_hist, ret_5d, ret_20d, ret_60d, vol_ratio, pct_from_52w_hi, pct_from_52w_lo, golden_cross, dead_cross, above_sma20, rs_pctile, rs_120d}]}.
Examples:
Oversold KR names by 20-day return: {market:'kr', signals:['rsi_oversold'], sort_by:'ret_20d', order:'asc'}
US breakouts near highs on volume: {market:'us', signals:['near_52w_high','volume_surge'], min_vol_avg20: 1000000}
Strongest KR leaders vs the KOSPI/KOSDAQ universe: {market:'kr', signals:['rs_leader'], sort_by:'rs_pctile', min_vol_avg20: 100000}
Use when: ranking/filtering many companies by momentum or trend signals. Don't use for one company's detail (get_technicals) or fundamentals (screen_companies). Notes: KR/US/TW prices are adjusted for corporate actions but not dividends (indicators around dividend events may be slightly distorted); US history starts 2023-03-28 (volume from 2024-07-01) so long-window figures are shallower there. Market data, not investment advice. Errors: an empty result is not an error (count 0); 'database has not been built yet' -> ingest/indicators has not run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows, 1-100 (default 20) | |
| order | No | Sort direction (default desc) | desc |
| market | No | Market: 'kr' (default), 'us', 'tw', or 'all'. Japan has no redistributable price source, so it is not screenable. | kr |
| signals | No | Technical signals to require (ANDed): golden_cross, dead_cross, rsi_oversold, rsi_overbought, near_52w_high, near_52w_low, above_sma20, volume_surge, macd_bullish, rs_leader (RS>=80), rs_outperform (RS>=60) | |
| sort_by | No | Column to sort by (default ret_20d) | ret_20d |
| min_price | No | Minimum close price filter | |
| min_vol_avg20 | No | Minimum 20-day average volume (liquidity filter) | |
| response_format | No | 'markdown' for a table, 'json' for compact machine-readable output | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| count | Yes | ||
| notes | No | ||
| order | No | ||
| market | Yes | ||
| signals | No | ||
| sort_by | No | ||
| us_note | No | ||
| criteria | No |