mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-09 11:19:23 +08:00
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.
This commit is contained in:
@@ -24,6 +24,21 @@ ext_modules = [
|
||||
['zipline/assets/_assets.pyx'],
|
||||
include_dirs=[np.get_include()],
|
||||
),
|
||||
Extension(
|
||||
'zipline.lib.adjusted_array',
|
||||
['zipline/lib/adjusted_array.pyx'],
|
||||
include_dirs=[np.get_include()],
|
||||
),
|
||||
Extension(
|
||||
'zipline.lib.adjustment',
|
||||
['zipline/lib/adjustment.pyx'],
|
||||
include_dirs=[np.get_include()],
|
||||
),
|
||||
Extension(
|
||||
'zipline.data.ffc.loaders._us_equity_pricing',
|
||||
['zipline/data/ffc/loaders/_us_equity_pricing.pyx'],
|
||||
include_dirs=[np.get_include()],
|
||||
),
|
||||
]
|
||||
|
||||
setup(
|
||||
|
||||
Reference in New Issue
Block a user