Commit Graph

2692 Commits

Author SHA1 Message Date
Scott Sanderson 39321c2868 Merge pull request #685 from quantopian/data-in-before-trading-start
ENH: Make data available in before_trading_start.
2015-08-25 10:49:59 -04:00
Scott Sanderson f7039d6f52 ENH: Make data available in before_trading_start. 2015-08-21 12:37:17 -04:00
Thomas Wiecki 8dc0276d99 Merge pull request #682 from quantopian/fix_ipython_call
BUG Regression caused by adding print_algo to args parser.
2015-08-20 11:16:31 +02:00
Thomas Wiecki 0c44ebe2ad BUG Regression caused by adding print_algo to args parser. Remove default print_algo kwarg when called from IPython interface. 2015-08-20 10:58:16 +02:00
Joe Jevnik cfce3a7c77 Merge pull request #681 from quantopian/sanest-setup
Sanest setup
2015-08-19 15:19:02 -04:00
Scott Sanderson d444f593cd BLD: Take advantage of pip download caching. 2015-08-19 10:39:20 -04:00
Scott Sanderson d7635fb75c BLD: Install coverage during builds. 2015-08-19 10:39:20 -04:00
Scott Sanderson de4446425f BLD: Build on travis' container infrastructure.
It's supposedly faster.
2015-08-19 10:39:20 -04:00
Jonathan Kamens ee47ec1d3d BLD: Package all zipline.* modules when building eggs.
Rather than specifying only the package "zipline" in setup.py, use
`find_packages` to find all the subpackages as well, so they (or, most
specifically, their `__init__.py` files) are properly packaged in the
egg file.
2015-08-19 10:38:11 -04:00
Jonathan Kamens f2d5f42a6b BLD: Lazy-load Cython and numpy when installing package.
Modify setup.py to defer the use of Cython and numpy until
`setup_requires` has already been processed, so that Cython and numpy
are available when they are needed.
2015-08-19 10:37:25 -04:00
Richard Frank 30847a10a7 BUG: Interface of load_adjusted_array is to return a list of arrays
but MultiColumnLoader was returning a list of lists of arrays in some
cases.
2015-08-19 10:12:19 -04:00
Scott Sanderson a801547122 BLD: Read requirements from setup.py
- Parse our requirements.txt to keep install_requires up to date.
- Create extras builds for talib and dev.
- Use pip install -e .[dev] on Travis to install Zipline before testing.
2015-08-19 03:31:29 -04:00
Scott Sanderson 8528556970 Merge pull request #677 from quantopian/clarify-assets-test
TEST: Clarify test in asset finder.
2015-08-16 14:31:47 -04:00
Scott Sanderson 4b7cef8703 TEST: Clarify test in asset finder.
Fix comment copypasta and add a check for the third sid that should be
found.
2015-08-13 11:46:19 -04:00
Jean Bredeche fcda943e7d Merge pull request #671 from quantopian/no-more-threadbound
BUG: Let logbook figure out how to bind the context manager.
2015-08-06 14:58:06 -04:00
Jean Bredeche ff87fd32e3 BUG: Let logbook figure out how to bind the context manager. 2015-08-06 13:52:58 -04:00
Scott Sanderson 6897536317 DEV: Raise useful error if we get dupe assets. 2015-08-06 11:11:54 -04:00
Scott Sanderson e0bd25cb18 MAINT: Remove temporary nullctx alias. 2015-08-05 18:36:37 -04:00
Andrew Daniels 48c609debc BUG: Improves lookup_future_chain to handle NaT date args
If lookup_future_chain was provided with an as_of_date or knowledge date that was pandas.NaT, the query we were forming wasn't what we want. Instead, as_of_date, if not NaT, is used for knowledge_date, and if both are NaT, no date filtering is done in the query.
2015-08-05 10:50:14 -04:00
Andrea D'Amore 65448cc8d1 ENH Add command line option for printing algo on stdout, default is false. 2015-08-05 10:29:56 +02:00
Joe Jevnik 85d53dcce8 Merge pull request #588 from jlowin/patch-2
Fix code block formatting in release notes
2015-08-05 03:12:18 -04:00
Scott Sanderson 3f45494771 MAINT: Encapsulate engine initialization.
Required for internal override.
2015-08-04 19:26:56 -04:00
Scott Sanderson 223c8d02f9 MAINT: Don't alias bounds in engine loop. 2015-08-04 19:24:55 -04:00
Scott Sanderson 7f374f2ba3 MAINT: Bump bcolz version to latest. 2015-08-04 18:16:09 -04:00
Scott Sanderson b89fc0c028 BUG: Fix error from RequiredWindowLengthMixin.
WindowLengthNotSpecified expects an argument.
2015-08-04 01:41:03 -04:00
Scott Sanderson e91b1c56b2 MAINT: Remove unused import. 2015-08-04 01:40:16 -04:00
Scott Sanderson 0cc84e7a15 BUG: Use normed last_close instead of period_end.
`period_end` can be outside the range of data for which we have dates.
`last_close` properly gets pulled back to the last date for which we
actually have data.

