Skip to content

Commit 605dd45

Browse files
Joe Jevnikllllllllll
Joe Jevnik
authored andcommitted
DOC: document new factors and methods
1 parent 42a49ce commit 605dd45

File tree

3 files changed

+34
-7
lines changed

3 files changed

+34
-7
lines changed

docs/source/appendix.rst

+25-2
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,16 @@ Pipeline API
185185
:member-order: groupwise
186186

187187
.. autoclass:: zipline.pipeline.Filter
188-
:members: __and__, __or__, if_then
188+
:members: __and__, __or__, if_else
189189
:exclude-members: dtype
190190

191191
.. autoclass:: zipline.pipeline.Factor
192192
:members: bottom, deciles, demean, linear_regression, pearsonr,
193193
percentile_between, quantiles, quartiles, quintiles, rank,
194194
spearmanr, top, winsorize, zscore, isnan, notnan, isfinite, eq,
195195
__add__, __sub__, __mul__, __div__, __mod__, __pow__, __lt__,
196-
__le__, __ne__, __ge__, __gt__, clip, fillna
196+
__le__, __ne__, __ge__, __gt__, clip, fillna, mean, stddev, max,
197+
min, median, sum, clip
197198
:exclude-members: dtype
198199
:member-order: bysource
199200

@@ -204,6 +205,15 @@ Pipeline API
204205
.. autoclass:: zipline.pipeline.data.DataSet
205206
:members:
206207

208+
.. autoclass:: zipline.pipeline.data.Column
209+
:members:
210+
211+
.. autoclass:: zipline.pipeline.data.BoundColumn
212+
:members:
213+
214+
.. autoclass:: zipline.pipeline.data.DataSetFamily
215+
:members:
216+
207217
.. autoclass:: zipline.pipeline.data.EquityPricing
208218
:members: open, high, low, close, volume
209219
:undoc-members:
@@ -244,6 +254,12 @@ Built-in Factors
244254
.. autoclass:: zipline.pipeline.factors.Returns
245255
:members:
246256

257+
.. autoclass:: zipline.pipeline.factors.RollingPearson
258+
:members:
259+
260+
.. autoclass:: zipline.pipeline.factors.RollingSpearman
261+
:members:
262+
247263
.. autoclass:: zipline.pipeline.factors.RollingLinearRegressionOfReturns
248264
:members:
249265

@@ -268,6 +284,13 @@ Built-in Factors
268284
.. autoclass:: zipline.pipeline.factors.WeightedAverageValue
269285
:members:
270286

287+
.. autoclass:: zipline.pipeline.factors.PercentChange
288+
:members:
289+
290+
.. autoclass:: zipline.pipeline.factors.PeerCount
291+
:members:
292+
293+
271294
Built-in Filters
272295
````````````````
273296

docs/source/whatsnew/1.4.0.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ We removed the dependency on treasury curves, since they weren't actually being
3535
New Built In Factors
3636
````````````````````
3737

38-
- :class:`~zipline.pipeline.factors.basic.PercentChange`: Calculates the percent change over the given ``window_length``. Note: Percent change is calculated as ``(new - old) / abs(old)``. (:issue:`2506`)
39-
- :class:`~zipline.pipeline.factors.basic.PeerCount`: Gives the number of occurrences of each distinct
38+
- :class:`~zipline.pipeline.factors.PercentChange`: Calculates the percent change over the given ``window_length``. Note: Percent change is calculated as ``(new - old) / abs(old)``. (:issue:`2506`)
39+
- :class:`~zipline.pipeline.factors.PeerCount`: Gives the number of occurrences of each distinct
4040
category in a classifier. (:issue:`2509`)
4141
- :class:`~zipline.pipeline.mixins.ConstantMixin`: A mixin for creating a Pipeline term with a constant value. (:issue:`2697`)
4242
- :meth:`~zipline.pipeline.filters.Filter.if_else`: Allows users to create expressions that conditionally draw from the outputs of one of two terms. (:issue:`2697`)
@@ -49,7 +49,7 @@ Enhancements
4949

5050
- Added International Pipelines (:issue:`2262`)
5151
- Added DataSetFamily (née MultiDimensionalDataSet) - a shorthand for creating a collection of regular DataSets that share the same columns. (:issue:`2402`)
52-
- Added :meth:`~zipline.pipeline.data.dataset.DataSet.get_column` for looking up columns by name (:issue:`2210`)
52+
- Added :meth:`~zipline.pipeline.data.dataset.DataSetFamily.get_column` for looking up columns by name (:issue:`2210`)
5353
- Added :class:`~zipline.testing.pipeline_terms.CheckWindowsClassifier` that allows us to test lookback windows of categorical and string columns using Pipeline. (:issue:`2458`)
5454
- Added :class:`~zipline.pipeline.hooks.iface.PipelineHooks` which is now used to display Pipline progress bars (:issue:`2467`)
5555
- :class:`~zipline.pipeline.data.dataset.BoundColumn` comparisons will now result in an error.

zipline/pipeline/factors/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
BusinessDaysUntilNextEvent,
2727
)
2828
from .statistical import (
29+
RollingPearson,
30+
RollingSpearman,
2931
RollingLinearRegressionOfReturns,
3032
RollingPearsonOfReturns,
3133
RollingSpearmanOfReturns,
@@ -64,15 +66,17 @@
6466
'MACDSignal',
6567
'MaxDrawdown',
6668
'MovingAverageConvergenceDivergenceSignal',
67-
'PercentChange',
6869
'PeerCount',
70+
'PercentChange',
71+
'RSI',
6972
'RateOfChangePercentage',
7073
'RecarrayField',
7174
'Returns',
7275
'RollingLinearRegressionOfReturns',
76+
'RollingPearson',
7377
'RollingPearsonOfReturns',
78+
'RollingSpearman',
7479
'RollingSpearmanOfReturns',
75-
'RSI',
7680
'SimpleBeta',
7781
'SimpleMovingAverage',
7882
'TrueRange',

0 commit comments

Comments
 (0)