SYMBOL INDEX (736 symbols across 55 files) FILE: backtest/gm_template.py class Parameter (line 29) | class Parameter: function calculate_indicators (line 61) | def calculate_indicators(data: pd.DataFrame) -> Optional[Dict]: function before_trade_day (line 78) | def before_trade_day(context) -> None: function get_hma (line 95) | def get_hma(data: np.array, n: int) -> np.array: function get_sma (line 106) | def get_sma(data: np.array, n: int) -> np.array: function decide_stock (line 111) | def decide_stock(quote: Dict, indicator: Dict) -> (bool, Dict): function select_stocks (line 144) | def select_stocks(quotes: Dict) -> List[Dict[str, any]]: function scan_buy (line 158) | def scan_buy(context, quotes, curr_date, curr_time): function get_last_1_sma (line 204) | def get_last_1_sma(row_close, period) -> float: function get_atr (line 209) | def get_atr(row_close, row_high, row_low, period) -> float: function scan_sell (line 214) | def scan_sell(context, quotes, curr_date, curr_time): function execute_strategy (line 272) | def execute_strategy(context, curr_date: str, curr_time: str, prev_time:... function init (line 290) | def init(context): function on_bar (line 300) | def on_bar(context, bars): FILE: delegate/base_delegate.py class BaseDelegate (line 10) | class BaseDelegate(ABC): method __init__ (line 11) | def __init__(self): method check_asset (line 15) | def check_asset(self): method check_orders (line 19) | def check_orders(self): method check_positions (line 23) | def check_positions(self): method order_market_open (line 27) | def order_market_open( method order_market_close (line 38) | def order_market_close( method order_limit_open (line 49) | def order_limit_open( method order_limit_close (line 60) | def order_limit_close( method order_cancel_all (line 71) | def order_cancel_all(self, strategy_name: str = DEFAULT_STRATEGY_NAME): method order_cancel_buy (line 75) | def order_cancel_buy(self, code: str, strategy_name: str = DEFAULT_STR... method order_cancel_sell (line 79) | def order_cancel_sell(self, code: str, strategy_name: str = DEFAULT_ST... method is_position_holding (line 83) | def is_position_holding(position: dict) -> bool: method get_holding_position_count (line 87) | def get_holding_position_count(self, positions: list, only_stock: bool... method shutdown (line 91) | def shutdown(self) -> None: function update_position_held (line 98) | def update_position_held(lock: threading.Lock, delegate: BaseDelegate, p... FILE: delegate/base_subscriber.py function get_today (line 21) | def get_today() -> str: class BaseSubscriber (line 25) | class BaseSubscriber: method __init__ (line 26) | def __init__( method callback_run_no_quotes (line 110) | def callback_run_no_quotes(self): method callback_open_no_quotes (line 133) | def callback_open_no_quotes(self): method callback_close_no_quotes (line 145) | def callback_close_no_quotes(self): method update_code_list (line 157) | def update_code_list(self, code_list: list[str]): method clear_all (line 164) | def clear_all(self): method before_trade_day_wrapper (line 167) | def before_trade_day_wrapper(self): method near_trade_begin_wrapper (line 182) | def near_trade_begin_wrapper(self): method finish_trade_day_wrapper (line 196) | def finish_trade_day_wrapper(self): method execute_call_end_wrapper (line 208) | def execute_call_end_wrapper(self): method check_before_finished (line 221) | def check_before_finished(self): method daily_summary (line 237) | def daily_summary(self): method _start_scheduler (line 276) | def _start_scheduler(self): method create_scheduler (line 341) | def create_scheduler(self): method start_scheduler (line 354) | def start_scheduler(self): method prev_check_open_day (line 370) | def prev_check_open_day(self): class HistorySubscriber (line 380) | class HistorySubscriber(BaseSubscriber): method _download_from_remote (line 384) | def _download_from_remote( method _download_from_tdx (line 422) | def _download_from_tdx(self, target_codes: list, start: str, end: str,... method download_cache_history (line 441) | def download_cache_history( method refresh_memory_history (line 509) | def refresh_memory_history(self, code_list: list[str], start: str, end... FILE: delegate/daily_backtest.py class Context (line 7) | class Context: method __new__ (line 10) | def __new__(cls): method __setattr__ (line 15) | def __setattr__(self, name, value): method clear (line 21) | def clear(self): function backtest (line 25) | def backtest( FILE: delegate/daily_history.py class DailyHistoryCache (line 15) | class DailyHistoryCache: method __new__ (line 19) | def __new__(cls): method __init__ (line 25) | def __init__(self): method set_data_source (line 29) | def set_data_source(self, data_source: DataSource, init_day_count: int... class DailyHistory (line 36) | class DailyHistory: method __init__ (line 44) | def __init__( method __getitem__ (line 59) | def __getitem__(self, item: str) -> pd.DataFrame: method _has_datetime_column (line 64) | def _has_datetime_column(self, df: pd.DataFrame, code: str, stage: str... method get_subset_copy (line 77) | def get_subset_copy(self, codes: list[str], days: int) -> dict[str, pd... method get_code_list (line 91) | def get_code_list(self, force_download: bool = False, prefixes: set[st... method _download_codes (line 117) | def _download_codes(self, code_list: list[str], day_count: int, interv... method _download_local_missed (line 160) | def _download_local_missed(self): method _download_remote_missed (line 173) | def _download_remote_missed(self) -> None: method load_history_from_disk_to_memory (line 188) | def load_history_from_disk_to_memory(self, auto_update: bool = True) -... method download_all_to_disk (line 216) | def download_all_to_disk(self, renew_code_list: bool = True, interval:... method _update_codes_by_tushare (line 226) | def _update_codes_by_tushare(self, target_date: str, code_list: list[s... method _update_codes_one_by_one (line 275) | def _update_codes_one_by_one(self, days: int, code_list: list[str]) ->... method download_single_daily (line 326) | def download_single_daily(self, target_date: str) -> None: method download_recent_daily (line 344) | def download_recent_daily(self, days: int) -> None: method write_last_update_datetime (line 405) | def write_last_update_datetime(self): method since_last_update_datetime (line 410) | def since_last_update_datetime(self): method remove_single_history (line 427) | def remove_single_history(self, code: str) -> bool: method get_recent_exit_right_codes (line 442) | def get_recent_exit_right_codes(days: int) -> list[str]: method remove_recent_exit_right_histories (line 445) | def remove_recent_exit_right_histories(self, days: int) -> None: FILE: delegate/daily_reporter.py function colour_text (line 16) | def colour_text(text: str, to_red: bool, to_green: bool): function get_total_asset_increase (line 28) | def get_total_asset_increase(path_assets: str, curr_date: str, curr_asse... class DailyReporter (line 43) | class DailyReporter: method __init__ (line 44) | def __init__( method today_deal_report (line 66) | def today_deal_report(self, today: str): method today_hold_report (line 90) | def today_hold_report(self, today: str, positions): method check_asset (line 151) | def check_asset(self, today: str, asset, is_afternoon: bool = True): FILE: delegate/gm_callback.py class GmCallback (line 14) | class GmCallback: method __init__ (line 15) | def __init__( method register_callback (line 43) | def register_callback(): method unregister_callback (line 73) | def unregister_callback(): method record_order (line 77) | def record_order(self, order_time: str, code: str, price: float, volum... method on_execution_report (line 90) | def on_execution_report(self, rpt: ExecRpt): method on_order_status (line 112) | def on_order_status(self, order: Order): class GmCache (line 148) | class GmCache: function on_execution_report (line 152) | def on_execution_report(rpt: ExecRpt): function on_order_status (line 157) | def on_order_status(order: Order): function on_trade_data_connected (line 162) | def on_trade_data_connected(): function on_trade_data_disconnected (line 166) | def on_trade_data_disconnected(): function on_account_status (line 170) | def on_account_status(account_status: AccountStatus): function on_error (line 174) | def on_error(error_code, error_info): FILE: delegate/gm_delegate.py class GmAsset (line 25) | class GmAsset: method __init__ (line 26) | def __init__(self, cash: Cash, account_id: str = ''): class GmOrder (line 35) | class GmOrder: method __init__ (line 36) | def __init__(self, order: Order): class GmPosition (line 46) | class GmPosition: method __init__ (line 47) | def __init__(self, position: Position): class GmDelegate (line 56) | class GmDelegate(BaseDelegate): method __init__ (line 57) | def __init__( method shutdown (line 79) | def shutdown(self): method check_asset (line 82) | def check_asset(self) -> GmAsset: method check_orders (line 86) | def check_orders(self) -> List[GmOrder]: method check_positions (line 90) | def check_positions(self) -> List[GmPosition]: method order_market_open (line 94) | def order_market_open( method order_market_close (line 145) | def order_market_close( method order_limit_open (line 172) | def order_limit_open( method order_limit_close (line 222) | def order_limit_close( method order_cancel_all (line 248) | def order_cancel_all(self, strategy_name: str = DEFAULT_GM_STRATEGY_NA... method order_cancel_buy (line 260) | def order_cancel_buy(self, code: str, strategy_name: str = DEFAULT_GM_... method order_cancel_sell (line 278) | def order_cancel_sell(self, code: str, strategy_name: str = DEFAULT_GM... method is_position_holding (line 297) | def is_position_holding(position: GmPosition) -> bool: method get_holding_position_count (line 300) | def get_holding_position_count(self, positions: List[GmPosition]) -> int: FILE: delegate/xt_callback.py class XtBaseCallback (line 16) | class XtBaseCallback(XtQuantTraderCallback): method __init__ (line 17) | def __init__(self): method on_disconnected (line 20) | def on_disconnected(self): class XtDefaultCallback (line 27) | class XtDefaultCallback(XtBaseCallback): method on_stock_trade (line 28) | def on_stock_trade(self, trade: XtTrade): method on_stock_order (line 34) | def on_stock_order(self, order: XtOrder): method on_order_stock_async_response (line 40) | def on_order_stock_async_response(self, res: XtOrderResponse): method on_order_error (line 46) | def on_order_error(self, order_error: XtOrderError): method on_cancel_order_stock_async_response (line 52) | def on_cancel_order_stock_async_response(self, res: XtCancelOrderRespo... method on_cancel_error (line 58) | def on_cancel_error(self, cancel_error: XtCancelError): class XtCustomCallback (line 71) | class XtCustomCallback(XtBaseCallback): method __init__ (line 72) | def __init__( method record_order (line 98) | def record_order(self, order_time: str, code: str, price: float, volum... method on_stock_trade (line 111) | def on_stock_trade(self, trade: XtTrade): method on_order_stock_async_response (line 165) | def on_order_stock_async_response(self, res: XtOrderResponse): method on_order_error (line 169) | def on_order_error(self, err: XtOrderError): method on_cancel_order_stock_async_response (line 173) | def on_cancel_order_stock_async_response(self, res: XtCancelOrderRespo... method on_cancel_error (line 182) | def on_cancel_error(self, cancel_error: XtCancelError): FILE: delegate/xt_delegate.py class XtDelegate (line 33) | class XtDelegate(BaseDelegate): method __init__ (line 34) | def __init__( method connect (line 63) | def connect(self, callback: object) -> tuple[Optional[XtQuantTrader], ... method reconnect (line 99) | def reconnect(self) -> None: method keep_connected (line 110) | def keep_connected(self) -> None: method shutdown (line 115) | def shutdown(self) -> None: method order_submit (line 119) | def order_submit( method order_submit_async (line 149) | def order_submit_async( method order_cancel (line 179) | def order_cancel(self, order_id) -> int: method order_cancel_async (line 183) | def order_cancel_async(self, order_id) -> int: method check_asset (line 187) | def check_asset(self) -> XtAsset: method check_order (line 193) | def check_order(self, order_id) -> XtOrder: method check_orders (line 199) | def check_orders(self, cancelable_only: bool = False) -> List[XtOrder]: method check_positions (line 217) | def check_positions(self) -> List[XtPosition]: method order_market_open (line 223) | def order_market_open( method order_market_close (line 258) | def order_market_close( method order_limit_open (line 293) | def order_limit_open( method order_limit_close (line 318) | def order_limit_close( method order_cancel_all (line 352) | def order_cancel_all(self, strategy_name: str = DEFAULT_XT_STRATEGY_NA... method order_cancel_buy (line 362) | def order_cancel_buy(self, code: str, strategy_name: str = DEFAULT_XT_... method order_cancel_sell (line 373) | def order_cancel_sell(self, code: str, strategy_name: str = DEFAULT_XT... method check_ipo_data (line 384) | def check_ipo_data(self) -> dict: method check_new_purchase_limit (line 390) | def check_new_purchase_limit(self) -> dict: method purchase_ipo_stocks (line 397) | def purchase_ipo_stocks(self, buy_type: str = 'ALL'): method is_position_holding (line 432) | def is_position_holding(position: XtPosition) -> bool: method get_holding_position_count (line 435) | def get_holding_position_count(self, positions: List[XtPosition], only... function xt_stop_exit (line 445) | def xt_stop_exit(): function download_sector_data (line 454) | def download_sector_data(): FILE: delegate/xt_subscriber.py class XtSubscriber (line 22) | class XtSubscriber(HistorySubscriber): method __init__ (line 23) | def __init__( method callback_sub_whole (line 109) | def callback_sub_whole(self, quotes: Dict) -> None: method callback_monitor (line 153) | def callback_monitor(self): method subscribe_tick (line 173) | def subscribe_tick(self, resume: bool = False): method unsubscribe_tick (line 186) | def unsubscribe_tick(self, pause: bool = False): method resubscribe_tick (line 198) | def resubscribe_tick(self, notice: bool = True): method update_code_list (line 215) | def update_code_list(self, code_list: list[str]): method record_tick_to_memory (line 226) | def record_tick_to_memory(self, quotes): method clean_ticks_history (line 276) | def clean_ticks_history(self): method save_tick_history (line 284) | def save_tick_history(self): method clear_all (line 363) | def clear_all(self): method clean_qmt_datadir_contents (line 372) | def clean_qmt_datadir_contents(self): method _start_qmt_scheduler (line 398) | def _start_qmt_scheduler(self): method start_scheduler (line 474) | def start_scheduler(self): function xt_get_ticks (line 492) | def xt_get_ticks(code_list: list[str]) -> dict[str, dict]: FILE: mytt/LastBar.py function LAST_ (line 11) | def LAST_(n: pd.Series) -> Any: function INT_ (line 16) | def INT_(n: Union[bool, pd.Series]) -> int: function NOT_ (line 22) | def NOT_(n: Union[bool, pd.Series]) -> int: function INTPART_ (line 28) | def INTPART_(n: Union[float, pd.Series]) -> int: function MAX_ (line 39) | def MAX_(a: Union[int, float, pd.Series], b: Union[int, float, pd.Series]): function MIN_ (line 46) | def MIN_(a: Union[int, float, pd.Series], b: Union[int, float, pd.Series]): function IF_ (line 53) | def IF_(e: Union[int, pd.Series], n1: Union[int, pd.Series], n2: Union[i... function COUNT_ (line 66) | def COUNT_(e: pd.Series, p: Union[int, pd.Series]) -> int: function CROSS_ (line 74) | def CROSS_(n1: pd.Series, n2: Union[int, pd.Series]) -> int: function REF_ (line 80) | def REF_(n: pd.Series, p: Union[int, pd.Series]): function HHV_ (line 87) | def HHV_(n: pd.Series, p: Union[int, pd.Series]): function LLV_ (line 94) | def LLV_(n: pd.Series, p: Union[int, pd.Series]): function MA_ (line 101) | def MA_(n: pd.Series, p: Union[int, pd.Series]): function BARSLAST_ (line 113) | def BARSLAST_(e: pd.Series): function VALUEWHEN_ (line 123) | def VALUEWHEN_(e: pd.Series, n: pd.Series): FILE: mytt/MyTT.py function RD (line 24) | def RD(N, D=3): return np.round(N, D) # 四舍五入取3位小数 function RET (line 27) | def RET(S, N=1): return np.array(S)[-N] # 返回序列倒数第N个值,默认返回最后一个 function ABS (line 30) | def ABS(S): return np.abs(S) # 返回N的绝对值 function LN (line 33) | def LN(S): return np.log(S) # 求底是e的自然对数, function POW (line 36) | def POW(S, N): return np.power(S, N) # 求S的N次方 function SQRT (line 39) | def SQRT(S): return np.sqrt(S) # 求S的平方根 function MAX (line 42) | def MAX(S1, S2): return np.maximum(S1, S2) # 序列max function MIN (line 45) | def MIN(S1, S2): return np.minimum(S1, S2) # 序列min function IF (line 48) | def IF(S, A, B): return np.where(S, A, B) # 序列布尔判断 return=A if S==Tr... function REF (line 51) | def REF(S, N=1): # 对序列整体下移动N,返回序列(shift后会产生NAN) function DIFF (line 55) | def DIFF(S, N=1): # 前一个值减后一个值,前面会产生nan function STD (line 59) | def STD(S, N): # 求序列的N日标准差,返回序列 function SUM (line 63) | def SUM(S, N): # 对序列求N天累计和,返回序列 N=0对序列所有依次求和 function CONST (line 67) | def CONST(S): # 返回序列S最后的值组成常量序列 function HHV (line 71) | def HHV(S,N): #HHV(C, 5) 最近5天收盘最高价 function LLV (line 74) | def LLV(S,N): #LLV(C, 5) 最近5天收盘最低价 function HHVBARS (line 78) | def HHVBARS(S, N): # 求N周期内S最高值到当前周期数, 返回序列 function LLVBARS (line 82) | def LLVBARS(S, N): # 求N周期内S最低值到当前周期数, 返回序列 function MA (line 86) | def MA(S, N): # 求序列的N日简单移动平均值,返回序列 function EMA (line 90) | def EMA(S, N): # 指数移动平均,为了精度 S>4*N EMA至少需要120周期 alpha=2/(span+1) function SMA (line 94) | def SMA(S, N, M=1): # 中国式的SMA,至少需要120周期才精确 (雪球180周期) alpha=1/(1+com) function WMA (line 98) | def WMA(S, N): # 通达信S序列的N日加权移动平均 Yn = (1*X1+2*X2+3*X3+...+n*Xn)/(1+2+3+... function DMA (line 102) | def DMA(S, A): # 求S的动态移动平均,A作平滑因子,必须 0B & A>0 & B>=0 function COUNT (line 129) | def COUNT(S, N): # COUNT(CLOSE>O, N): 最近N天满足S_BOO的天数 True的天数 function EVERY (line 133) | def EVERY(S, N): # EVERY(CLOSE>O, 5) 最近N天是否都是True function EXIST (line 137) | def EXIST(S, N): # EXIST(CLOSE>3010, N=5) n日内是否存在一天大于3000点 function FILTER (line 141) | def FILTER(S, N): # FILTER函数,S满足条件后,将其后N周期内的数据置为0, FILTER(C==H,5) function BARSLAST (line 146) | def BARSLAST(S): # 上一次条件成立到当前的周期, BARSLAST(C/REF(C,1)>=1.1) 上一次涨停到今天的天数 function BARSLASTCOUNT (line 152) | def BARSLASTCOUNT(S): # 统计连续满足S条件的周期数 by jqz1226 function BARSSINCEN (line 158) | def BARSSINCEN(S, N): # N周期内第一次S条件成立到现在的周期数,N为常量 by jqz1226 function CROSS (line 163) | def CROSS(S1, S2): # 判断向上金叉穿越 CROSS(MA(C,5),MA(C,10)... function LONGCROSS (line 167) | def LONGCROSS(S1, S2, N): # 两条线维持一定周期后交叉,S1在N周期内都小于S2,本周期从S1下方向上穿过S2时返回... function VALUEWHEN (line 171) | def VALUEWHEN(S, X): # 当S条件成立时,取X的当前值,否则取VALUEWHEN的上个成立时的X值 by jqz1226 function BETWEEN (line 175) | def BETWEEN(S, A, B): # S处于A和B之间时为真。 包括 AS>B function TOPRANGE (line 179) | def TOPRANGE(S): # TOPRANGE(HIGH)表示当前最高价是近多少周期内最高价的最大值 by jqz1226 function LOWRANGE (line 185) | def LOWRANGE(S): # LOWRANGE(LOW)表示当前最低价是近多少周期内最低价的最小值 by jqz1226 function MACD (line 192) | def MACD(CLOSE, SHORT=12, LONG=26, M=9): # EMA的关系,S取120日,和雪球小数点2位相同 function KDJ (line 199) | def KDJ(CLOSE, HIGH, LOW, N=9, M1=3, M2=3): # KDJ指标 function RSI (line 208) | def RSI(CLOSE, N=24): # RSI指标,和通达信小数点2位相同 function WR (line 213) | def WR(CLOSE, HIGH, LOW, N=10): # W&R 威廉指标 function BIAS (line 219) | def BIAS(CLOSE, L1=6, L2=12, L3=24): # BIAS乖离率 function BOLL (line 229) | def BOLL(CLOSE, N=20, P=2): # BOLL指标,布林带 function PSY (line 237) | def PSY(CLOSE, N=12, M=6): function CCI (line 243) | def CCI(CLOSE, HIGH, LOW, N=14): function ATR (line 248) | def ATR(CLOSE, HIGH, LOW, N=20): # 真实波动N日平均值 function BBI (line 253) | def BBI(CLOSE, M1=3, M2=6, M3=12, M4=20): # BBI多空指标 function DMI (line 257) | def DMI(CLOSE, HIGH, LOW, M1=14, M2=6): # 动向指标:结果和同花顺,通达信完全一致 function TAQ (line 270) | def TAQ(HIGH, LOW, N): # 唐安奇通道(海龟)交易指标,大道至简,能穿越牛熊 function KTN (line 277) | def KTN(CLOSE, HIGH, LOW, N=20, M=10): # 肯特纳交易通道, N选20日,ATR选10日 function TRIX (line 285) | def TRIX(CLOSE, M1=12, M2=20): # 三重指数平滑平均线 function VR (line 292) | def VR(CLOSE, VOL, M1=26): # VR容量比率 function CR (line 297) | def CR(CLOSE, HIGH, LOW, N=20): # CR价格动量指标 function EMV (line 302) | def EMV(HIGH, LOW, VOL, N=14, M=9): # 简易波动指标 function DPO (line 310) | def DPO(CLOSE, M1=20, M2=10, M3=6): # 区间震荡线 function BRAR (line 316) | def BRAR(OPEN, CLOSE, HIGH, LOW, M1=26): # BRAR-ARBR 情绪指标 function DFMA (line 322) | def DFMA(CLOSE, N1=10, N2=50, M=10): # 平行线差指标 function MTM (line 328) | def MTM(CLOSE, N=12, M=6): # 动量指标 function MASS (line 334) | def MASS(HIGH, LOW, N1=9, N2=25, M=6): # 梅斯线 function ROC (line 340) | def ROC(CLOSE, N=12, M=6): # 变动率指标 function EXPMA (line 346) | def EXPMA(CLOSE, N1=12, N2=50): # EMA指数平均数指标 function OBV (line 350) | def OBV(CLOSE, VOL): # 能量潮指标 function MFI (line 354) | def MFI(CLOSE, HIGH, LOW, VOL, N=14): # MFI指标是成交量的RSI指标 function ASI (line 360) | def ASI(OPEN, CLOSE, HIGH, LOW, M1=26, M2=10): # 振动升降指标 function XSII (line 374) | def XSII(CLOSE, HIGH, LOW, N=102, M=7): # 薛斯通道II FILE: mytt/MyTT_advance.py function HHV (line 13) | def HHV(S, N): # HHV,支持N为序列版本 function LLV (line 28) | def LLV(S, N): # LLV,支持N为序列版本 function DSMA (line 43) | def DSMA(X, N): # 偏差自适应移动平均线 type: (np.ndarray, int) -> np.ndarray function SUMBARSFAST (line 64) | def SUMBARSFAST(X, A): function SAR (line 92) | def SAR(HIGH, LOW, N=10, S=2, M=20): function TDX_SAR (line 132) | def TDX_SAR(High, Low, iAFStep=2, iAFLimit=20): # type: (np.ndarray, np... FILE: mytt/MyTT_custom.py function INT (line 5) | def INT(S: pd.Series): function NOT (line 10) | def NOT(S: pd.Series): function GETCURRBARSCOUNT (line 14) | def GETCURRBARSCOUNT(L: int): function SIN (line 18) | def SIN(S: pd.Series): function COS (line 22) | def COS(S: pd.Series): function TAN (line 26) | def TAN(S: pd.Series): function ASIN (line 30) | def ASIN(S: pd.Series): function ACOS (line 34) | def ACOS(S: pd.Series): function ATAN (line 38) | def ATAN(S: pd.Series): function CEILINE (line 42) | def CEILINE(S: pd.Series): function FLOOR (line 46) | def FLOOR(S: pd.Series): function INTPART (line 50) | def INTPART(S: pd.Series): function CROSS_PLUS (line 54) | def CROSS_PLUS(S1: pd.Series, S2: pd.Series): function COUNT_PLUS (line 60) | def COUNT_PLUS(S: pd.Series, N): function REF_PLUS (line 71) | def REF_PLUS(S: pd.Series, N): FILE: public/silver6wings/_prod_shield_ma.py function debug (line 39) | def debug(*args, **kwargs): class PoolConf (line 44) | class PoolConf: class SellConf (line 72) | class SellConf: function before_trade_day (line 92) | def before_trade_day() -> None: function scan_sell (line 127) | def scan_sell(quotes: Dict, curr_date: str, curr_time: str, positions: L... function execute_strategy (line 135) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: public/silver6wings/my_tdx_call.py function debug (line 34) | def debug(*args, **kwargs): class PoolConf (line 39) | class PoolConf: class BuyConf (line 50) | class BuyConf: function before_trade_day (line 63) | def before_trade_day(): function select_stocks (line 86) | def select_stocks( function scan_buy (line 116) | def scan_buy( function execute_strategy (line 174) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: reader/tushare_agent.py function get_tushare_pro (line 7) | def get_tushare_pro(debugging=False): FILE: run_ai_gen.py class PoolConf (line 40) | class PoolConf: class BuyConf (line 55) | class BuyConf: class SellConf (line 68) | class SellConf: function before_trade_day (line 98) | def before_trade_day() -> None: function near_trade_begin (line 136) | def near_trade_begin(): function check_stock (line 151) | def check_stock(code: str, quote: dict, curr_date: str) -> bool: function select_stocks (line 160) | def select_stocks(quotes: dict, curr_date: str) -> dict[str, dict]: function scan_buy (line 209) | def scan_buy(quotes: dict, curr_date: str, positions: list) -> None: function scan_sell (line 220) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function execute_strategy (line 228) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_redis_pull.py class PoolConf (line 44) | class PoolConf: class BuyConf (line 48) | class BuyConf: class SellConf (line 62) | class SellConf: function before_trade_day (line 98) | def before_trade_day() -> None: function pull_stock_codes (line 116) | def pull_stock_codes() -> list[str]: function check_stock_codes (line 127) | def check_stock_codes(selected_codes: list[str], quotes: dict) -> dict[s... function scan_buy (line 150) | def scan_buy(quotes: dict, curr_date: str, positions: list) -> None: function scan_sell (line 166) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function empty_execute_strategy (line 176) | def empty_execute_strategy(curr_date: str, curr_time: str, curr_seconds:... function redis_subscribe (line 181) | def redis_subscribe(): function redis_unsubscribe (line 208) | def redis_unsubscribe(): function redis_execute_strategy (line 213) | def redis_execute_strategy(curr_date: str, curr_time: str, curr_seconds:... FILE: run_redis_push.py class PoolConf (line 31) | class PoolConf: function before_trade_day (line 40) | def before_trade_day() -> None: function execute_strategy (line 48) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_remote.py class PoolConf (line 40) | class PoolConf: class BuyConf (line 46) | class BuyConf: class SellConf (line 59) | class SellConf: function before_trade_day (line 95) | def before_trade_day() -> None: function near_trade_begin (line 132) | def near_trade_begin(): function check_stock_codes (line 147) | def check_stock_codes(selected_codes: list[str], quotes: dict) -> dict[s... function scan_buy (line 182) | def scan_buy(quotes: dict, curr_date: str, positions: list) -> None: function scan_sell (line 203) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function execute_strategy (line 211) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_shield.py class PoolConf (line 36) | class PoolConf: class SellConf (line 47) | class SellConf: function before_trade_day (line 68) | def before_trade_day() -> None: function scan_sell (line 91) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function execute_strategy (line 99) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_swords.py class PoolConf (line 34) | class PoolConf: class BuyConf (line 45) | class BuyConf: function before_trade_day (line 69) | def before_trade_day() -> None: function check_is_blocking (line 89) | def check_is_blocking(quote: dict, curr_time: str) -> tuple[bool, int, f... function check_block_ticks (line 112) | def check_block_ticks( function select_stocks (line 139) | def select_stocks( function scan_buy (line 177) | def scan_buy(quotes: dict, curr_date: str, curr_time: str, curr_seconds:... function execute_strategy (line 188) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_swords_tdx.py class PoolConf (line 33) | class PoolConf: class BuyConf (line 44) | class BuyConf: function before_trade_day (line 68) | def before_trade_day() -> None: function check_is_blocking (line 88) | def check_is_blocking(quote: dict, curr_time: str) -> (bool, int, float): function check_block_ticks (line 111) | def check_block_ticks( function select_stocks (line 138) | def select_stocks( function scan_buy (line 176) | def scan_buy(quotes: Dict, curr_date: str, curr_time: str, curr_seconds:... function execute_strategy (line 187) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_wencai_qmt.py class PoolConf (line 40) | class PoolConf: class BuyConf (line 45) | class BuyConf: class SellConf (line 60) | class SellConf: function before_trade_day (line 96) | def before_trade_day() -> None: function pull_stock_codes (line 118) | def pull_stock_codes() -> list[str]: function check_stock_codes (line 129) | def check_stock_codes(selected_codes: list[str], quotes: dict) -> dict[s... function scan_buy (line 158) | def scan_buy(quotes: dict, curr_date: str, positions: list) -> None: function scan_sell (line 174) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function execute_strategy (line 182) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: run_wencai_tdx.py class PoolConf (line 43) | class PoolConf: class BuyConf (line 47) | class BuyConf: class SellConf (line 61) | class SellConf: function before_trade_day (line 97) | def before_trade_day() -> None: function pull_stock_codes (line 122) | def pull_stock_codes() -> list[str]: function check_stock_codes (line 133) | def check_stock_codes(selected_codes: list[str], quotes: dict) -> dict[s... function scan_buy (line 156) | def scan_buy(quotes: dict, curr_date: str, positions: list) -> None: function scan_sell (line 172) | def scan_sell(quotes: dict, curr_date: str, curr_time: str, positions: l... function execute_strategy (line 184) | def execute_strategy(curr_date: str, curr_time: str, curr_seconds: str, ... FILE: selector/select_wencai.py function get_prompt (line 15) | def get_prompt(prompt_index: any = 0) -> str: function get_wencai_codes_prices (line 28) | def get_wencai_codes_prices(query, debugging=False) -> dict[str, str]: FILE: selector/selector_6msj.py function select (line 100) | def select(df: pd.DataFrame, code: str, quote: dict): FILE: selector/selector_daban.py function select (line 28) | def select(df: pd.DataFrame, code: str, quote: dict): FILE: selector/selector_deepseek.py function select (line 95) | def select(df: pd.DataFrame, code: str, quote: dict): FILE: tests/conftest.py function pytest_configure (line 12) | def pytest_configure(config): FILE: tests/local/test_tools_utils_remote.py function test_get_mootdx_daily_history (line 12) | def test_get_mootdx_daily_history(): function test_get_tdxzip_history (line 34) | def test_get_tdxzip_history(): function test_check_xdxr_cache (line 75) | def test_check_xdxr_cache(): FILE: tests/test_sample.py function add (line 3) | def add(a: float, b: float) -> float: function test_add_parametrized (line 60) | def test_add_parametrized(a, b, expected): FILE: tests/test_tool_utils_cache.py function test_get_next_trading_date (line 22) | def test_get_next_trading_date(anchor, offset, basic, expected): function test_get_next_trading_date_str_compact_and_hyphen (line 34) | def test_get_next_trading_date_str_compact_and_hyphen(today_str, offset,... function test_get_trading_date_list_range_and_compact_equivalence (line 38) | def test_get_trading_date_list_range_and_compact_equivalence(): function test_get_trading_date_list_same_day_returns_input_shape (line 51) | def test_get_trading_date_list_same_day_returns_input_shape(): function test_get_trading_date_list_reversed_range_single_anchor (line 56) | def test_get_trading_date_list_reversed_range_single_anchor(): function test_get_prev_trading_date_list_hyphen_vs_compact (line 62) | def test_get_prev_trading_date_list_hyphen_vs_compact(): FILE: toolbox/draw_two_lines.py function draw_two (line 5) | def draw_two( function closest_round_number (line 120) | def closest_round_number(num): function test_closest (line 129) | def test_closest(): FILE: toolbox/find_tick_history.py function locate_and_save (line 17) | def locate_and_save(): function visualization (line 29) | def visualization(): FILE: tools/constants.py class StrValueEnum (line 11) | class StrValueEnum(str, Enum): method __str__ (line 12) | def __str__(self) -> str: class DataSource (line 17) | class DataSource(StrValueEnum): class ExitRight (line 27) | class ExitRight(StrValueEnum): class IndexSymbol (line 40) | class IndexSymbol(StrValueEnum): class InfoItem (line 61) | class InfoItem(StrValueEnum): FILE: tools/utils_basic.py function debug (line 7) | def debug(*args, **kwargs): function pd_show_all (line 14) | def pd_show_all() -> None: function logging_init (line 26) | def logging_init(path=None, level=logging.DEBUG, file_line=False, silenc... function logger_init (line 65) | def logger_init(path=None, name='default') -> logging.Logger: function symbol_to_code (line 88) | def symbol_to_code(symbol: str | int) -> str: function code_to_symbol (line 102) | def code_to_symbol(code: str) -> str: function code_to_sina_symbol (line 113) | def code_to_sina_symbol(code: str) -> str: function sina_symbol_to_code (line 124) | def sina_symbol_to_code(sina_symbol: str) -> str: function code_to_tdxsymbol (line 142) | def code_to_tdxsymbol(code: str) -> str: function tdxsymbol_to_code (line 153) | def tdxsymbol_to_code(tdxsymbol: str) -> str: function symbol_to_tdxsymbol (line 166) | def symbol_to_tdxsymbol(code: str) -> str: function symbol_to_gmsymbol (line 186) | def symbol_to_gmsymbol(symbol: str | int) -> str: function gmsymbol_to_symbol (line 199) | def gmsymbol_to_symbol(gmsymbol: str) -> str: function code_to_gmsymbol (line 205) | def code_to_gmsymbol(code: str) -> str: function gmsymbol_to_code (line 209) | def gmsymbol_to_code(gmsymbol: str) -> str: function is_symbol (line 214) | def is_symbol(code_or_symbol: str): function is_stock (line 224) | def is_stock(code_or_symbol: str | int): function is_stock_code (line 229) | def is_stock_code(code: str): function is_stock_10cm (line 237) | def is_stock_10cm(code_or_symbol: str | int): function is_stock_20cm (line 243) | def is_stock_20cm(code_or_symbol: str | int): function is_stock_30cm (line 249) | def is_stock_30cm(code_or_symbol: str | int): function is_stock_cy (line 255) | def is_stock_cy(code_or_symbol: str | int): function is_stock_kc (line 261) | def is_stock_kc(code_or_symbol: str | int): function is_stock_bj (line 267) | def is_stock_bj(code_or_symbol: str | int): function is_fund_etf (line 273) | def is_fund_etf(code_or_symbol: str | int): function is_bond (line 279) | def is_bond(code_or_symbol: str | int): function get_symbol_exchange (line 286) | def get_symbol_exchange(symbol: str) -> str: function get_code_exchange (line 298) | def get_code_exchange(code: str) -> str: function map_num_to_chr (line 305) | def map_num_to_chr(num): function is_in_continuous_auction (line 317) | def is_in_continuous_auction(curr_time: str) -> bool: function get_current_time_percentage (line 323) | def get_current_time_percentage(time: str) -> float: function get_limiting_up_rate (line 340) | def get_limiting_up_rate(code_or_symbol: str) -> float: function get_limit_up_price (line 350) | def get_limit_up_price(code_or_symbol: str, pre_close: float) -> float: function get_limiting_down_rate (line 364) | def get_limiting_down_rate(code_or_symbol: str) -> float: function get_limit_down_price (line 374) | def get_limit_down_price(code_or_symbol: str, pre_close: float) -> float: function get_st_limit_up_rate (line 388) | def get_st_limit_up_rate(): function get_st_limit_up_price (line 393) | def get_st_limit_up_price(): function get_st_limit_down_rate (line 398) | def get_st_limit_down_rate(): function get_st_limit_down_price (line 403) | def get_st_limit_down_price(): function time_diff_seconds (line 407) | def time_diff_seconds(later_time: datetime.datetime.time, early_time: da... function hms_to_past_seconds (line 420) | def hms_to_past_seconds(hour: int, minute: int, second: int) -> int: function xt_time_tag_to_hms (line 434) | def xt_time_tag_to_hms(time_tag: str) -> tuple[int, int, int]: function xt_time_tag_to_past_seconds (line 439) | def xt_time_tag_to_past_seconds(time_tag: int | str) -> int: function xt_time_to_hms (line 445) | def xt_time_to_hms(timestamp: int) -> tuple[int, int, int]: function xt_time_to_past_seconds (line 453) | def xt_time_to_past_seconds(timestamp: int) -> int: function convert_daily_to_weekly (line 463) | def convert_daily_to_weekly(df: pd.DataFrame) -> pd.DataFrame: function convert_daily_to_monthly (line 497) | def convert_daily_to_monthly(df: pd.DataFrame) -> pd.DataFrame: FILE: tools/utils_cache.py class StockNames (line 23) | class StockNames: method __new__ (line 27) | def __new__(cls): method __init__ (line 33) | def __init__(self): method load_codes_and_names (line 37) | def load_codes_and_names(self): method get_code_list (line 42) | def get_code_list(self) -> list: method get_name_list (line 45) | def get_name_list(self) -> list: method add_name (line 48) | def add_name(self, code, name) -> bool: method get_name (line 54) | def get_name(self, code) -> str: function load_stock_code_and_names (line 70) | def load_stock_code_and_names(retention_day: int = 1): function get_stock_codes_and_names (line 112) | def get_stock_codes_and_names() -> Dict[str, str]: function delete_file (line 145) | def delete_file(path: str) -> None: function load_pickle (line 157) | def load_pickle(path: str) -> Optional[dict]: function save_pickle (line 167) | def save_pickle(path: str, obj: object) -> None: function load_json (line 173) | def load_json(path: str) -> dict: function save_json (line 185) | def save_json(path: str, var: dict, ensure_ascii=True) -> None: function del_key (line 191) | def del_key(lock: threading.Lock, path: str, key: str) -> None: function del_keys (line 200) | def del_keys(lock: threading.Lock, path: str, keys: List[str]) -> None: function del_held_day (line 210) | def del_held_day(lock: threading.Lock, path: str, key: str): function new_held (line 229) | def new_held(held_operation_lock: threading.Lock, path: str, codes: List... function all_held_inc (line 243) | def all_held_inc(lock: threading.Lock, path: str) -> bool: function update_max_prices (line 270) | def update_max_prices( function load_symbols (line 341) | def load_symbols(path: str) -> list[str]: function save_symbols (line 351) | def save_symbols(path: str, symbols: list[str]) -> None: function record_deal (line 357) | def record_deal( function get_disk_trade_day_list_and_update_max_year (line 390) | def get_disk_trade_day_list_and_update_max_year() -> list: function get_prev_trading_date (line 400) | def get_prev_trading_date(now: datetime.datetime, count: int, basic_form... function get_prev_trading_date_str (line 406) | def get_prev_trading_date_str(today: str, count: int, basic_format: bool... function get_next_trading_date (line 431) | def get_next_trading_date(now: datetime.datetime, count: int, basic_form... function get_next_trading_date_str (line 437) | def get_next_trading_date_str(today: str, count: int, basic_format: bool... function get_prev_trading_date_list (line 463) | def get_prev_trading_date_list(today: str, count: int) -> list: function get_trading_date_list (line 478) | def get_trading_date_list(start_date: str, end_date: str) -> list: function check_is_open_day_sina (line 508) | def check_is_open_day_sina(curr_date: str) -> bool: function check_is_open_day (line 547) | def check_is_open_day(curr_date: str) -> bool: function check_open_day (line 555) | def check_open_day(func): function _index_constituent_df_ok (line 568) | def _index_constituent_df_ok(df: Optional[pd.DataFrame]) -> bool: function _load_legacy_index_constituent_pkl (line 574) | def _load_legacy_index_constituent_pkl(index_symbol: str) -> Optional[pd... function get_index_constituent_symbols (line 585) | def get_index_constituent_symbols(index_symbol: str) -> list[str]: function get_index_constituent_codes (line 606) | def get_index_constituent_codes(index_symbol: str) -> list: function get_market_value_limited_codes (line 612) | def get_market_value_limited_codes(code_prefixes: Set[str], min_value: i... function get_available_stock_codes (line 622) | def get_available_stock_codes() -> list[str]: function _filter_none_st_out (line 628) | def _filter_none_st_out(df: pd.DataFrame) -> pd.DataFrame: function get_prefixes_stock_codes (line 637) | def get_prefixes_stock_codes(prefixes: Set[str], none_st: bool = False) ... function get_none_st_codes (line 648) | def get_none_st_codes() -> list[str]: function get_stock_codes_and_circulation_mv (line 656) | def get_stock_codes_and_circulation_mv() -> Dict[str, int]: function _get_recent_fhps_report_date (line 668) | def _get_recent_fhps_report_date(now: Optional[datetime.datetime] = None... function get_recent_exit_right_codes_from_fhps (line 681) | def get_recent_exit_right_codes_from_fhps( FILE: tools/utils_cache_ak.py function _ak_module (line 17) | def _ak_module(): function cache_with_path_ttl (line 22) | def cache_with_path_ttl(path: str | Callable[..., str], ttl: int, dtype:... function _read_csv_disk_ignore_ttl (line 48) | def _read_csv_disk_ignore_ttl(cache_path: str, dtype: dict) -> Optional[... function cache_with_path_ttl_protected (line 58) | def cache_with_path_ttl_protected(path: str | Callable[..., str], ttl: i... function _ak_fetch_noarg (line 142) | def _ak_fetch_noarg(method_name: str) -> Callable[..., Any]: function _ak_fetch_fhps_date (line 150) | def _ak_fetch_fhps_date(method_name: str) -> Callable[..., Any]: function _ak_fetch_index_symbol (line 158) | def _ak_fetch_index_symbol(method_name: str) -> Callable[..., Any]: function _build_ak_cache_type (line 166) | def _build_ak_cache_type(type_name: str, *, stale_fallback: bool) -> type: FILE: tools/utils_dfcf.py function symbol_to_dfcf_symbol (line 19) | def symbol_to_dfcf_symbol(symbol: str) -> str: function dfcf_symbol_to_symbol (line 28) | def dfcf_symbol_to_symbol(dfcf_symbol: str) -> str: function code_to_dfcf_symbol (line 34) | def code_to_dfcf_symbol(code: str) -> str: function dfcf_symbol_to_code (line 38) | def dfcf_symbol_to_code(dfcf_symbol: str) -> str: function order_sell (line 45) | def order_sell(code, price, volume, remark): function order_buy (line 57) | def order_buy(code: str, price: float, volume: int): function get_history_data (line 72) | def get_history_data(context, code: str, days: int, fields: list[str], f... function update_cache_quote (line 89) | def update_cache_quote(quotes: dict[str, dict], bars: list[dict], curr_t... class EmDelegate (line 149) | class EmDelegate(BaseDelegate, ABC): method check_asset (line 155) | def check_asset(self) -> any: method check_orders (line 158) | def check_orders(self) -> list: method check_positions (line 161) | def check_positions(self) -> list: method order_market_open (line 164) | def order_market_open( method order_market_close (line 174) | def order_market_close( method order_limit_open (line 184) | def order_limit_open( method order_limit_close (line 194) | def order_limit_close( method order_cancel_all (line 204) | def order_cancel_all(self, strategy_name: str = DEFAULT_STRATEGY_NAME)... method order_cancel_buy (line 207) | def order_cancel_buy(self, code: str, strategy_name: str = DEFAULT_STR... method order_cancel_sell (line 210) | def order_cancel_sell(self, code: str, strategy_name: str = DEFAULT_ST... FILE: tools/utils_ding.py class BaseMessager (line 12) | class BaseMessager: method send_message (line 14) | def send_message(self, data) -> dict: method send_text (line 18) | def send_text(self, text: str, output: str = '', alert: bool = False) ... method send_text_as_md (line 22) | def send_text_as_md(self, text: str, output: str = '', alert: bool = F... method send_markdown (line 26) | def send_markdown(self, title: str, text: str, output: str = '', alert... class DingMessager (line 30) | class DingMessager(BaseMessager): method __init__ (line 31) | def __init__(self, secret: str = None, url: str = None): method refresh_webhook (line 42) | def refresh_webhook(self): method send_message (line 59) | def send_message(self, data) -> dict: method send_text (line 85) | def send_text(self, text: str, output: str = '', alert: bool = False) ... method send_text_as_md (line 106) | def send_text_as_md(self, text: str, output: str = '', alert: bool = F... method send_markdown (line 113) | def send_markdown(self, title: str, text: str, output: str = '', alert... FILE: tools/utils_feishu.py function get_feishu_markdown_card (line 14) | def get_feishu_markdown_card(title, text): class FeishuMessager (line 57) | class FeishuMessager(BaseMessager): method __init__ (line 58) | def __init__(self, secret: str = None, webhook_url: str = None): method refresh_webhook (line 68) | def refresh_webhook(self) -> bool: method gen_sign (line 82) | def gen_sign(self, timestamp: int) -> str: method send_message (line 96) | def send_message(self, data: Dict[str, Any]) -> dict: method send_text (line 121) | def send_text(self, text: str, output: str = '', alert: bool = False) ... method send_text_as_md (line 167) | def send_text_as_md(self, text: str, output: str = '', alert: bool = F... method send_markdown (line 174) | def send_markdown(self, title: str, text: str, output: str = '', alert... FILE: tools/utils_miniqmt.py function _run_with_timeout (line 7) | def _run_with_timeout(target_func, args=(), timeout=1) -> any: function _download_and_fetch_qmt_daily (line 38) | def _download_and_fetch_qmt_daily(code_list: list[str], start_time: str,... function _qmt_to_standard (line 86) | def _qmt_to_standard(input_dict: dict[str, pd.DataFrame]) -> pd.DataFrame: function get_qmt_daily_histories (line 118) | def get_qmt_daily_histories( function get_qmt_daily_history (line 135) | def get_qmt_daily_history( FILE: tools/utils_mootdx.py class MootdxClientInstance (line 28) | class MootdxClientInstance: method __new__ (line 32) | def __new__(cls): method __init__ (line 38) | def __init__(self): class MootdxDailyBarReaderInstance (line 53) | class MootdxDailyBarReaderInstance: method __new__ (line 57) | def __new__(cls): method __init__ (line 63) | def __init__(self): class MooTdxDailyBarReader (line 69) | class MooTdxDailyBarReader(TdxDailyBarReader): method get_security_type (line 104) | def get_security_type(self, fname): function make_qfq (line 158) | def make_qfq(data, xdxr, fq_type="01"): function make_hfq (line 213) | def make_hfq(bfq_data, xdxr_data): function _get_offset_start (line 265) | def _get_offset_start(csv_path: str, start_date_str: str, end_date_str: ... function _get_bars_with_offset (line 347) | def _get_bars_with_offset(client, symbol, total_offset, start=0): function _get_xdxr (line 398) | def _get_xdxr(symbol: str, cache_dir: str = DEFAULT_XDXR_CACHE_PATH, exp... function get_mootdx_daily_history (line 424) | def get_mootdx_daily_history( function _get_xdxr_sina (line 500) | def _get_xdxr_sina(code: str, adjust: ExitRight, factor_name: str = None... function _fq_factor (line 514) | def _fq_factor(code: str, method: str, ) -> pd.DataFrame: function _fetch_xdxr_factor (line 555) | def _fetch_xdxr_factor(code, adjust, factor_name=None) -> pd.DataFrame: function _factor_reversion (line 572) | def _factor_reversion(method: str = 'qfq', raw: pd.DataFrame = None, adj... function update_tdx_hsjday (line 599) | def update_tdx_hsjday(TDXDIR: str, isExtract = True, cachefile = None) -... function _process_tdx_zip_to_datas (line 660) | def _process_tdx_zip_to_datas(group_codes, zip_ref, cache_xdxr, day_coun... function check_xdxr_cache (line 769) | def check_xdxr_cache(adjust=ExitRight.QFQ, force_refresh_updated_date: b... function verify_xdxr_cache_completeness (line 851) | def verify_xdxr_cache_completeness(cache_history: Dict[str, pd.DataFrame... function _pycurl_request (line 891) | def _pycurl_request(url, headers=None): function _get_stock_dividend (line 925) | def _get_stock_dividend(headers: dict, start_date: str, page: int = 0) -... function get_dividend_code_from_baidu (line 954) | def get_dividend_code_from_baidu(date: str = "20241107") -> tuple[pd.Dat... function download_tdx_hsjday (line 995) | def download_tdx_hsjday() -> io.BytesIO|bool: function get_tdxzip_history (line 1025) | def get_tdxzip_history(adjust: ExitRight = ExitRight.QFQ, day_count: int... FILE: tools/utils_remote.py class BaoStockInstance (line 17) | class BaoStockInstance: method __new__ (line 24) | def __new__(cls): method __init__ (line 31) | def __init__(self): method logout (line 44) | def logout(self): method __del__ (line 53) | def __del__(self): function set_tdx_zxg_code (line 57) | def set_tdx_zxg_code(data: list[str], file_name: str = None, block_name:... function get_tdx_zxg_code (line 73) | def get_tdx_zxg_code(file_name: str = None) -> list[str]: function get_mootdx_quotes (line 98) | def get_mootdx_quotes(code_list: list[str]) -> dict[str, any]: function get_wencai_codes (line 160) | def get_wencai_codes(queries: list[str]) -> list[str]: function pull_stock_codes (line 181) | def pull_stock_codes(prefix: str, host: str, auth: str) -> tuple[Optiona... function qmt_pad_list (line 202) | def qmt_pad_list(xs, target_length: int, fill=0): function _adjust_list (line 210) | def _adjust_list(input_list: list, target_length: int) -> list: function qmt_quote_to_tick (line 215) | def qmt_quote_to_tick(quote: dict) -> dict: function qmt_quote_to_day_kline (line 260) | def qmt_quote_to_day_kline(quote: dict, curr_date: str) -> dict: function concat_ak_quote_dict (line 277) | def concat_ak_quote_dict(source_df: pd.DataFrame, quote: dict, curr_date... function append_ak_daily_row (line 283) | def append_ak_daily_row(source_df: pd.DataFrame, row: dict) -> pd.DataFr... function append_ak_spot_dict (line 288) | def append_ak_spot_dict(source_df: pd.DataFrame, row: pd.Series, curr_da... function get_ak_daily_history (line 308) | def get_ak_daily_history( function _ts_to_standard (line 380) | def _ts_to_standard(df: pd.DataFrame) -> pd.DataFrame: function get_ts_daily_history (line 402) | def get_ts_daily_history( function get_ts_stk_daily_history (line 441) | def get_ts_stk_daily_history( function _get_ts_daily_histories_by_batch (line 497) | def _get_ts_daily_histories_by_batch( function get_ts_daily_histories (line 597) | def get_ts_daily_histories( function get_bao_daily_history (line 613) | def get_bao_daily_history( function get_daily_history (line 666) | def get_daily_history( function get_ths_concept_ranking_df (line 705) | def get_ths_concept_ranking_df( function get_ths_concept_ranking_str (line 724) | def get_ths_concept_ranking_str( FILE: trader/buyer.py class SelectionItem (line 13) | class SelectionItem: class BaseBuyer (line 19) | class BaseBuyer: method __init__ (line 20) | def __init__( method buy_selections (line 37) | def buy_selections( method order_buy (line 105) | def order_buy( class LimitedBuyer (line 175) | class LimitedBuyer(BaseBuyer): method __init__ (line 176) | def __init__( method order_buy (line 190) | def order_buy( FILE: trader/pools.py class StockPool (line 15) | class StockPool: method __init__ (line 16) | def __init__(self, account_id: str, strategy_name: str, parameters: an... method get_code_list (line 26) | def get_code_list(self) -> list[str]: method update_code_list (line 29) | def update_code_list(self) -> None: method clear_code_list (line 32) | def clear_code_list(self) -> None: method refresh (line 35) | def refresh(self): method refresh_black (line 49) | def refresh_black(self): method refresh_white (line 52) | def refresh_white(self): method filter_white_list_by_selector (line 56) | def filter_white_list_by_selector(self, filter_func: Callable, cache_h... class StocksPoolBlackEmpty (line 90) | class StocksPoolBlackEmpty(StockPool): method __init__ (line 91) | def __init__(self, account_id: str, strategy_name: str, parameters, di... class StocksPoolBlackWencai (line 99) | class StocksPoolBlackWencai(StockPool): method __init__ (line 100) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_black (line 104) | def refresh_black(self): class StocksPoolWhiteWencai (line 115) | class StocksPoolWhiteWencai(StocksPoolBlackWencai): method __init__ (line 116) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 120) | def refresh_white(self): class StocksPoolWhiteCustomSymbol (line 132) | class StocksPoolWhiteCustomSymbol(StocksPoolBlackWencai): method __init__ (line 133) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 137) | def refresh_white(self): class StocksPoolWhiteCustomTdx (line 152) | class StocksPoolWhiteCustomTdx(StocksPoolBlackWencai): method __init__ (line 153) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 158) | def refresh_white(self): class StocksPoolWhiteIndexes (line 169) | class StocksPoolWhiteIndexes(StocksPoolBlackWencai): method __init__ (line 170) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 174) | def refresh_white(self): class StocksPoolWhiteIndexesMA (line 183) | class StocksPoolWhiteIndexesMA(StocksPoolBlackWencai): method __init__ (line 184) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 190) | def refresh_white(self): class StocksPoolWhiteIndexesMACD (line 204) | class StocksPoolWhiteIndexesMACD(StocksPoolBlackWencai): method __init__ (line 205) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 209) | def refresh_white(self): class StocksPoolWhitePrefixes (line 224) | class StocksPoolWhitePrefixes(StocksPoolBlackWencai): method __init__ (line 225) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 233) | def refresh_white(self): class StocksPoolWhitePrefixesMA (line 241) | class StocksPoolWhitePrefixesMA(StocksPoolBlackWencai): method __init__ (line 242) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 248) | def refresh_white(self): class StocksPoolWhitePrefixesIndustry (line 261) | class StocksPoolWhitePrefixesIndustry(StocksPoolBlackWencai): method __init__ (line 262) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 266) | def refresh_white(self): class StocksPoolWhitePrefixesConcept (line 281) | class StocksPoolWhitePrefixesConcept(StocksPoolBlackWencai): method __init__ (line 282) | def __init__(self, account_id: str, strategy_name: str, parameters, di... method refresh_white (line 286) | def refresh_white(self): FILE: trader/pools_indicator.py function get_ma_index_indicator (line 8) | def get_ma_index_indicator( function get_macd_index_indicator (line 27) | def get_macd_index_indicator( FILE: trader/pools_section.py function select_industry_sections (line 12) | def select_industry_sections( function select_dfcf_industry_sections (line 35) | def select_dfcf_industry_sections( function get_dfcf_industry_sections (line 79) | def get_dfcf_industry_sections(limit: int = 2000) -> list[str]: function get_dfcf_industry_stock_codes (line 101) | def get_dfcf_industry_stock_codes(section_result: list[str]) -> set: function get_ths_concept_sections (line 111) | def get_ths_concept_sections(limit: int = 2000, period: int = 0): function get_ths_concept_stock_codes (line 146) | def get_ths_concept_stock_codes(section_names: list[str]): function get_sw_sections (line 159) | def get_sw_sections(target_date='20240809'): FILE: trader/seller.py class BaseSeller (line 14) | class BaseSeller: method __init__ (line 15) | def __init__(self, strategy_name: str, delegate: BaseDelegate, paramet... method order_sell (line 20) | def order_sell(self, code, quote, volume, remark, log=True) -> None: method execute_sell (line 56) | def execute_sell( method check_sell (line 105) | def check_sell( class LimitedSeller (line 113) | class LimitedSeller(BaseSeller): method __init__ (line 114) | def __init__(self, strategy_name: str, delegate: BaseDelegate, paramet... method order_sell (line 118) | def order_sell(self, code, quote, volume, remark, log=True) -> None: FILE: trader/seller_components.py class HardSeller (line 21) | class HardSeller(BaseSeller): method __init__ (line 22) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 30) | def check_sell( class SafeSeller (line 62) | class SafeSeller(BaseSeller): method __init__ (line 63) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 69) | def check_sell( class SwitchSeller (line 105) | class SwitchSeller(BaseSeller): method __init__ (line 106) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 113) | def check_sell( class FallSeller (line 143) | class FallSeller(BaseSeller): method __init__ (line 144) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 150) | def check_sell( class ReturnSeller (line 184) | class ReturnSeller(BaseSeller): method __init__ (line 185) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 191) | def check_sell( class MoveSeller (line 226) | class MoveSeller(BaseSeller): method __init__ (line 227) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 233) | def check_sell( class OpenDaySeller (line 264) | class OpenDaySeller(BaseSeller): method __init__ (line 265) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 272) | def check_sell( class MASeller (line 314) | class MASeller(BaseSeller): method __init__ (line 315) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 321) | def check_sell( class CCISeller (line 355) | class CCISeller(BaseSeller): method __init__ (line 356) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 363) | def check_sell( class WRSeller (line 406) | class WRSeller(BaseSeller): method __init__ (line 407) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 413) | def check_sell( class VolumeDropSeller (line 448) | class VolumeDropSeller(BaseSeller): method __init__ (line 449) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 457) | def check_sell( class DropSeller (line 494) | class DropSeller(BaseSeller): method __init__ (line 495) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 501) | def check_sell( class IncBlocker (line 541) | class IncBlocker(BaseSeller): method __init__ (line 542) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 546) | def check_sell( class UppingBlocker (line 563) | class UppingBlocker(BaseSeller): method __init__ (line 564) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 568) | def check_sell( FILE: trader/seller_groups.py class GroupSellers (line 4) | class GroupSellers: method __init__ (line 5) | def __init__(self): method group_init (line 8) | def group_init(self, strategy_name, delegate, parameters): method group_check_sell (line 15) | def group_check_sell( class ClassicGroupSeller (line 35) | class ClassicGroupSeller(GroupSellers, HardSeller, FallSeller, ReturnSel... method __init__ (line 36) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 40) | def check_sell(self, code, quote, curr_date, curr_time, position, held... class ClassicMAGroupSeller (line 45) | class ClassicMAGroupSeller(GroupSellers, HardSeller, FallSeller, ReturnS... method __init__ (line 46) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 50) | def check_sell(self, code, quote, curr_date, curr_time, position, held... class ShieldGroupSeller (line 55) | class ShieldGroupSeller(GroupSellers, HardSeller, FallSeller): method __init__ (line 56) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 60) | def check_sell(self, code, quote, curr_date, curr_time, position, held... class WencaiGroupSeller (line 65) | class WencaiGroupSeller(GroupSellers, HardSeller, FallSeller, ReturnSell... method __init__ (line 66) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 70) | def check_sell(self, code, quote, curr_date, curr_time, position, held... class DeepseekGroupSeller (line 75) | class DeepseekGroupSeller(GroupSellers, HardSeller, SwitchSeller, FallSe... method __init__ (line 76) | def __init__(self, strategy_name, delegate, parameters): method check_sell (line 80) | def check_sell(self, code, quote, curr_date, curr_time, position, held... FILE: update.py function git_pull (line 4) | def git_pull():