Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/quantopian/zipline
/ functions
Functions
4,252 in github.com/quantopian/zipline
⨍
Functions
4,252
◇
Types & classes
1,004
↳
Endpoints
31
↓ 508 callers
Function
assert_equal
Assert that two objects are equal using the ``==`` operator. Parameters ---------- result : object The result that came from the
zipline/testing/predicates.py:375
↓ 150 callers
Method
retrieve_asset
Retrieve the Asset for a given sid.
zipline/assets/assets.py:464
↓ 141 callers
Method
astype
(self, dtype, order='K', casting='unsafe', subok=T
zipline/lib/labelarray.py:522
↓ 126 callers
Method
join
()
zipline/utils/pool.py:143
↓ 107 callers
Function
T
(s)
tests/pipeline/test_international_markets.py:29
↓ 102 callers
Method
get_value
(self, sid, day, column)
tests/pipeline/test_pipeline_algo.py:428
↓ 99 callers
Method
check_constant_output
(self, expr, expected)
tests/pipeline/test_numerical_expression.py:98
↓ 91 callers
Method
make_algo
(min_leverage, grace_period)
tests/test_algorithm.py:3237
↓ 86 callers
Method
create_bardata
(self, simulation_dt_func, restrictions=None)
zipline/testing/fixtures.py:1973
↓ 72 callers
Method
lookup_symbol
Lookup an equity by symbol. Parameters ---------- symbol : str The ticker symbol to resolve. as_of_date :
zipline/assets/assets.py:958
↓ 72 callers
Method
run
(ts)
tests/pipeline/test_domain.py:105
↓ 70 callers
Method
get
Get the value of a cached object. Parameters ---------- key : any The key to lookup. dt : datetime
zipline/utils/cache.py:131
↓ 67 callers
Method
copy
Copy an adjusted array, deep-copying the ``data`` array.
zipline/lib/adjusted_array.py:214
↓ 66 callers
Method
get_history_window
(self, bar_count, frequency, assets, field, ffill)
zipline/algorithm.py:1998
↓ 65 callers
Method
add
Add a column. The results of computing ``term`` will show up as a column in the DataFrame produced by running this pipeline.
zipline/pipeline/pipeline.py:100
↓ 64 callers
Method
order
Place an order for a fixed number of shares. Parameters ---------- asset : Asset The asset to be ordered.
zipline/algorithm.py:1226
↓ 63 callers
Method
run_pipeline
(self, pipeline, start_date, end_date)
tests/pipeline/test_international_markets.py:167
↓ 62 callers
Method
retrieve_all
Retrieve all assets in `sids`. Parameters ---------- sids : iterable of int Assets to retrieve.
zipline/assets/assets.py:476
↓ 60 callers
Method
build_mask
Helper for constructing an AssetExists mask from a boolean-coercible array.
tests/pipeline/base.py:154
↓ 60 callers
Method
data
The data stored in this array.
zipline/lib/adjusted_array.py:256
↓ 58 callers
Function
T
(s)
tests/test_ordering.py:13
↓ 57 callers
Method
check_terms
Compile the given terms into a TermGraph, compute it with initial_workspace, and compare the results with ``expected``.
tests/pipeline/base.py:137
↓ 55 callers
Method
isnan
A Filter producing True for all values where this Factor is NaN. Returns ------- nanfilter : zipline.pipeline.Filter
zipline/pipeline/factors/factor.py:1275
↓ 52 callers
Method
write
Write data to the file. Parameters ---------- dts : pd.DatetimeIndex Index of row labels for rates to be written.
zipline/data/fx/hdf5.py:250
↓ 50 callers
Function
check_arrays
Wrapper around np.testing.assert_array_equal that also verifies that inputs are ndarrays. See Also -------- np.assert_array_equa
zipline/testing/core.py:369
↓ 47 callers
Method
run_algorithm
Create and run an TradingAlgorithm in memory.
zipline/testing/fixtures.py:2060
↓ 47 callers
Method
sid
(self)
zipline/protocol.py:338
↓ 45 callers
Function
code
(name)
zipline/country.py:6
↓ 43 callers
Method
keys
(self)
zipline/protocol.py:93
↓ 39 callers
Method
specialize
Specialize ``self`` to a concrete domain.
zipline/pipeline/data/dataset.py:260
↓ 39 callers
Function
str_to_ts
(dt_str)
tests/test_restrictions.py:25
↓ 39 callers
Method
sum
(a, missing_value)
zipline/pipeline/factors/factor.py:419
↓ 39 callers
Method
update
(self, txn)
zipline/finance/position.py:131
↓ 37 callers
Method
rank
Construct a new Factor representing the sorted rank of each column within each row. Parameters ---------- me
zipline/pipeline/factors/factor.py:731
↓ 34 callers
Function
T
(cs)
tests/metrics/test_metrics.py:26
↓ 34 callers
Function
assert_raises_str
Assert that some exception is raised in a context and that the message exactly matches some string. Parameters ---------- exc : type
zipline/testing/predicates.py:320
↓ 34 callers
Method
fillna
Create a new term that fills missing values of this term's output with ``fill_value``. Parameters ----------
zipline/pipeline/term.py:792
↓ 33 callers
Function
as_column
Convert an array of shape (N,) into an array of shape (N, 1). This is equivalent to `a[:, np.newaxis]`. Parameters ---------- a
zipline/utils/numpy_utils.py:462
↓ 33 callers
Method
ones_mask
(self, shape)
tests/pipeline/base.py:224
↓ 33 callers
Function
str_to_seconds
Convert a pandas-intelligible string to (integer) seconds since UTC. >>> from pandas import Timestamp >>> (Timestamp('2014-01-01') - Tim
zipline/testing/core.py:73
↓ 31 callers
Method
isnull
A Filter producing True for values where this Factor has missing data. Equivalent to self.isnan() when ``self.dtype`` is float64.
zipline/pipeline/term.py:751
↓ 30 callers
Method
check_extra_row_calculations
Check that each term in ``terms`` computes an expected number of extra rows for the given parameters.
tests/pipeline/test_downsampling.py:566
↓ 30 callers
Method
pop
(self, key, *args)
zipline/utils/memoize.py:188
↓ 30 callers
Method
replace
(self, **kwargs)
zipline/pipeline/loaders/blaze/core.py:747
↓ 30 callers
Method
values
Make a random array of shape (len(dates), len(sids)) with ``dtype``.
zipline/pipeline/loaders/synthetic.py:147
↓ 30 callers
Function
verify_callable_argspec
Checks the callable_ to make sure that it satisfies the given expectations. expected_args should be an iterable of Arguments in the order
zipline/utils/argcheck.py:143
↓ 28 callers
Method
create_continuous_future
(self, root_symbol, offset,
zipline/assets/assets.py:1232
↓ 28 callers
Method
startswith
Element-wise startswith. Parameters ---------- prefix : str Returns ------- matches : np.nd
zipline/lib/labelarray.py:729
↓ 27 callers
Method
simulate
(self, data, asset, orders_for_asset)
zipline/finance/slippage.py:164
↓ 26 callers
Function
f
Create a 1-dimensional factor computing the {} of self, each day. Parameters ---------- mask : zipline.pipeline.Filter, optio
zipline/pipeline/factors/factor.py:434
↓ 26 callers
Method
max
(a, missing_value)
zipline/pipeline/factors/factor.py:407
↓ 26 callers
Method
view
(self, dtype=_NotPassed, type=_NotPassed)
zipline/lib/labelarray.py:507
↓ 25 callers
Method
dtype
The dtype of the data stored in this array.
zipline/lib/adjusted_array.py:263
↓ 25 callers
Method
history
DEPRECATED: use ``data.history`` instead.
zipline/algorithm.py:1981
↓ 25 callers
Method
symbol
Lookup an Equity by its ticker symbol. Parameters ---------- symbol_str : str The ticker symbol for the equity to
zipline/algorithm.py:1048
↓ 25 callers
Method
write_sid
Write the OHLCV data for the given sid. If there is no bcolz ctable yet created for the sid, create it. If the length of the
zipline/data/minute_bars.py:700
↓ 24 callers
Function
from_blaze
Create a Pipeline API object from a blaze expression. Parameters ---------- expr : Expr The blaze expression to use. deltas :
zipline/pipeline/loaders/blaze/core.py:533
↓ 24 callers
Function
sentinel
(name, doc=None)
zipline/utils/sentinel.py:20
↓ 23 callers
Method
as_string_array
Convert self back into an array of strings. This is an O(N) operation.
zipline/lib/labelarray.py:319
↓ 22 callers
Method
country_code
(n)
tests/test_assets.py:1574
↓ 22 callers
Method
get_datetime
()
tests/test_security_list.py:109
↓ 22 callers
Method
load_raw_arrays
Parameters ---------- columns : list of str 'open', 'high', 'low', 'close', or 'volume' start_date: Timest
zipline/data/bar_reader.py:49
↓ 22 callers
Method
quantiles
Construct a Classifier computing quantiles of the output of ``self``. Every non-NaN data point the output is labelled with an intege
zipline/pipeline/factors/factor.py:1088
↓ 22 callers
Method
traverse
Produce an iterator rolling windows rows over our data. Each emitted window will have `window_length` rows. Parameters
zipline/lib/adjusted_array.py:278
↓ 21 callers
Method
get_last_traded_dt
Get the latest minute on or before ``dt`` in which ``asset`` traded. If there are no trades on or before ``dt``, returns ``pd.NaT``.
zipline/data/bar_reader.py:129
↓ 21 callers
Method
load
Construct an object from a registered factory. Parameters ---------- name : str Name with which the factory was r
zipline/extensions.py:110
↓ 21 callers
Method
order
Place an order. Parameters ---------- asset : zipline.assets.Asset The asset that this order is for. amou
zipline/finance/blotter/simulation_blotter.py:95
↓ 20 callers
Function
alias
Make a fixture attribute an alias of another fixture's attribute by default. Parameters ---------- attr_name : str The name o
zipline/testing/fixtures.py:258
↓ 20 callers
Function
assert_array_equal
(result, expected, path=(), msg='',
zipline/testing/predicates.py:566
↓ 20 callers
Method
init_class_fixtures
(cls)
zipline/testing/fixtures.py:331
↓ 20 callers
Method
mean
(a, missing_value)
zipline/pipeline/factors/factor.py:399
↓ 20 callers
Method
register
(self, name, factory)
zipline/extensions.py:132
↓ 19 callers
Method
as_int_array
Convert self into a regular ndarray of ints. This is an O(1) operation. It does not copy the underlying data.
zipline/lib/labelarray.py:308
↓ 19 callers
Function
check
(value)
zipline/utils/numpy_utils.py:136
↓ 18 callers
Method
exists
(self, date, asset)
tests/pipeline/test_pipeline_algo.py:226
↓ 18 callers
Method
min
(a, missing_value)
zipline/pipeline/factors/factor.py:411
↓ 17 callers
Method
getpath
Get a path relative to the working directory. Parameters ---------- path_parts : iterable[str] The parts of the p
zipline/utils/cache.py:370
↓ 17 callers
Function
method
(self, *args, **kwargs)
tests/pipeline/base.py:42
↓ 17 callers
Method
set_slippage
Set the slippage models for the simulation. Parameters ---------- us_equities : EquitySlippageModel The
zipline/algorithm.py:1496
↓ 17 callers
Method
write_assets
(self, **kwargs)
tests/test_assets.py:523
↓ 16 callers
Method
eq
Construct a Filter returning True for asset/date pairs where the output of ``self`` matches ``other``.
zipline/pipeline/classifiers/classifier.py:68
↓ 16 callers
Method
get_spot_value
Public API method that returns a scalar value representing the value of the desired asset's field at either the given dt. Pa
zipline/data/data_portal.py:475
↓ 16 callers
Method
notnull
A Filter producing True for values where this Factor has complete data. Equivalent to ``~self.isnan()` when ``self.dtype`` is float6
zipline/pipeline/term.py:774
↓ 16 callers
Method
set_commission
Sets the commission models for the simulation. Parameters ---------- us_equities : EquityCommissionModel The comm
zipline/algorithm.py:1538
↓ 15 callers
Function
create_minute_df_for_asset
(trading_calendar, start_dt, end_dt,
zipline/testing/core.py:527
↓ 14 callers
Method
_list_bundle
(self)
tests/data/bundles/test_core.py:357
↓ 14 callers
Method
assertRaisesRegex
(self, *args, **kwargs)
tests/pipeline/test_pipeline.py:48
↓ 13 callers
Function
_fmt_msg
Format the message for final display. Parameters ---------- msg : str The message to show to the user to provide additional conte
zipline/testing/predicates.py:201
↓ 13 callers
Function
make_simple_equity_info
Create a DataFrame representing assets that exist for the full duration between `start_date` and `end_date`. Parameters ----------
zipline/assets/synthetic.py:61
↓ 13 callers
Method
map
Map a function from str -> str element-wise over ``self``. ``f`` will be applied exactly once to each non-missing unique value in
zipline/lib/labelarray.py:652
↓ 13 callers
Function
preprocess
Decorator that applies pre-processors to the arguments of a function before calling the function. Parameters ---------- **proces
zipline/utils/preprocess.py:35
↓ 13 callers
Method
read
Read and return pricing update data. Parameters ---------- dts : DatetimeIndex The minutes for which to
zipline/data/minute_bars.py:1301
↓ 13 callers
Method
winsorize
Construct a new factor that winsorizes the result of this factor. Winsorizing changes values ranked less than the minimum percentile
zipline/pipeline/factors/factor.py:990
↓ 12 callers
Method
_run_pipeline
(self, expr, deltas, checkpoints,
tests/pipeline/test_blaze.py:1297
↓ 12 callers
Method
apply
Apply a function. Parameters ---------- f : callable The function to call. args : tuple, optional
zipline/utils/pool.py:119
↓ 12 callers
Method
check
(self, inputs, expected)
tests/pipeline/test_domain.py:261
↓ 12 callers
Method
check_algo_fails
(self, algo, order_count)
tests/test_algorithm.py:2677
↓ 12 callers
Function
check_version_info
Checks for a version value in the version table. Parameters ---------- conn : sa.Connection The connection to use to perform
zipline/assets/asset_writer.py:391
↓ 12 callers
Method
func
(x)
tests/test_memoize.py:19
↓ 12 callers
Method
get_rates
Load a 2D array of fx rates. Parameters ---------- rate : str Name of the rate to load. quote :
zipline/data/fx/base.py:59
next →
1–100 of 4,252, ranked by callers