I need to filter Japanese stock data that meets the following criteria:
- Exchanges: Tokyo (TKS), Osaka (OSE), Nagoya (NGY), Fukuoka (FKU)
- Security Type: Common Stock
- Listing Status: Including Active and Delisted
- Country of Domicile: Japan
- Time Range: Monthly data from January 2024 to April 2025
I have tried various query methods and encountered errors:
- Using SCREENER syntax:
Query: U(IN(Equity(active,inactive,TKS,OSE,NGY,FKU)))
Error: Error code -1 | The '(' delimiter is unexpected in identifiers - Using exchange list queries:
Query: 0#.T, 0#.OS, etc.
Issue: Uncertain if this correctly retrieves all stocks meeting the criteria - Other attempted syntax:
- SCREEN(U(IN(Exchanges(TKS,OSE,NGY,FKU))))
- screen(U(IN(Exchanges(TKS,OSE,NGY,FKU)), EQUITY:COMMON))
These all produce syntax errors
Questions:
- What is the correct SCREENER syntax? Specifically, how to filter for:
- Multiple Japanese exchanges
- Common stocks only
- Including delisted stocks
- Japan-domiciled companies
- How to implement this filtering using rd.get_data() or other functions?
- Could you help modify my code?
我使用的程式碼片段:
import refinitiv.data as rd
# 連接設定
rd.open_session("platform.rdp")
# 嘗試的查詢(都失敗了)
basic_data = rd.get_data(
universe="SCREEN(U(IN(Exchanges(TKS,OSE,NGY,FKU))))",
fields=['TR.RIC', 'TR.CompanyName', 'TR.ExchangeName']
)