We should consider whether or not we need to be storing period_end at
all.
2015-08-03 12:09:26 -04:00
Scott Sanderson 69d5aed7f6 BUG: Pop ffc_loader kwarg in TradingAlgorithm.
Prevents us from forwarding it as an initialize_kwarg.
2015-08-03 12:09:00 -04:00
Scott Sanderson 45d829cda0 BUG: Use a "real" index in NoOpFFCEngine.
This makes us return an empty DataFrame in data.factors instead of
barfing.
2015-08-03 12:08:08 -04:00
Scott Sanderson 7bb20eb297 MAINT: Check dates before computing factor_matrix.
In SimpleFFCEngine.factor_matrix barf with a useful error if end_date <=
start_date.
2015-08-03 12:06:24 -04:00
Scott Sanderson 5da03d2df5 BUG: Make NumExprFilter return ndarray.
- Previously it was returning a DataFrame because of how we applied an &
  with a DataFrame mask.  The error was masked by the fact that
  `np.assert_array_equal` coerces inputs to arrays before comparing.

- Added `zp.utils.test_utils.check_arrays`, which checks type equality
  before calling `np.assert_array_equal`.
2015-08-03 11:59:11 -04:00
jfkirk 67c56f768b ENH: Adds auto-closing feature and implements for Futures 2015-07-31 10:38:44 -04:00
Scott Sanderson f13e9fd125 TEST: Add test asserting dynamic api_methods. 2015-07-29 12:30:46 -04:00
Scott Sanderson 01c03d2267 MAINT: Add nullctx back to test_utils.
Temporary upstream compat for Quantopian code.

To be removed at the earliest possible convenience.
2015-07-29 12:30:46 -04:00
Scott Sanderson de3111d51a BUG: dict.itervalues() doesn't exist in PY3 2015-07-29 12:30:46 -04:00
Scott Sanderson ef4f642e62 ENH: Compute engine architecture for FFC API.
This patch lays the groundwork for a compute engine designed to
facilitate construction of factor-based universe screening and portfolio
allocation.  It contains:

A new module, `zipline.modelling`, containing entities that can be used
to express computations as dependency graphs.  Each node in such a graph
is an instance of the base `Term` class, defined in
`zipline.modelling.term`.  Dependency graphs are executed by instances
of `FFCEngine`, defined in `zipline.modelling.engine`.

A new module, `zipline.data.ffc`, containing loaders and dataset
definitions for inputs to the modelling API.

New `TradingAlgorithm` api methods: `add_factor`, and `add_filter`.
These methods can only be called from `initialize`, and are used to
inform the algorithm that each day it should compute the given terms.
Computed factor results are made available through a new attribute of
the `data` object in `before_trading_start` and `handle_data`.  Computed
filter results control which assets are available in the factor matrix
on each day.
2015-07-29 12:30:46 -04:00
Scott Sanderson 6b72b60cde MAINT: Don't install non-zipline packages.
In particular, don't give anyone who installs zipline a global package
named 'tests'.  (sob)
2015-07-29 12:30:46 -04:00
Scott Sanderson 26ef001bfc Merge pull request #658 from quantopian/remove-unused-property
MAINT: Remove unused `assets` property.
2015-07-28 19:34:14 -04:00
Jonathan Kamens dca679edcb BUG: Logbook 0.10.0 requires explicit handler
As of logbook 0.10.0, logbook no longer installs a default handler,
which means that if the application doesn't install one, log messages
disappear into the ether.

Therefore, all of our scripts with `__main__` endpoints need to push a
`logbook.StderrHandler` if they're not already pushing some other
handler.
2015-07-28 04:38:41 -04:00
Jonathan Kamens 576e4184d7 BLD: Update mock to release 1.3.0 2015-07-24 12:28:51 -04:00
Jonathan Kamens 393ea35e46 BLD: Switch back to PyPI version of xlrd
The bug which prompted us to use our own version of xlrd is patched in
the current PyPI release, so switch back to it.
2015-07-24 12:28:12 -04:00
Jonathan Kamens 622144fa75 BLD: Add "--exists-action w" to pip invocations 2015-07-23 15:58:13 -04:00
Jonathan Kamens 21610053e6 MAINT: Upgrade PyPI versions of tornado, mistune, mock, patsy 2015-07-23 14:51:25 -04:00
Jonathan Kamens 5e796aacf1 DEV: Add piprot and its deps to requirements_dev.txt 2015-07-23 14:34:03 -04:00
Scott Sanderson 20c5fc356f MAINT: Remove unused assets property.
It references a self.cache attribute that no longer exists.
2015-07-21 17:43:43 -04:00
jfkirk 16ab46b69c DEV: Uses ValueError when PerformanceTracker.to_dict receives invalid emission type 2015-07-21 16:06:52 -04:00
jfkirk 8d5bfd3c91 BUG: Aligns performance packet generation between minute and daily modes 2015-07-21 13:25:39 -04:00
Eddie Hebert f22e9e5122 Revert "PERF: Reuse one cursor in asset finder lookups."
This reverts commit 136a09776d.
2015-07-16 15:36:48 -04:00
Eddie Hebert 136a09776d PERF: Reuse one cursor in asset finder lookups.
Instead of creating a new cursor with each query, use the same cursor
throughout the lifetime of the finder instance to remove any overhead
from creating a new cursor in tight loops.
2015-07-16 15:16:36 -04:00
Eddie Hebert 376dc7b703 BUG: Fix exception on no symbol with fuzzy enabled
If there is no symbol there should be no fuzzy lookup either.
2015-07-15 15:52:33 -04:00