ezyquant.reader.SETDataReader.get_data_symbol_ttm#
- SETDataReader.get_data_symbol_ttm(field: str, symbol_list: List[str] | None = None, start_date: str | None = None, end_date: str | None = None) DataFrame #
Trailing 12 months (TTM) is a term used to describe the past 12 consecutive months of a company’s performance data.
TTM can be calculate only Income Statement and Cashflow, but not Financial Ratio and Balance Sheet.
Data from table FINANCIAL_STAT_STD.
FINANCIAL_STAT_STD filter by using data from column M_ACC_ACCOUNT_12M multiply 1000.
Index date is trade date (DAILY_STOCK_STAT.D_TRADE). Data is showing at first trade date which join on D_AS_OF.
- Parameters:
field (str) –
bad_debt
broker_fee
change_ppe
cos
dividend
dp
ebit
ebitda
ebt
eps
int_dvd_income
interest_expense
interest_income
invest_sec_rev
loan_deposit_revenue
net_cash_flow
net_financing
net_investing
net_operating
net_premium
net_profit
net_profit_incl_minority
net_profit_ordinary
operating_expense
operating_revenue
pl_other_activities
sale
selling_admin
selling_admin_exc_renumuration
total_expense
total_revenue
symbol_list (Optional[List[str]]) – N_SECURITY in symbol_list, must be unique.
start_date (Optional[str]) – start of trade date (DAILY_STOCK_STAT.D_TRADE).
end_date (Optional[str]) – end of trade date (DAILY_STOCK_STAT.D_TRADE).
- Returns:
symbol(N_SECURITY): str as column
trade date(DAILY_STOCK_STAT.D_TRADE): date as index
- Return type:
pd.DataFrame
Examples
>>> from ezyquant import SETDataReader >>> from ezyquant import fields as fld >>> sdr = SETDataReader() >>> sdr.get_data_symbol_ttm( ... field=fld.Q_TOTAL_REVENUE, ... symbol_list=["COM7", "MALEE"], ... start_date="2022-02-01", ... end_date=None, ... ) COM7 MALEE 2022-03-01 NaN 3488690.79 2022-03-04 51154660.73 NaN