|
50 | 50 | from PyFin.Analysis.CrossSectionValueHolders import CSResidueSecurityValueHolder
|
51 | 51 |
|
52 | 52 |
|
53 |
| -def CSRank(dependency, groups=None): |
54 |
| - return CSRankedSecurityValueHolder(dependency, groups) |
| 53 | +def CSRank(x, groups=None): |
| 54 | + return CSRankedSecurityValueHolder(x, groups) |
55 | 55 |
|
56 | 56 |
|
57 |
| -def CSMean(dependency, groups=None): |
58 |
| - return CSAverageSecurityValueHolder(dependency, groups) |
| 57 | +def CSMean(x, groups=None): |
| 58 | + return CSAverageSecurityValueHolder(x, groups) |
59 | 59 |
|
60 | 60 |
|
61 |
| -def CSMeanAdjusted(dependency, groups=None): |
62 |
| - return CSAverageAdjustedSecurityValueHolder(dependency, groups) |
| 61 | +def CSMeanAdjusted(x, groups=None): |
| 62 | + return CSAverageAdjustedSecurityValueHolder(x, groups) |
63 | 63 |
|
64 | 64 |
|
65 |
| -def CSQuantiles(dependency, groups=None): |
66 |
| - return CSPercentileSecurityValueHolder(dependency, groups) |
| 65 | +def CSQuantiles(x, groups=None): |
| 66 | + return CSPercentileSecurityValueHolder(x, groups) |
67 | 67 |
|
68 | 68 |
|
69 |
| -def CSZScore(dependency, groups=None): |
70 |
| - return CSZScoreSecurityValueHolder(dependency, groups) |
| 69 | +def CSZScore(x, groups=None): |
| 70 | + return CSZScoreSecurityValueHolder(x, groups) |
71 | 71 |
|
72 | 72 |
|
73 | 73 | def CSRes(left, right):
|
74 | 74 | return CSResidueSecurityValueHolder(left, right)
|
75 | 75 |
|
76 | 76 |
|
77 |
| -def SIGN(dependency='x'): |
78 |
| - return SecuritySignValueHolder(dependency) |
| 77 | +def SIGN(x='x'): |
| 78 | + return SecuritySignValueHolder(x) |
79 | 79 |
|
80 | 80 |
|
81 |
| -def EMA(window, dependency='x'): |
82 |
| - return SecurityXAverageValueHolder(window, dependency) |
| 81 | +def EMA(window, x='x'): |
| 82 | + return SecurityXAverageValueHolder(window, x) |
83 | 83 |
|
84 | 84 |
|
85 |
| -def MACD(short, long, dependency='x'): |
86 |
| - return SecurityMACDValueHolder(short, long, dependency) |
| 85 | +def MACD(short, long, x='x'): |
| 86 | + return SecurityMACDValueHolder(short, long, x) |
87 | 87 |
|
88 | 88 |
|
89 |
| -def RSI(window, dependency='x'): |
90 |
| - return SecurityMovingRSI(window, dependency) |
| 89 | +def RSI(window, x='x'): |
| 90 | + return SecurityMovingRSI(window, x) |
91 | 91 |
|
92 | 92 |
|
93 |
| -def MA(window, dependency='x'): |
94 |
| - return SecurityMovingAverage(window, dependency) |
| 93 | +def MA(window, x='x'): |
| 94 | + return SecurityMovingAverage(window, x) |
95 | 95 |
|
96 | 96 |
|
97 |
| -def MMAX(window, dependency='x'): |
98 |
| - return SecurityMovingMax(window, dependency) |
| 97 | +def MMAX(window, x='x'): |
| 98 | + return SecurityMovingMax(window, x) |
99 | 99 |
|
100 | 100 |
|
101 |
| -def MMIN(window, dependency='x'): |
102 |
| - return SecurityMovingMin(window, dependency) |
| 101 | +def MMIN(window, x='x'): |
| 102 | + return SecurityMovingMin(window, x) |
103 | 103 |
|
104 | 104 |
|
105 |
| -def MRANK(window, dependency='x'): |
106 |
| - return SecurityMovingRank(window, dependency) |
| 105 | +def MRANK(window, x='x'): |
| 106 | + return SecurityMovingRank(window, x) |
107 | 107 |
|
108 | 108 |
|
109 |
| -def MAXIMUM(dependency=('x', 'y')): |
110 |
| - return SecurityMaximumValueHolder(dependency) |
| 109 | +def MAXIMUM(x='x', y='y'): |
| 110 | + return SecurityMaximumValueHolder(x, y) |
111 | 111 |
|
112 | 112 |
|
113 |
| -def MINIMUM(dependency=('x', 'y')): |
114 |
| - return SecurityMinimumValueHolder(dependency) |
| 113 | +def MINIMUM(x='x', y='y'): |
| 114 | + return SecurityMinimumValueHolder(x, y) |
115 | 115 |
|
116 | 116 |
|
117 |
| -def MQUANTILE(window, dependency='x'): |
118 |
| - return SecurityMovingQuantile(window, dependency) |
| 117 | +def MQUANTILE(window, x='x'): |
| 118 | + return SecurityMovingQuantile(window, x) |
119 | 119 |
|
120 | 120 |
|
121 |
| -def MALLTRUE(window, dependency='x'): |
122 |
| - return SecurityMovingAllTrue(window, dependency) |
| 121 | +def MALLTRUE(window, x='x'): |
| 122 | + return SecurityMovingAllTrue(window, x) |
123 | 123 |
|
124 | 124 |
|
125 |
| -def MANYTRUE(window, dependency='x'): |
126 |
| - return SecurityMovingAnyTrue(window, dependency) |
| 125 | +def MANYTRUE(window, x='x'): |
| 126 | + return SecurityMovingAnyTrue(window, x) |
127 | 127 |
|
128 | 128 |
|
129 |
| -def MSUM(window, dependency='x'): |
130 |
| - return SecurityMovingSum(window, dependency) |
| 129 | +def MSUM(window, x='x'): |
| 130 | + return SecurityMovingSum(window, x) |
131 | 131 |
|
132 | 132 |
|
133 |
| -def MVARIANCE(window, dependency='x'): |
134 |
| - return SecurityMovingVariance(window, dependency) |
| 133 | +def MVARIANCE(window, x='x'): |
| 134 | + return SecurityMovingVariance(window, x) |
135 | 135 |
|
136 | 136 |
|
137 |
| -def MSTD(window, dependency='x'): |
138 |
| - return SecurityMovingStandardDeviation(window, dependency) |
| 137 | +def MSTD(window, x='x'): |
| 138 | + return SecurityMovingStandardDeviation(window, x) |
139 | 139 |
|
140 | 140 |
|
141 |
| -def MNPOSITIVE(window, dependency='x'): |
142 |
| - return SecurityMovingCountedPositive(window, dependency) |
| 141 | +def MNPOSITIVE(window, x='x'): |
| 142 | + return SecurityMovingCountedPositive(window, x) |
143 | 143 |
|
144 | 144 |
|
145 |
| -def MAPOSITIVE(window, dependency='x'): |
146 |
| - return SecurityMovingPositiveAverage(window, dependency) |
| 145 | +def MAPOSITIVE(window, x='x'): |
| 146 | + return SecurityMovingPositiveAverage(window, x) |
147 | 147 |
|
148 | 148 |
|
149 |
| -def LAST(dependency='x'): |
150 |
| - return SecurityLatestValueHolder(dependency) |
| 149 | +def LAST(x='x'): |
| 150 | + return SecurityLatestValueHolder(x) |
151 | 151 |
|
152 | 152 |
|
153 |
| -def SQRT(dependency='x'): |
154 |
| - return SecuritySqrtValueHolder(dependency) |
| 153 | +def SQRT(x='x'): |
| 154 | + return SecuritySqrtValueHolder(x) |
155 | 155 |
|
156 | 156 |
|
157 |
| -def DIFF(dependency='x'): |
158 |
| - return SecurityDiffValueHolder(dependency) |
| 157 | +def DIFF(x='x'): |
| 158 | + return SecurityDiffValueHolder(x) |
159 | 159 |
|
160 | 160 |
|
161 |
| -def RETURNSimple(dependency='x'): |
162 |
| - return SecuritySimpleReturnValueHolder(dependency) |
| 161 | +def RETURNSimple(x='x'): |
| 162 | + return SecuritySimpleReturnValueHolder(x) |
163 | 163 |
|
164 | 164 |
|
165 |
| -def RETURNLog(dependency='x'): |
166 |
| - return SecurityLogReturnValueHolder(dependency) |
| 165 | +def RETURNLog(x='x'): |
| 166 | + return SecurityLogReturnValueHolder(x) |
167 | 167 |
|
168 | 168 |
|
169 |
| -def EXP(dependency): |
170 |
| - return SecurityExpValueHolder(dependency) |
| 169 | +def EXP(x): |
| 170 | + return SecurityExpValueHolder(x) |
171 | 171 |
|
172 | 172 |
|
173 |
| -def LOG(dependency): |
174 |
| - return SecurityLogValueHolder(dependency) |
| 173 | +def LOG(x): |
| 174 | + return SecurityLogValueHolder(x) |
175 | 175 |
|
176 | 176 |
|
177 |
| -def POW(dependency, n): |
178 |
| - return SecurityPowValueHolder(dependency, n) |
| 177 | +def POW(x, n): |
| 178 | + return SecurityPowValueHolder(x, n) |
179 | 179 |
|
180 | 180 |
|
181 |
| -def ABS(dependency): |
182 |
| - return SecurityAbsValueHolder(dependency) |
| 181 | +def ABS(x): |
| 182 | + return SecurityAbsValueHolder(x) |
183 | 183 |
|
184 | 184 |
|
185 |
| -def ACOS(dependency): |
186 |
| - return SecurityAcosValueHolder(dependency) |
| 185 | +def ACOS(x): |
| 186 | + return SecurityAcosValueHolder(x) |
187 | 187 |
|
188 | 188 |
|
189 |
| -def ACOSH(dependency): |
190 |
| - return SecurityAcoshValueHolder(dependency) |
| 189 | +def ACOSH(x): |
| 190 | + return SecurityAcoshValueHolder(x) |
191 | 191 |
|
192 | 192 |
|
193 |
| -def ASIN(dependency): |
194 |
| - return SecurityAsinValueHolder(dependency) |
| 193 | +def ASIN(x): |
| 194 | + return SecurityAsinValueHolder(x) |
195 | 195 |
|
196 | 196 |
|
197 |
| -def ASINH(dependency): |
198 |
| - return SecurityAsinhValueHolder(dependency) |
| 197 | +def ASINH(x): |
| 198 | + return SecurityAsinhValueHolder(x) |
199 | 199 |
|
200 | 200 |
|
201 |
| -def SHIFT(dependency, n): |
202 |
| - return SecurityShiftedValueHolder(dependency, n) |
| 201 | +def SHIFT(x, n): |
| 202 | + return SecurityShiftedValueHolder(x, n) |
203 | 203 |
|
204 | 204 |
|
205 | 205 | def IIF(flag, left, right):
|
|
0 commit comments