165 lines
3.8 KiB
Python
165 lines
3.8 KiB
Python
"""
|
|
因子模块初始化文件
|
|
"""
|
|
|
|
# from .operator_framework import (
|
|
# StockWiseFactor,
|
|
# DateWiseFactor
|
|
# )
|
|
|
|
# 导入所有因子类
|
|
from .technical_factors import (
|
|
SMAFactor,
|
|
EMAFactor,
|
|
ATRFactor,
|
|
OBVFactor,
|
|
MACDFactor,
|
|
RSI_Factor,
|
|
CrossSectionalRankFactor
|
|
)
|
|
|
|
from .money_flow_factors import (
|
|
LGFlowFactor,
|
|
FlowIntensityFactor,
|
|
FlowDivergenceFactor,
|
|
FlowStructureFactor,
|
|
FlowAccelerationFactor,
|
|
CostSqueeze,
|
|
HighCostSelling,
|
|
LowCostAccumulation,
|
|
InstNetAccum,
|
|
ChipLockin,
|
|
RetailOutInstIn,
|
|
AccumAccel
|
|
)
|
|
|
|
from .chip_factors import (
|
|
ChipConcentrationFactor,
|
|
ChipSkewnessFactor,
|
|
FloatingChipFactor,
|
|
CostSupportFactor,
|
|
WinnerPriceZoneFactor
|
|
)
|
|
|
|
from .sentiment_factors import (
|
|
SentimentPanicGreedFactor,
|
|
SentimentBreadthFactor,
|
|
SentimentReversalFactor,
|
|
PriceDeductionFactor,
|
|
PriceDeductionRatioFactor,
|
|
IndustryMomentumLeadership,
|
|
LeadershipPersistenceScore,
|
|
DynamicIndustryLeadership
|
|
)
|
|
|
|
from .industry_factors import (
|
|
IndustryMomentumFactor,
|
|
MarketBreadthFactor,
|
|
SectorRotationFactor
|
|
)
|
|
|
|
from .financial_factors import (
|
|
CashflowToEVFactor,
|
|
BookToPriceFactor,
|
|
DebtToEquityFactor,
|
|
ProfitMarginFactor,
|
|
BMFactor
|
|
)
|
|
|
|
from .special_factors import (
|
|
LimitFactor,
|
|
VolumeRatioFactor,
|
|
BBI_RATIO_FACTOR,
|
|
VolatilitySlopeFactor,
|
|
PriceVolumeTrendFactor
|
|
)
|
|
from .momentum_factors import (
|
|
ReturnFactor,
|
|
VolatilityFactor,
|
|
MomentumFactor,
|
|
MomentumAcceleration,
|
|
TrendEfficiency
|
|
)
|
|
|
|
|
|
# 导入统一因子计算模块
|
|
from .all_factors import calculate_all_factors, compute_factors
|
|
|
|
# 导入算子框架
|
|
from .operator_framework import StockWiseFactor, DateWiseFactor, FactorGraph
|
|
|
|
# 定义所有因子类的列表,便于统一管理
|
|
ALL_STOCK_FACTORS = [
|
|
SMAFactor,
|
|
EMAFactor,
|
|
ATRFactor,
|
|
OBVFactor,
|
|
MACDFactor,
|
|
RSI_Factor,
|
|
LGFlowFactor,
|
|
FlowIntensityFactor,
|
|
FlowDivergenceFactor,
|
|
FlowStructureFactor,
|
|
FlowAccelerationFactor,
|
|
ChipConcentrationFactor,
|
|
ChipSkewnessFactor,
|
|
FloatingChipFactor,
|
|
CostSupportFactor,
|
|
WinnerPriceZoneFactor,
|
|
SentimentPanicGreedFactor,
|
|
SentimentBreadthFactor,
|
|
SentimentReversalFactor,
|
|
PriceDeductionFactor,
|
|
PriceDeductionRatioFactor,
|
|
CashflowToEVFactor,
|
|
BookToPriceFactor,
|
|
DebtToEquityFactor,
|
|
ProfitMarginFactor,
|
|
LimitFactor,
|
|
VolumeRatioFactor,
|
|
BBI_RATIO_FACTOR,
|
|
VolatilitySlopeFactor,
|
|
PriceVolumeTrendFactor
|
|
]
|
|
|
|
ALL_DATE_FACTORS = [
|
|
CrossSectionalRankFactor,
|
|
IndustryMomentumFactor,
|
|
MarketBreadthFactor,
|
|
SectorRotationFactor
|
|
]
|
|
|
|
__all__ = [
|
|
# 技术指标因子
|
|
'SMAFactor', 'EMAFactor', 'ATRFactor', 'OBVFactor', 'MACDFactor', 'RSI_Factor',
|
|
|
|
# 资金流因子
|
|
'LGFlowFactor', 'FlowIntensityFactor', 'FlowDivergenceFactor',
|
|
'FlowStructureFactor', 'FlowAccelerationFactor',
|
|
|
|
# 筹码分布因子
|
|
'ChipConcentrationFactor', 'ChipSkewnessFactor', 'FloatingChipFactor',
|
|
'CostSupportFactor', 'WinnerPriceZoneFactor',
|
|
|
|
# 市场情绪因子
|
|
'SentimentPanicGreedFactor', 'SentimentBreadthFactor', 'SentimentReversalFactor',
|
|
'PriceDeductionFactor', 'PriceDeductionRatioFactor',
|
|
|
|
# 行业/横截面因子
|
|
'CrossSectionalRankFactor', 'IndustryMomentumFactor', 'MarketBreadthFactor',
|
|
'SectorRotationFactor',
|
|
|
|
# 财务因子
|
|
'CashflowToEVFactor', 'BookToPriceFactor', 'ROEFactor', 'DebtToEquityFactor',
|
|
'ProfitMarginFactor',
|
|
|
|
# 特殊因子
|
|
'LimitFactor', 'VolumeRatioFactor', 'BBI_RATIO_FACTOR',
|
|
'VolatilitySlopeFactor', 'PriceVolumeTrendFactor',
|
|
|
|
# 统一因子计算
|
|
'calculate_all_factors', 'compute_factors', 'get_available_stock_factors', 'get_available_date_factors',
|
|
|
|
# # 算子框架
|
|
# 'StockWiseFactor', 'DateWiseFactor'
|
|
] |