当前位置:首页>python>MT5 Python 量化实战:经典Alpha因子代码模板

MT5 Python 量化实战:经典Alpha因子代码模板

  • 2026-06-28 04:57:01
MT5 Python 量化实战:经典Alpha因子代码模板

刚开始用MT5做量化那会,我花时间最多的不是写策略,而是把因子算对。异常值、量纲、数据对齐,随便一个没处理好,回测好看实盘就崩。

下面这套代码是我这两年一点点攒出来的,动量、价值、质量三类因子都打包好了。你拿去改改参数就能跑。

模板核心优势(专为MT5 Python量化优化)

这套Alpha因子模板摒弃了新手碎片化写法,完全对标专业量化机构因子生产标准,适配MT5金融数据特性,核心亮点:

全品类因子覆盖,适配MT5标的

整合动量、价值、质量三大类12个经典Alpha因子,覆盖趋势跟踪、估值套利、优质标的筛选三大主流交易逻辑,适配MT5外汇、股票、大宗商品等绝大多数交易品种。

专业数据预处理,杜绝实盘踩坑

内置1%分位数去极值+Z-score标准化双重处理,自动剔除极端异常数据,统一所有因子量纲,避免单一因子权重失衡导致策略失效。同时规避量化最致命的前瞻偏差,完全贴合实盘交易逻辑。

标准化输出,无缝对接回测框架

输出结构化因子数据集,支持Zipline、Alphalens主流量化回测框架,直接用于因子有效性检验、策略参数优化、绩效分析,打通「因子计算—回测验证—策略落地」全流程。

适配双数据源,兼容性极强

兼容MT5 OHLCV行情数据+标的财务数据,支持日频行情、月度/季度财务数据融合计算,满足短中线MT5量化策略开发需求。

三大类Alpha因子核心逻辑解析

所有因子均经过逻辑优化,适配MT5实时行情波动特性,每一个因子都对应明确的交易信号:

动量类因子:捕捉趋势强弱,顺势交易核心

作用:识别标的价格趋势、超买超卖状态,适配MT5趋势跟踪策略,避免逆势交易。

包含:20日价格动量、14日RSI相对强弱、MACD趋势因子、布林带位置因子。

价值类因子:筛选低估标的,捕捉修复行情

作用:判断标的估值合理性,挖掘低估值、高性价比交易机会,适配MT5中长线价值套利策略。

包含:市盈率PE、市净率PB、EV/EBITDA、股息收益率,所有因子已做反向标准化,因子数值越高,标的估值优势越明显。

质量类因子:甄别优质标的,降低黑天鹅风险

作用:衡量企业经营、盈利、财务健康度,筛选基本面优质标的,提升MT5策略稳定性。

包含:ROE净资产收益率、资产周转率、资产负债率、盈利稳定性因子。

MT5 Python Alpha因子完整代码模板

以下代码可直接复制运行,适配Python3.8+环境,搭配MT5导出的OHLCV数据、财务数据即可快速生成标准化因子数据集。

import pandas as pd
import numpy as np
from talib import RSI, MACD, ATR, BBANDS
from scipy.stats import rankdata

classAlphaFactorCalculator:
def__init__(self, ohlcv_data: pd.DataFrame, financial_data: pd.DataFrame):
self.ohlcv = ohlcv_data.copy().sort_index()
self.financial = financial_data.copy().sort_index()
self.factors = pd.DataFrame(index=self.ohlcv.index)

def_winsorize(self, series: pd.Series, quantile: float = 0.01) -> pd.Series:
return series.clip(lower=series.quantile(quantile), upper=series.quantile(1 - quantile))

def_standardize(self, series: pd.Series) -> pd.Series:
return (series - series.mean()) / series.std()

# ---------------------- 动量类因子(MT5趋势交易) ----------------------
defcalculate_price_momentum(self, window: int = 20) -> pd.Series:
        momentum = self.ohlcv.groupby('ticker')['close'].pct_change(window)
returnself._winsorize(self._standardize(momentum))

defcalculate_rsi_factor(self, timeperiod: int = 14) -> pd.Series:
        rsi = self.ohlcv.groupby('ticker')['close'].apply(lambda x: RSI(x, timeperiod=timeperiod))
returnself._standardize(rsi)

