ezyquant.reader.SETDataReader.get_data_sector_daily#
- SETDataReader.get_data_sector_daily(field: str, sector_list: List[str] | None = None, start_date: str | None = None, end_date: str | None = None) DataFrame #
Data from table DAILY_SECTOR_INFO. Filter only sector data.
- Parameters:
field (str) –
prior
open
high
low
close
trans
volume
value
mkt_pe
mkt_pbv
mkt_yield
mkt_cap
turnover
share_listed_avg
beta
turnover_volume
12m_dvd_yield
sector_list (Optional[List[str]] = None) – N_SYMBOL_FEED in sector_list. More sector can be found in ezyquant.fields
start_date (Optional[str] = None) – start of trade_date (D_TRADE).
end_date (Optional[str] = None) – end of trade_date (D_TRADE).
- Returns:
sector: str as column
trade_date: date as index
- Return type:
pd.DataFrame
Examples
>>> from ezyquant import SETDataReader >>> from ezyquant import fields as fld >>> sdr = SETDataReader() >>> sdr.get_data_sector_daily( ... field=fld.D_SECTOR_CLOSE, ... sector_list=[fld.SECTOR_AGRI, fld.SECTOR_BANK], ... start_date="2022-01-01", ... end_date="2022-01-10", ... ) AGRI BANK 2022-01-04 296.13 421.31 2022-01-05 297.66 423.08 2022-01-06 299.85 417.30 2022-01-07 300.12 421.00 2022-01-10 306.93 423.81