You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 KiB

1namecategorydescription
2addArithmeticAdd all inputs (at least 2 inputs required). If filter = true, filter all input NaN to 0 before adding
3expArithmeticNatural exponential function: e^x
4multiplyArithmeticMultiply all inputs. At least 2 inputs are required. Filter sets the NaN values to 1
5signArithmeticif input = NaN; return NaN
6subtractArithmeticx-y. If filter = true, filter all input NaN to 0 before subtracting
7pasteurizeArithmeticSet to NaN if x is INF or if the underlying instrument is not in the Alpha universe. This operator may help reduce outliers.
8logArithmeticNatural logarithm. For example: Log(high/low) uses natural logarithm of high/low ratio as stock weights.
9purifyArithmeticClear infinities (+inf, -inf) by replacing with NaN
10arc_tanArithmeticThis operator does inverse tangent of input
11maxArithmeticMaximum value of all inputs. At least 2 inputs are required
12arc_sinArithmeticIf -1 <= x <= 1: arcsin(x); else NaN
13to_nanArithmeticConvert value to NaN or NaN to value if reverse=true
14absArithmeticAbsolute value of x
15round_downArithmeticRound input to greatest multiple of f less than input;
16sigmoidArithmeticReturns 1 / (1 + exp(-x))
17divideArithmeticx / y
18minArithmeticMinimum value of all inputs. At least 2 inputs are required
19nan_maskArithmeticreplace input with NAN if input's corresponding mask value or the second input here, is negative
20arc_cosArithmeticIf -1 <= x <= 1: arccos(x); else NaN
21tanhArithmeticHyperbolic tangent of x
22nan_outArithmeticIf x < lower or x > upper return NaN, else return x. At least one of "lower", "upper" is required
23signed_powerArithmeticx raised to the power of y such that final result preserves sign of x
24inverseArithmetic1 / x
25roundArithmeticRound input to closest integer.
26sqrtArithmeticSquare root of x
27s_log_1pArithmeticConfine function to a shorter range using logarithm such that higher input remains higher and negative input remains negative as an output of resulting function and -1 or 1 is an asymptotic value
28reverseArithmetic- x
29replaceArithmeticReplace target values in input with destination values
30log_diffArithmeticReturns log(current value of input or x[t] ) - log(previous value of input or x[t-1])
31powerArithmeticx ^ y
32densifyArithmeticConverts a grouping field of many buckets into lesser number of only available buckets so as to make working with grouping fields computationally efficient
33fractionArithmeticThis operator removes the whole number part and returns the remaining fraction part with sign
34floorArithmeticNearest smaller integer
35ceilingArithmeticNearest larger integer
36orLogicalLogical OR operator returns true if either or both inputs are true and returns false otherwise
37andLogicalLogical AND operator, returns true if both operands are true and returns false otherwise
38notLogicalReturns the logical negation of x. If x is true (1), it returns false (0), and if input is false (0), it returns true (1).
39is_not_finiteLogicalIf (input NAN or input == INF) return 1 else return 0
40negateLogicalThe result is true if the converted operand is false; the result is false if the converted operand is true
41is_nanLogicalIf (input == NaN) return 1 else return 0
42is_not_nanLogicalIf (input != NaN) return 1 else return 0
43lessLogicalIf input1 < input2 return true, else return false
44equalLogicalReturns true if both inputs are same and returns false otherwise
45greaterLogicalLogic comparison operators to compares two inputs
46is_finiteLogicalIf (input NaN or input == INF) return 0, else return 1
47if_elseLogicalIf input1 is true then return input2 else return input3.
48not_equalLogicalReturns true if both inputs are NOT the same and returns false otherwise
49less_equalLogicalReturns true if input1 <= input2, return false otherwise
50greater_equalLogicalReturns true if input1 >= input2, return false otherwise
51ts_corrTime SeriesReturns correlation of x and y for the past d days
52ts_zscoreTime SeriesZ-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean: (x - tsmean(x,d)) / tsstddev(x,d). This operator may help reduce outliers and drawdown.
53ts_returnsTime SeriesReturns the relative change in the x value
54ts_productTime SeriesReturns product of x for the past d days
55ts_std_devTime SeriesReturns standard deviation of x for the past d days
56ts_triple_corrTime SeriesReturns triple correlation of x, y, z for the past d days
57ts_backfillTime SeriesBackfill is the process of replacing the NAN or 0 values by a meaningful value (i.e., a first non-NaN value)
58days_from_last_changeTime SeriesAmount of days since last change of x
59last_diff_valueTime SeriesReturns last x value not equal to current x value from last d days
60ts_scaleTime SeriesReturns (x - ts_min(x, d)) / (ts_max(x, d) - ts_min(x, d)) + constant. This operator is similar to scale down operator but acts in time series space
61ts_entropyTime SeriesFor each instrument, we collect values of input in the past d days and calculate the probability distribution then the information entropy via a histogram as a result
62ts_vector_neutTime SeriesReturns x- ts_vector_proj(x,y,d)
63ts_percentageTime SeriesReturns percentile value of x for the past d days
64ts_stepTime SeriesReturns days' counter
65ts_sumTime SeriesSum values of x for the past d days.
66ts_co_kurtosisTime SeriesReturns cokurtosis of y and x for the past d days
67ts_partial_corrTime SeriesReturns partial correlation of x, y, z for the past d days
68inst_tvrTime SeriesTotal trading value / Total holding value in the past d days
69ts_decay_exp_windowTime SeriesReturns exponential decay of x with smoothing factor for the past d days
70ts_av_diffTime SeriesReturns x - tsmean(x, d), but deals with NaNs carefully. That is NaNs are ignored during mean computation
71ts_rank_gmean_amean_diffTime SeriesReturns Geometric Mean of ts_rank(input,d) of all input - Arithmetic Mean of ts_rank(input,d) of all input. This is similar to rank_gmean_amean_diff operator but in time-series space
72ts_kurtosisTime SeriesReturns kurtosis of x for the last d days
73ts_meanTime SeriesReturns average value of x for the past d days.
74ts_min_max_diffTime SeriesReturns x - f * (ts_min(x, d) + ts_max(x, d)). If not specified, by default f = 0.5
75ts_arg_maxTime SeriesReturns the relative index of the max value in the time series for the past d days. If the current day has the max value for the past d days, it returns 0. If previous day has the max value for the past d days, it returns 1
76ts_maxTime SeriesReturns max value of x for the past d days
77ts_min_max_cpsTime SeriesReturns (ts_min(x, d) + ts_max(x, d)) - f * x. If not specified, by default f = 2
78ts_rankTime SeriesRank the values of x for each instrument over the past d days, then return the rank of the current value + constant. If not specified, by default, constant = 0.
79ts_irTime SeriesReturn information ratio ts_mean(x, d) / ts_std_dev(x, d)
80ts_delayTime SeriesReturns x value d days ago
81ts_theilsenTime SeriesTheil Sen slope estimator of inputs for the past n days.
82hump_decayTime SeriesThis operator helps to ignore the values that changed too little corresponding to previous ones
83ts_weighted_decayTime SeriesInstead of replacing today's value with yesterday's as in ts_decay(x, 1), it assigns weighted average of today's and yesterday's values with weight on today's value being k and yesterday's being (1-k)
84ts_quantileTime SeriesIt calculates ts_rank and apply to its value an inverse cumulative density function from driver distribution. Possible values of driver (optional ) are "gaussian", "uniform", "cauchy" distribution where "gaussian" is the default.
85ts_minTime SeriesReturns min value of x for the past d days
86ts_count_nansTime SeriesReturns the number of NaN values in x for the past d days
87ts_covarianceTime SeriesReturns covariance of y and x for the past d days
88ts_co_skewnessTime SeriesReturns coskewness of y and x for the past d days
89ts_min_diffTime SeriesReturns x - ts_min(x, d)
90ts_decay_linearTime SeriesReturns the linear decay on x for the past d days. Dense parameter=false means operator works in sparse mode and we treat NaN as 0. In dense mode we do not.
91jump_decayTime SeriesIf there is a huge jump in current data compare to previous one
92ts_momentTime SeriesReturns K-th central moment of x for the past d days
93ts_arg_minTime SeriesReturns the relative index of the min value in the time series for the past d days; If the current day has the min value for the past d days, it returns 0; If previous day has the min value for the past d days, it returns 1.
94ts_regressionTime SeriesReturns various parameters related to regression function
95ts_skewnessTime SeriesReturn skewness of x for the past d days
96ts_max_diffTime SeriesReturns x - ts_max(x, d)
97kth_elementTime SeriesReturns K-th value of input by looking through lookback days. This operator can be used to backfill missing data if k=1
98humpTime SeriesLimits amount and magnitude of changes in input (thus reducing turnover)
99ts_medianTime SeriesReturns median value of x for the past d days
100ts_deltaTime SeriesReturns x - ts_delay(x, d)
101ts_poly_regressionTime SeriesReturns y - Ey, where Ey = x + x^2 + ... + x^k over d days; k must be specified as a keyword argument
102ts_vector_projTime SeriesReturns vector projection of x onto y in time-series space.
103ts_target_tvr_decayTime SeriesTune "ts_decay" to have a turnover equal to a certain target, with optimization weight range between lambda_min, lambda_max
104ts_target_tvr_delta_limitTime SeriesTune "ts_delta_limit" to have a turnover equal to a certain target with optimization weight range between lambda_min, lambda_max. Also, please be aware of the scaling for x and y. Besides setting y as adv20 or volume related data, you can also set y as a constant.
105ts_target_tvr_humpTime SeriesTune "hump" to have a turnover equal to a certain target with optimization weight range between lambda_min, lambda_max.
106ts_delta_limitTime SeriesLimit the change in the Alpha position x between dates to a specified fraction of y. The "limit_volume" can be in the range of 0 to 1. Also, please be aware of the scaling for x and y. Besides setting y as adv20 or volume related data, you can also set y as a constant.
107winsorizeCross SectionalWinsorizes x to make sure that all values in x are between the lower and upper limits, which are specified as multiple of std.
108rankCross SectionalRanks the input among all the instruments and returns an equally distributed number between 0.0 and 1.0. For precise sort, use the rate as 0
109regression_projCross SectionalConducts the cross-sectional regression on the stocks with Y as target and X as the independent variable
110vector_neutCross SectionalFor given vectors x and y, it finds a new vector x* (output) such that x* is orthogonal to y
111regression_neutCross SectionalConducts the cross-sectional regression on the stocks with Y as target and X as the independent variable
112zscoreCross SectionalZ-score is a numerical measurement that describes a value's relationship to the mean of a group of values. Z-score is measured in terms of standard deviations from the mean
113scale_downCross SectionalScales all values in each day proportionately between 0 and 1 such that minimum value maps to 0 and maximum value maps to 1. Constant is the offset by which final result is subtracted
114truncateCross SectionalOperator truncates all values of x to maxPercent. Here, maxPercent is in decimal notation
115scaleCross SectionalScales input to booksize. We can also scale the long positions and short positions to separate scales by mentioning additional parameters to the operator
116rank_by_sideCross SectionalRanks positive and negative input separately and scale to book. For precise sorting use rate=0
117normalizeCross SectionalCalculates the mean value of all valid alpha values for a certain date, then subtracts that mean from each element
118generalized_rankCross SectionalThe idea is that difference between instrument values raised to the power of m is added to the rank of instrument with bigger value and subtracted from the rank of instrument with lesser value. More details in the notes at the end of page
119one_sideCross SectionalShifts all instruments up or down so that the Alpha becomes long-only or short-only (if side = short), respectively.
120rank_gmean_amean_diffCross SectionalOperator returns difference of geometric mean and arithmetic mean of cross sectional rank of inputs
121quantileCross SectionalRank the raw vector, shift the ranked Alpha vector, apply distribution (gaussian, cauchy, uniform). If driver is uniform, it simply subtract each Alpha value with the mean of all Alpha values in the Alpha vector
122vector_projCross SectionalReturns vector projection of x onto y.
123multi_regressionCross SectionalPerform multivariable regression of multiple independent variables (x1,x2,...) on a dependent variable (y) across number of days. If days = n (n >= 0), will include past n days in the regression. Setting days = 0 indicates that we're only using today (x1, x2, ...) to predict y. If lag = m (m >= 0), will lag (x1, x2, ...) for m days for prediction. Options for solver: "SVD"(default), "QR", "NORMAL"