Commit Graph

21 Commits

Author SHA1 Message Date
Scott Sanderson 599d6c59ef MAINT: Fix warnings from numpy on NaT comparison. 2016-09-20 17:12:07 -04:00
Scott Sanderson becf897da9 MAINT: Fix failures/warnings in test_api_shim.py
- Fixes a warning on indexing with a float that ultimately came from
  pd.Timedelta.total_seconds().  Adds ``timedelta_to_integral_seconds``
  and ``timedelta_to_integral_minutes()`` functions and replaces various
  usages of ``int(delta.total_seconds())`` with them.

- Fixes a warnings triggered in ``_create_daily_stats`` from
  passing tz-aware datetimes to np.datetime64.
2016-09-20 17:12:07 -04:00
Scott Sanderson 930f32f6a1 ENH: Make INT_DTYPES_BY_SIZE_BYTES ordered. 2016-09-20 16:24:55 -04:00
Scott Sanderson 141a088f7f ENH: Add numpy_utils.changed_locations. 2016-08-17 16:52:09 -04:00
Scott Sanderson 1d93e1c21f ENH: Add as_column to numpy_utils. 2016-08-17 16:52:09 -04:00
Scott Sanderson 7a4e9fd61a ENH: Make None the default for string columns. 2016-05-04 19:10:19 -04:00
Scott Sanderson 5a1ed7b1d3 ENH: Make element_of work for ints too. 2016-05-04 16:31:58 -04:00
Scott Sanderson 2395cbb671 ENH: Use np.void for labelarray storage.
This disables most broken ufuncs
2016-05-04 15:54:50 -04:00
Scott Sanderson 5f190395ad ENH: Add support for strings in Pipeline.
- Adds a new class, ``LabelArray``, which is a subclass of np.ndarray.
  LabelArray is conceptually similar to pandas.Categorical, in that it
  stores data with many duplicate values as indices into an array of
  unique values.  For string data with many duplicates (e.g. time-series
  of tickers or or industry classifications), this provides multiple
  orders of magnitude of improvement when doing string operations,
  especially string comparison/matching operations.

- Adds a new generic object "specialization" for `AdjustedArrayWindow`,
  and a corresponding ObjectOverwrite adjustment.

- Adds a new ``postprocess`` method to ``zipline.pipeline.term.Term``.
  This method is called on the final result of any pipeline expression
  after screen filtering has occurred. The default implementation of
  ``postprocess`` is identity, but Classifier overrides it to coerce
  string columns into pandas.Categoricals before presenting them to the
  user.
2016-05-04 15:50:52 -04:00
Scott Sanderson 6bf4fe15e2 Merge pull request #1020 from quantopian/rolling-window-stride-tricks
Rolling window stride tricks
2016-04-05 17:23:55 -04:00
Scott Sanderson d0625e8a8d MAINT: Move ignore_nanwarnings to numpy_utils. 2016-03-25 15:11:18 -04:00
Richard Frank d67c93c4ab DOC: Signal to doctest blank lines in the expected output 2016-03-23 18:26:42 -04:00
Scott Sanderson e810f26097 ENH: Add utilities for checking types generically. 2016-03-07 16:18:33 -05:00
Scott Sanderson cd24d8ba55 ENH: Add rolling_window to numpy_utils.py. 2016-03-01 19:32:55 -05:00
Scott Sanderson 0115cdc46c MAINT: Fail fast on unsupported dtypes. 2016-02-12 21:23:47 -05:00
Scott Sanderson c105735574 DEV: Add support for specifying missing_value.
Consequently, enable support for `int`-dtyped Factors and BoundColumns.
2016-02-12 21:23:47 -05:00
Richard Frank 24a292150a MAINT: Removing confusing parameter where we only use default 2016-02-11 18:46:44 -05:00
Joe Jevnik 86558f83b3 MAINT: use constants for nat 2016-02-11 18:46:43 -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 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
Scott Sanderson a483455183 ENH: Add zipline.utils.numpy_utils.
Currently provides two functions for doing fancy things with array
strides: `repeat_first_axis` and `repeat_last_axis`.
2015-10-01 18:03:53 -04:00