defcalculate_macd_factor(self) -> pd.Series:
def_macd_signal(close):
            macd, _, _ = MACD(close)
return macd
        macd = self.ohlcv.groupby('ticker')['close'].apply(_macd_signal)
returnself._winsorize(self._standardize(macd))

defcalculate_bollinger_band_factor(self) -> pd.Series:
def_bb_signal(close):
            upper, _, lower = BBANDS(close, timeperiod=20)
return (close - lower) / (upper - lower)
        bb_factor = self.ohlcv.groupby('ticker')['close'].apply(_bb_signal)
returnself._standardize(bb_factor)

# ---------------------- 价值类因子(估值套利) ----------------------
defcalculate_pe_ratio(self) -> pd.Series:
        pe = self.financial['market_cap'] / self.financial['eps']
        pe = pe.replace([np.inf, -np.inf], np.nan).dropna()
returnself._winsorize(self._standardize(-pe))

defcalculate_pb_ratio(self) -> pd.Series:
        pb = self.financial['market_cap'] / self.financial['book_value']
        pb = pb.replace([np.inf, -np.inf], np.nan).dropna()
returnself._winsorize(self._standardize(-pb))

defcalculate_ev_ebitda(self) -> pd.Series:
        ev = self.financial['market_cap'] + self.financial['total_debt'] - self.financial['cash']
        ev_ebitda = ev / self.financial['ebitda']
        ev_ebitda = ev_ebitda.replace([np.inf, -np.inf], np.nan).dropna()
returnself._winsorize(self._standardize(-ev_ebitda))

defcalculate_dividend_yield(self) -> pd.Series:
        dividend_yield = self.financial['dividend'] / self.ohlcv['close']
returnself._winsorize(self._standardize(dividend_yield))

# ---------------------- 质量类因子(基本面风控) ----------------------
defcalculate_roe(self) -> pd.Series:
        roe = self.financial['net_profit'] / self.financial['book_value']
returnself._winsorize(self._standardize(roe))

defcalculate_asset_turnover(self) -> pd.Series:
        turnover = self.financial['revenue'] / self.financial['total_assets']
returnself._winsorize(self._standardize(turnover))

defcalculate_debt_to_equity(self) -> pd.Series:
        debt_eq = self.financial['total_debt'] / self.financial['equity']
        debt_eq = debt_eq.replace([np.inf, -np.inf], np.nan).dropna()
returnself._winsorize(self._standardize(-debt_eq))

defcalculate_earnings_stability(self, window: int = 8) -> pd.Series:
        eps_growth = self.financial.groupby('ticker')['eps'].pct_change(1)
        stability = eps_growth.groupby('ticker').rolling(window=window).std()
returnself._winsorize(self._standardize(-stability))

# ---------------------- 因子批量整合输出 ----------------------
defcompute_all_factors(self) -> pd.DataFrame:
"""批量计算所有因子,输出标准化数据集"""

self.factors['price_momentum_20d'] = self.calculate_price_momentum(20)
self.factors['rsi_14d'] = self.calculate_rsi_factor(14)
self.factors['macd'] = self.calculate_macd_factor()
self.factors['bollinger_band'] = self.calculate_bollinger_band_factor()

self.factors['pe_ratio'] = self.calculate_pe_ratio()
self.factors['pb_ratio'] = self.calculate_pb_ratio()
self.factors['ev_ebitda'] = self.calculate_ev_ebitda()
self.factors['dividend_yield'] = self.calculate_dividend_yield()

self.factors['roe'] = self.calculate_roe()
self.factors['asset_turnover'] = self.calculate_asset_turnover()
self.factors['debt_to_equity'] = self.calculate_debt_to_equity()
self.factors['earnings_stability'] = self.calculate_earnings_stability(8)

# 日期分组中位数填充缺失值,保证数据完整性
self.factors = self.factors.groupby(['date']).apply(
lambda x: x.fillna(x.median())
        )
returnself.factors

