detect_ytd_high_low
Screen stocks for year-to-date high and low records by comparing today's price against all sessions since the start of the calendar year. Supports single or cross-sectional scan.
Instructions
Screen for year-to-date high/low records (年初来高値/安値 更新). All plans.
Use for 年初来高値, 年初来安値, YTD high/low, 年初来高値更新. For multi-date scans use detect_ytd_high_low_range (not repeated calls here). For 52-week rolling window use detect_52w_high_low instead.
Compares today against every session since the first trading day of the same calendar year — matches Kabutan / Yahoo!ファイナンス convention. Default params hit the nightly pre-computed cache (sub-second). date must be within the past 52 weeks. Data available ~17:15 JST on trading days.
[Supported plans] Free / Light / Standard / Premium (cache-only, no API call)
Args: date: Trading date (YYYYMMDD or YYYY-MM-DD). Within past 52 weeks. code: Optional stock code. Omit to scan all codes (cross-sectional). min_prior_sessions: Drop codes with fewer YTD prior sessions (default 60; set 1 to disable). detail: Include full per-stock data array (default False = summary counts only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| code | No | ||
| min_prior_sessions | No | ||
| detail | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||