ezyquant.reader.SETDataReader.get_data_symbol_daily#
- SETDataReader.get_data_symbol_daily(field: str, symbol_list: List[str] | None = None, start_date: str | None = None, end_date: str | None = None, adjusted_list: List[str] = ['', 'CR', 'PC', 'RC', 'SD', 'XR']) DataFrame #
Data from table DAILY_STOCK_TRADE, DAILY_STOCK_STAT.
Filter only Auto Matching (I_TRADING_METHOD=’A’).
- Parameters:
field (str) –
prior
open
high
low
close
average
last_bid
last_offer
trans
volume
value
pe
pb
par
dps
dvd_yield
mkt_cap
eps
book_value
quarter_fin
month_dvd
as_of
dividend
status
benefit
share_listed
turnover
share_index
npg
total_volume
total_value
beta
roi
acc_dps
dvd_payment
dvd_payout
earning
iv
delta
notice
non_compliance
stabilization
call_market
caution
12m_dvd_yield
peg
has_trade (if close > 0 or last_bid > 0 or last_offer > 0 return 1.0 else 0.0/nan)
symbol_list (Optional[List[str]] = None) – N_SECURITY in symbol_list (must be unique).
start_date (Optional[str] = None) – start of trade_date (D_TRADE), by default None
end_date (Optional[str] = None) – end of trade_date (D_TRADE), by default None
adjusted_list (List[str] = ["", "CR", "PC", "RC", "SD", "XR"]) – Adjust data by ca_type (empty list for no adjustment).
- Returns:
symbol(N_SECURITY): str as column
trade_date(D_TRADE): date as index
- Return type:
pd.DataFrame
Warning
OHLCV is 0 if no trade.
Examples
>>> from ezyquant import SETDataReader >>> from ezyquant import fields as fld >>> sdr = SETDataReader() >>> sdr.get_data_symbol_daily( ... field=fld.D_CLOSE, ... symbol_list=["COM7", "MALEE"], ... start_date="2022-01-01", ... end_date="2022-01-10", ... ) COM7 MALEE 2022-01-04 41.875 6.55 2022-01-05 41.625 6.50 2022-01-06 41.500 6.50 2022-01-07 41.000 6.40 2022-01-10 40.875 6.30