# ---------------------- MT5环境使用示例 ----------------------
if __name__ == "__main__":
# 模拟MT5行情与财务数据(实际使用替换为MT5导出真实数据)
    dates = pd.date_range('2020-01-01''2023-12-31', freq='D')
    tickers = ['AAPL''MSFT''GOOG''AMZN']

    ohlcv_data = pd.DataFrame(
        index=pd.MultiIndex.from_product([dates, tickers], names=['date''ticker']),
        data={
'open': np.random.uniform(100500len(dates)*len(tickers)),
'high': np.random.uniform(100500len(dates)*len(tickers)),
'low': np.random.uniform(100500len(dates)*len(tickers)),
'close': np.random.uniform(100500len(dates)*len(tickers)),
'volume': np.random.randint(1e61e8len(dates)*len(tickers))
        }
    )

    financial_data = pd.DataFrame(
        index=pd.MultiIndex.from_product([dates[::30], tickers], names=['date''ticker']),
        data={
'eps': np.random.uniform(110len(dates[::30])*len(tickers)),
'market_cap': np.random.uniform(1e111e12len(dates[::30])*len(tickers)),
'book_value': np.random.uniform(1e101e11len(dates[::30])*len(tickers)),
'ebitda': np.random.uniform(1e105e10len(dates[::30])*len(tickers)),
'dividend': np.random.uniform(05len(dates[::30])*len(tickers)),
'net_profit': np.random.uniform(5e92e10len(dates[::30])*len(tickers)),
'revenue': np.random.uniform(5e103e11len(dates[::30])*len(tickers)),
'total_assets': np.random.uniform(1e115e11len(dates[::30])*len(tickers)),
'total_debt': np.random.uniform(1e101e11len(dates[::30])*len(tickers)),
'equity': np.random.uniform(5e103e11len(dates[::30])*len(tickers)),
'cash': np.random.uniform(1e105e10len(dates[::30])*len(tickers))
        }
    )

    calculator = AlphaFactorCalculator(ohlcv_data, financial_data)
    factor_dataset = calculator.compute_all_factors()

    factor_dataset.to_parquet('mt5_alpha_factors_dataset.parquet')
print("MT5 Alpha因子数据集生成完成")
print("数据集形状:", factor_dataset.shape)
print("\n已生成因子列表:")
print(factor_dataset.columns.tolist())

MT5实战使用关键说明

数据接入要求(适配MT5)

• OHLCV行情数据:从MT5导出,设置多级索引 (date, ticker),必须包含open、high、low、close、volume核心字段;
• 财务数据:采用月度/季度低频数据,字段与模板对齐,索引需和MT5行情数据精准匹配,避免数据错位。

因子实战特性

• 动量因子:适配MT5短线、波段趋势策略,捕捉行情延续性机会;
• 价值因子:适合中长线持仓,筛选低估修复行情,降低追高风险;
• 质量因子:作为风控核心,过滤基本面劣质标的,提升策略稳定性。

核心预处理优势

模板自带1%分位数去极值+Z-score标准化+中位数填充缺失值,解决MT5行情跳空、异常波动、数据缺失问题,同时从根源规避前瞻偏差,回测结果可直接参考实盘效果。

落地应用场景

  1. 1. MT5多因子选股/选标的策略:整合12大因子打分,筛选高性价比交易标的;
  2. 2. 因子有效性回测:搭配Alphalens、Zipline完成因子IC值、胜率、收益分析;
  3. 3. 量化策略建模:作为基础因子库,搭建趋势、价值、基本面复合策略;
  4. 4. 实盘风控优化:通过质量、价值因子过滤劣质行情与标的,降低回撤。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 10:54:08 HTTP/2.0 GET : https://f.mffb.com.cn/a/498105.html
  2. 运行时间 : 0.103088s [ 吞吐率:9.70req/s ] 内存消耗:4,585.21kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=7c97b8461401f9a873bfd692613f459d
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000519s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000893s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000330s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000278s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000511s ]
  6. SELECT * FROM `set` [ RunTime:0.000196s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000596s ]
  8. SELECT * FROM `article` WHERE `id` = 498105 LIMIT 1 [ RunTime:0.000577s ]
  9. UPDATE `article` SET `lasttime` = 1783047248 WHERE `id` = 498105 [ RunTime:0.023622s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000269s ]
  11. SELECT * FROM `article` WHERE `id` < 498105 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000597s ]
  12. SELECT * FROM `article` WHERE `id` > 498105 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000698s ]
  13. SELECT * FROM `article` WHERE `id` < 498105 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005760s ]
  14. SELECT * FROM `article` WHERE `id` < 498105 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000862s ]
  15. SELECT * FROM `article` WHERE `id` < 498105 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000697s ]
0.104776s