mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 19:03:42 +08:00
DOC: Minor docstring tweaks.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# Testing
|
||||
coverage==4.0.3
|
||||
nose==1.3.7
|
||||
nose-parameterized==0.5.0
|
||||
nose-ignore-docstring==0.2
|
||||
|
||||
@@ -100,8 +100,8 @@ class BoundColumn(Term):
|
||||
The dtype of data produced when this column is loaded.
|
||||
latest : zipline.pipeline.data.Factor or zipline.pipeline.data.Filter
|
||||
A Filter/Factor computing the most recently known value of this column
|
||||
on each date. Produces a Filter if self.dtype == np.bool_, otherwise
|
||||
produces a Factor.
|
||||
on each date. Produces a Filter if self.dtype == ``np.bool_``,
|
||||
otherwise produces a Factor.
|
||||
dataset : zipline.pipeline.data.DataSet
|
||||
The dataset to which this column is bound.
|
||||
name : str
|
||||
|
||||
@@ -89,9 +89,18 @@ class BusinessDaysUntilNextEarnings(BusinessDaysUntilNextEvents):
|
||||
Factor returning the number of **business days** (not trading days!) until
|
||||
the next known earnings date for each asset.
|
||||
|
||||
Assets that announced or will announce earnings on the day of ``compute``
|
||||
will produce a value of 0.0. Assets that will announce the event on the
|
||||
next upcoming business day will produce a value of 1.0.
|
||||
|
||||
Assets for which the date of the next earnings announcement is ``NaT`` will
|
||||
produce a value of ``NaN``. This most commonly occurs because many
|
||||
companies do not publish the exact date of their upcoming earnings
|
||||
announcements until a few weeks before the announcement.
|
||||
|
||||
See Also
|
||||
--------
|
||||
zipline.pipeline.factors.BusinessDaysSincePreviousEarnings
|
||||
BusinessDaysSincePreviousEarnings
|
||||
"""
|
||||
inputs = [EarningsCalendar.next_announcement]
|
||||
|
||||
@@ -101,9 +110,21 @@ class BusinessDaysSincePreviousEarnings(BusinessDaysSincePreviousEvents):
|
||||
Factor returning the number of **business days** (not trading days!) since
|
||||
the most recent earnings date for each asset.
|
||||
|
||||
Assets that announced or will announce earnings on the day of ``compute``
|
||||
will produce a value of 0.0. Assets that will announce the event on the
|
||||
next upcoming business day will produce a value of 1.0.
|
||||
|
||||
Assets which announced or will announce the earnings today will produce a
|
||||
value of 0.0. Assets that announced the on the previous business day will
|
||||
produce a value of 1.0.
|
||||
|
||||
Assets for which the previous earnings date is `NaT` will produce a value
|
||||
of `NaN`. This will happen in the interval between IPO and first earnings
|
||||
for most companies.
|
||||
|
||||
See Also
|
||||
--------
|
||||
zipline.pipeline.factors.BusinessDaysUntilNextEarnings
|
||||
BusinessDaysUntilNextEarnings
|
||||
"""
|
||||
inputs = [EarningsCalendar.previous_announcement]
|
||||
|
||||
@@ -117,7 +138,7 @@ class BusinessDaysSincePreviousCashBuybackAuth(
|
||||
|
||||
See Also
|
||||
--------
|
||||
zipline.pipeline.factors.BusinessDaysSincePreviousCashBuybackAuth
|
||||
BusinessDaysSincePreviousCashBuybackAuth
|
||||
"""
|
||||
inputs = [CashBuybackAuthorizations.previous_announcement_date]
|
||||
|
||||
@@ -132,6 +153,6 @@ class BusinessDaysSincePreviousShareBuybackAuth(
|
||||
|
||||
See Also
|
||||
--------
|
||||
zipline.pipeline.factors.BusinessDaysSincePreviousShareBuybackAuth
|
||||
BusinessDaysSincePreviousShareBuybackAuth
|
||||
"""
|
||||
inputs = [ShareBuybackAuthorizations.previous_announcement_date]
|
||||
|
||||
@@ -455,10 +455,10 @@ class Factor(CompositeTerm):
|
||||
Return True for assets falling below this percentile in the data.
|
||||
mask : zipline.pipeline.Filter, optional
|
||||
A Filter representing assets to consider when percentile
|
||||
thresholds. If mask is supplied, percentile cutoffs are computed
|
||||
each day using only assets for which `mask` returns True, and
|
||||
assets not passing `mask` will produce False in the output of this
|
||||
filter as well.
|
||||
calculating thresholds. If mask is supplied, percentile cutoffs
|
||||
are computed each day using only assets for which ``mask`` returns
|
||||
True. Assets for which ``mask`` produces False will produce False
|
||||
in the output of this Factor as well.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
@@ -8,6 +8,9 @@ from ..mixins import SingleInputMixin
|
||||
class Latest(SingleInputMixin, CustomFactor):
|
||||
"""
|
||||
Factor producing the most recently-known value of `inputs[0]` on each day.
|
||||
|
||||
The `.latest` attribute of DataSet columns returns an instance of this
|
||||
Factor.
|
||||
"""
|
||||
window_length = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user