Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ailabx/alphalab
/ functions
Functions
269 in github.com/ailabx/alphalab
⨍
Functions
269
◇
Types & classes
26
Method
CAP
Calculate market capitalization Args: close: Closing price shares: Number of outstanding shares
panda_factor/generate/factor_utils.py:373
Method
CCI
Calculate CCI indicator
panda_factor/generate/factor_utils.py:686
Method
CONST
Return constant series using last value of S
panda_factor/generate/factor_utils.py:417
Method
CORRELATION
Calculate rolling correlation coefficient Args: series1: First series series2: Second series window: Roll
panda_factor/generate/factor_utils.py:104
Method
COVARIANCE
Calculate rolling covariance
panda_factor/generate/factor_utils.py:285
Method
CROSS
Check for golden cross (upward cross) or death cross (downward cross)
panda_factor/generate/factor_utils.py:559
Method
DECAYLINEAR
Calculate weighted moving average with weights d,d-1,...,1 (normalized to sum to 1)
panda_factor/generate/factor_utils.py:487
Method
DECAY_LINEAR
Calculate linear decay weighted average
panda_factor/generate/factor_utils.py:227
Method
DELAY
Calculate lagged values
panda_factor/generate/factor_utils.py:130
Method
DELTA
Calculate difference
panda_factor/generate/factor_utils.py:196
Method
DFMA
Calculate DFMA indicator, returns DIF line
panda_factor/generate/factor_utils.py:759
Method
DIFF
Calculate difference between current and previous value, generates NAN at start, preserving index
panda_factor/generate/factor_utils.py:402
Method
DMA
Calculate dynamic moving average with smoothing factor A, requires 0<A<1
panda_factor/generate/factor_utils.py:457
Method
DMI
Calculate DMI indicator, returns ADX line
panda_factor/generate/factor_utils.py:705
Method
DPO
Calculate DPO indicator, returns DPO line
panda_factor/generate/factor_utils.py:747
Method
EMV
Calculate EMV indicator, returns EMV line
panda_factor/generate/factor_utils.py:739
Method
EVERY
EVERY(CLOSE>O, 5) Check if all values are True in last N days
panda_factor/generate/factor_utils.py:513
Method
EXIST
EXIST(CLOSE>3010, N=5) Check if condition exists in last N days
panda_factor/generate/factor_utils.py:518
Method
EXPMA
Calculate EXPMA indicator, returns short-term EMA
panda_factor/generate/factor_utils.py:799
Method
FILTER
FILTER function: When S condition is met, set next N periods to 0
panda_factor/generate/factor_utils.py:523
Method
FORCAST
Calculate predicted value using N-period linear regression
panda_factor/generate/factor_utils.py:477
Method
FUTURE_RETURNS
Calculate future returns Args: close: Price series period: Future periods to calculate returns for, default is 1
panda_factor/generate/factor_utils.py:67
Method
HHVBARS
Calculate number of periods since highest value in N periods
panda_factor/generate/factor_utils.py:432
Method
INDUSTRY_NEUTRALIZE
Industry neutralization
panda_factor/generate/factor_utils.py:263
Method
KDJ
Calculate KDJ indicator, returns K line Args: CLOSE: Close price series HIGH: High price series LOW: Low
panda_factor/generate/factor_utils.py:627
Method
KTN
Calculate Keltner Channel, returns middle line
panda_factor/generate/factor_utils.py:726
Method
LLVBARS
Calculate number of periods since lowest value in N periods
panda_factor/generate/factor_utils.py:437
Method
LOG
Calculate natural logarithm
panda_factor/generate/factor_utils.py:275
Method
LONGCROSS
Check if series cross after maintaining relative position for N periods
panda_factor/generate/factor_utils.py:568
Method
MACD
Calculate MACD indicator using EMA, requires 120 days for accuracy Args: CLOSE: Close price series SHORT: Short perio
panda_factor/generate/factor_utils.py:609
Method
MASS
Calculate MASS indicator, returns MASS line
panda_factor/generate/factor_utils.py:771
Method
MFI
Money Flow Index (Volume RSI) MFI is a volume-weighted RSI that shows buying and selling pressure. Uses vectorized operations for bet
panda_factor/generate/factor_utils.py:828
Method
MIN
Calculate element-wise minimum of two series or series and scalar
panda_factor/generate/factor_utils.py:307
Method
MTM
Calculate MTM indicator, returns MTM line
panda_factor/generate/factor_utils.py:765
Method
OBV
On Balance Volume OBV is calculated by adding volume on up days and subtracting volume on down days. Args: CLOSE: Close
panda_factor/generate/factor_utils.py:804
Method
POWER
Calculate power
panda_factor/generate/factor_utils.py:280
Method
PRODUCT
Calculate rolling product
panda_factor/generate/factor_utils.py:268
Method
PSY
Calculate PSY indicator, returns PSY line
panda_factor/generate/factor_utils.py:680
Method
RANK
Cross-sectional ranking, normalized to [-0.5, 0.5] range
panda_factor/generate/factor_utils.py:10
Method
RET
Return the Nth last value of series while preserving index
panda_factor/generate/factor_utils.py:388
Method
RETURNS
Calculate returns Args: close: Price series period: Return calculation period, default is 1 Returns:
panda_factor/generate/factor_utils.py:46
Method
ROC
Calculate Rate of Change (ROC) indicator ROC = (Current Price - Price N periods ago) / Price N periods ago × 100 Args: C
panda_factor/generate/factor_utils.py:777
Method
RSI
Calculate RSI indicator, matches TDX to 2 decimal places
panda_factor/generate/factor_utils.py:655
Method
SCALE
Scale series to [-1, 1] range
panda_factor/generate/factor_utils.py:239
Method
SIGN
Calculate sign(X) for series
panda_factor/generate/factor_utils.py:492
Method
SIGNEDPOWER
Calculate sign(X)*(abs(X)^n)
panda_factor/generate/factor_utils.py:497
Method
SLOPE
Calculate linear regression slope over N periods
panda_factor/generate/factor_utils.py:472
Method
STD
Calculate N-day standard deviation of series
panda_factor/generate/factor_utils.py:407
Method
STDDEV
Calculate rolling standard deviation
panda_factor/generate/factor_utils.py:92
Method
SUMIF
Conditional sum
panda_factor/generate/factor_utils.py:532
Method
TAQ
Calculate Tang Aikun Channel indicator, returns upper line
panda_factor/generate/factor_utils.py:720
Method
TRIX
Calculate TRIX indicator, returns TRIX line
panda_factor/generate/factor_utils.py:732
Method
TS_ARGMAX
Calculate time series maximum value position Returns position normalized to [0, 1] range, 0 means earliest, 1 means latest
panda_factor/generate/factor_utils.py:144
Method
TS_ARGMIN
Calculate time series minimum value position
panda_factor/generate/factor_utils.py:216
Method
TS_MAX
Calculate time series maximum
panda_factor/generate/factor_utils.py:211
Method
TS_MEAN
Calculate time series moving average Args: series: Input series window: Moving window size, default 20 Retur
panda_factor/generate/factor_utils.py:889
Method
TS_MIN
Calculate time series minimum
panda_factor/generate/factor_utils.py:206
Method
TS_RANK
Calculate time series rank
panda_factor/generate/factor_utils.py:185
Method
VALUEWHEN
When condition S is True, take current value of X Args: S: Condition series (boolean) X: Value series Return
panda_factor/generate/factor_utils.py:573
Method
VWAP
Calculate volume weighted average price Args: close: Price series volume: Volume series Returns:
panda_factor/generate/factor_utils.py:339
Method
WMA
Calculate N-period weighted moving average: Yn = (1*X1+2*X2+3*X3+...+n*Xn)/(1+2+3+...+Xn)
panda_factor/generate/factor_utils.py:462
Method
WR
Calculate Williams %R indicator, returns WR line
panda_factor/generate/factor_utils.py:662
Method
__call__
(self, target)
backtest/backtrader_algos.py:5
Method
__call__
(self, target)
backtest/backtrader_algos.py:13
Method
__call__
(self, target)
backtest/backtrader_algos.py:27
Method
__call__
(self, target)
backtest/backtrader_algos.py:67
Method
__call__
(self, target)
backtest/backtrader_algos.py:83
Method
__call__
(self, target)
backtest/backtrader_algos.py:100
Method
__call__
(self, target)
backtest/backtrader_algos.py:118
Method
__call__
(self, target)
backtest/backtrader_algos.py:135
Method
__call__
(self, target)
backtest/backtrader_algos.py:153
Method
__call__
根据当天信号值排序,丢弃N个信号后选取前K个信号 参数: signal: pd.DataFrame - 信号数据框,索引为日期 N: int - 要丢弃的信号数量 K: int
backtest/backtrader_algos.py:169
Method
__call__
(self, target)
backtest/backtrader_algos.py:237
Method
__call__
(self, target)
backtest/backtrader_algos.py:256
Method
__call__
(self, target)
backtest/backtrader_algos.py:267
Method
__init__
(self)
config.py:15
Method
__init__
(self, algo_list)
backtest/backtrader_engine.py:61
Method
__init__
(self, task: Task)
backtest/backtrader_engine.py:81
Method
__init__
(self)
backtest/backtrader_strategy.py:13
Method
__init__
(self)
backtest/backtrader_algos.py:10
Method
__init__
(self, n, period='days')
backtest/backtrader_algos.py:22
Method
__init__
(self)
backtest/backtrader_algos.py:64
Method
__init__
(self)
backtest/backtrader_algos.py:80
Method
__init__
(self)
backtest/backtrader_algos.py:97
Method
__init__
(self)
backtest/backtrader_algos.py:115
Method
__init__
(self, signal)
backtest/backtrader_algos.py:132
Method
__init__
(self, signal, K=1, drop_top_n=0, b_ascending=False)
backtest/backtrader_algos.py:163
Method
__init__
(self)
backtest/backtrader_algos.py:234
Method
__init__
(self, weights_dict: dict)
backtest/backtrader_algos.py:250
Method
__init__
(self, force_rebalance=False)
backtest/backtrader_algos.py:261
Method
__init__
初始化因子表达式引擎 Args: safe_mode: 安全模式,限制可用的函数和操作
panda_factor/generate/factor_engine.py:32
Method
__init__
(self, rows, cols)
alphalens/tears.py:31
Method
_rules
(rules, at_least)
backtest/backtrader_engine.py:108
Function
add_custom_calendar_timedelta
Add timedelta to 'input' taking into consideration custom frequency, which is used to deal with custom calendars, such as a trading calendar
alphalens/utils.py:988
Method
apply_valuewhen
(group)
panda_factor/generate/factor_utils.py:587
Function
average_cumulative_return
(q_fact, demean_by)
alphalens/performance.py:832
Function
average_cumulative_return_by_quantile
Plots average cumulative returns by factor quantiles in the period range defined by -periods_before to periods_after Parameters ----
alphalens/performance.py:758
Function
backshift_returns_series
Shift a multi-indexed series backwards by N observations in the first level. This can be used to convert backward-looking returns into a
alphalens/utils.py:364
Method
calculate_future_returns
(group)
panda_factor/generate/factor_utils.py:78
Method
calculate_returns
(group)
panda_factor/generate/factor_utils.py:57
← previous
next →
101–200 of 269, ranked by callers