Commit Graph

20 Commits

Author SHA1 Message Date
Scott Sanderson 0ebb72fe0d TEST: Explicitly use int64 everywhere.
Otherwise these tests will fail on 32-bit systems.
2016-03-28 12:21:58 -04:00
Scott Sanderson 076868f5a1 MAINT: Refactor shared code into test method. 2016-03-28 11:56:15 -04:00
Scott Sanderson fe22bde998 TEST: Test uneven buckets in quantiles. 2016-03-28 11:34:58 -04:00
Scott Sanderson c6e58af51b TEST: Test quantiles with better input.
Take the log of arange so that we know we don't depend on linearity of
the input.
2016-03-28 09:24:56 -04:00
Scott Sanderson 18bd7010b5 ENH: Improve short_reprs of classifier/normalizer.
GroupedRowTransform now shows the name of its transform, and Quantiles
shows the number of quantiles.

These are used by Pipeline.show_graph().
2016-03-25 15:11:18 -04:00
Scott Sanderson 5ed1a4fcd1 ENH: Add quartiles/quintiles/deciles.
They're all syntactic sugar for the equivalent invocations of quantiles.
2016-03-25 15:11:18 -04:00
Scott Sanderson 872b84e09a ENH: Implement Factor.quantiles. 2016-03-25 15:11:18 -04:00
Scott Sanderson b85eb36da8 TEST: Add test for demean example. 2016-03-25 15:11:18 -04:00
Scott Sanderson bae78ae522 MAINT: Use clearer parameter name. 2016-03-19 17:04:28 -04:00
Scott Sanderson 53d3b0855b ENH: Add support for Classifiers.
Classifiers are computations that represent grouping keys. They can be
used in conjuction with normalization functions like ``zscore`` or
``demean`` to perform normalizations over subsets of a dataset.

Notable changes:

- Added ``demean()`` and ``zscore()`` methods to ``Factor``.

- Added a classifier versions of ``Latest`` and ``CustomTermMixin``.
  The .latest attribute of int64 dataset columns no produces a
  classifier by default.

- Added ``Everything``, a classifier that maps all data to the same
  value.

- Added ``zipline.lib.normalize``, which implements a naive, pure-Python
  grouped normalize function.  This will likely be moved to Cython in a
  subsequent PR.
2016-03-19 17:04:28 -04:00
Joe Jevnik 721dd36116 TST: move test_utils and adds test fixture classes
Renames zipline.utils.test_utils to zipline.testing

Adds zipline.testing.fixtures.ZiplineTestCase to manage setup and
teardown and adds mixins to define fixtures like an asset finder or
trading calendar.
2016-03-10 15:39:52 -05:00
Scott Sanderson f635a14289 ENH: Add isnull and notnull methods to Factor. 2016-03-07 16:19:08 -05:00
Joe Jevnik 8be903b074 STY: remove unused import 2016-02-11 18:46:42 -05:00
Scott Sanderson 5f49fa22cb MAINT: Upgrade numpy and fix warnings.
Mostly fixes ambiguous calls to numpy.full, and uses explicitly-united
NaT values.
2016-02-11 18:46:39 -05:00
Scott Sanderson 2235a53581 ENH: Add EWMA and DollarVolume factors. 2015-12-11 22:13:27 -05:00
Scott Sanderson 8220d1ee86 ENH: Adds support for different typed adjusted arrays and adds an
EarningsCalendar loader.

- Moves most of AdjustedArray back into Python. The window iterator is
  the only part that's performance-intensive.

- Adds a bootleg templating system for creating specialized versions of
  AdjustedArrayWindow for each concrete type we care about.

- Adds support for differently dtyped terms in pipeline. This allows us
  to use datetime64s which are needed in the EarningsCalendar.

- Adds EarningsCalendar dataset for the next and previous earnings
  announcements in pipeline.

- Adds in memory loader for EarningsCalendar.

- Adds blaze loader for EarningsCalendar.
2015-12-08 20:24:06 -05:00
Tim Shawver 631a1879a3 Adding a built in Returns factor to the pipeline API. 2015-12-01 13:24:41 -05:00
Scott Sanderson 1336dfc181 BUG: RSI wasn't even close to working.
Fixed and added tests.
2015-10-09 20:10:30 -04:00
Scott Sanderson 2d683961bd MAINT: More renaming.
s/FFCEngine/PipelineEngine/
s/FFCLoader/PipelineLoader/
2015-10-01 18:03:54 -04:00
Scott Sanderson f82a01841b MAINT: Rename ALL the things.
zipline.modelling.* -> zipline.pipeline.*
zipline.data.ffc.loaders -> zipline.pipeline.loaders
tests/modelling -> tests/pipeline
2015-10-01 18:03:53 -04:00