Skip to content

Commit

Permalink
Merge pull request #1473 from quantopian/release-1.0.2
Browse files Browse the repository at this point in the history
REL: Prepare for 1.0.2 release.
  • Loading branch information
ehebert committed Sep 7, 2016
2 parents 89786f1 + 15aaafe commit cf44fcb
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 29 deletions.
2 changes: 2 additions & 0 deletions docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Release Notes
=============

.. include:: whatsnew/1.0.2.txt

.. include:: whatsnew/1.0.1.txt

.. include:: whatsnew/1.0.0.txt
Expand Down
98 changes: 97 additions & 1 deletion docs/source/whatsnew/1.0.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,52 @@ Enhancements
metric calculations between pyfolio and zipline. Empyrical adds custom
annualization options for returns of custom frequencies. (:issue:`855`)

- Add Aroon factor. (:issue:`1258`)

- Add fast stochastic oscillator factor. (:issue:`1255`)

- Add a Dockerfile. (:issue:`1254`)

- New trading calendar which supports sessions which span across midnights, e.g.
24 hour 6:01PM-6:00PM sessions for futures trading.
`zipline.utils.tradingcalendar` is now deprecated. (:issue:`1138`) (:issue:`1312`)

- Allow slicing a single column out of a Factor/Filter/Classifier. (:issue:`1267`)

- Provide Ichimoku Cloud factor (:issue:`1263`)

- Allow default parameters on Pipeline terms. (:issue:`1263`)

- Provide rate of change percentage factor. (:issue:`1324`)

- Provide linear weighted moving average factor. (:issue:`1325`)

- Add ``NotNullFilter``. (:issue:`1345`)

- Allow capital changes to be defined by a target value. (:issue:`1337`)

- Add ``TrueRange`` factor. (:issue:`1348`)

- Add point in time lookups to ``assets.db``. (:issue:`1361`)

- Make ``can_trade`` aware of the asset's exchange . (:issue:`1346`)

- Add ``downsample`` method to all computable terms. (:issue:`1394`)

- Add `QuantopianUSFuturesCalendar`. (:issue:`1414`)

- Enable publishing of old ``assets.db`` versions. (:issue:`1430`)

- Enable ``schedule_function`` for Futures trading calendar. (:issue:`1442`)

- Disallow regressions of length 1. (:issue:`1466`)

Experimental
~~~~~~~~~~~

- Add support for comingled Future and Equity history windows, and enable other
Future data access via data portal. (:issue:`1435`) (:issue:`1432`)

Bug Fixes
~~~~~~~~~

Expand All @@ -65,7 +111,57 @@ Bug Fixes

- Alpha and sharpe ratio are now annualized. (:issue:`1322`)

- Fix units during reading and writing of daily bar ``first_trading_day ``
attribute. (:issue:`1245`)

- Optional dispatch modules, when missing, no longer cause a `NameError`.
(:issue:`1246`)

- Treat ``schedule_function`` argument as a time rule when a time rule, but no
date rule is supplied. (:issue:`1221`)

- Protect against boundary conditions at beginning and end trading day in
schedule function. (:issue:`1226`)

- Apply adjustments to previous day when using history with a frequency of `1d`.
(:issue:`1256`)

- Fail fast on invalid pipeline columns, instead of attempting to access the nonexistent column.
(:issue:`1280`)

- Fix ``AverageDollarVolume`` NaN handling. (:issue:`1309`)

Performance
~~~~~~~~~~~

- Performance improvements to blaze core loader. (:issue:`1227`)

- Allow concurrent blaze queries. (:issue:`1323`)

- Prevent missing leading bcolz minute data from doing repeated unnecessary lookups. (:issue:`1451`)

- Cache future chain lookups. (:issue:`1455`)

Maintenance and Refactorings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Removed remaining mentions of ``add_history``. (:issue:`1287`)

Documentation
~~~~~~~~~~~~~

None
Testing
~~~~~~~~~~~

- Add test fixture which sources daily pricing data from minute pricing data
fixtures. (:issue:`1243`)

Data Format Changes
~~~~~~~~~~~~~~~~

- ``BcolzDailyBarReader`` and ``BcolzDailyBarWriter`` use trading calendar instance,
instead of trading days serialized to ``JSON``. (:issue:`1330`)

- Change format of ``assets.db`` to support point in time lookups. (:issue:`1361`)

- Change ``BcolzMinuteBarReader``and ``BcolzMinuteBarWriter`` to support varying tick sizes. (:issue:`1428`)
60 changes: 32 additions & 28 deletions zipline/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,30 @@ def fetch_csv(url, pre_func=None, post_func=None, date_column='date', date_forma
A requests source that will pull data from the url specified.
"""

def future_chain(root_symbol, as_of_date=None):
"""Look up a future chain with the specified parameters.
def future_chain(root_symbol, as_of_date=None, offset=0):
"""
Look up a future chain.
Parameters
----------
root_symbol : str
The root symbol of a future chain.
as_of_date : datetime.datetime or pandas.Timestamp or str, optional
Date at which the chain determination is rooted. I.e. the
existing contract whose notice date is first after this date is
the primary contract, etc.
Parameters
----------
root_symbol : str
The root symbol of a future chain.
as_of_date : datetime.datetime or pandas.Timestamp or str, optional
Date at which the chain determination is rooted. If this date is
not passed in, the current simulation session (not minute) is used.
offset: int
Number of sessions to shift `as_of_date`. Positive values shift
forward in time. Negative values shift backward in time.
Returns
-------
chain : FutureChain
The future chain matching the specified parameters.
Returns
-------
chain : FutureChain
The future chain matching the specified parameters.
Raises
------
RootSymbolNotFound
If a future chain could not be found for the given root symbol.
Raises
------
RootSymbolNotFound
If a future chain could not be found for the given root symbol.
"""

def future_symbol(symbol):
Expand All @@ -126,17 +129,18 @@ def future_symbol(symbol):
"""

def get_datetime(tz=None):
"""Returns the current simulation datetime.
"""
Returns the current simulation datetime.
Parameters
----------
tz : tzinfo or str, optional
The timezone to return the datetime in. This defaults to utc.
Parameters
----------
tz : tzinfo or str, optional
The timezone to return the datetime in. This defaults to utc.
Returns
-------
dt : datetime
The current simulation datetime converted to ``tz``.
Returns
-------
dt : datetime
The current simulation datetime converted to ``tz``.
"""

def get_environment(field='platform'):
Expand Down Expand Up @@ -508,7 +512,7 @@ def record(*args, **kwargs):
:func:`~zipline.run_algorithm`.
"""

def schedule_function(func, date_rule=None, time_rule=None, half_days=True):
def schedule_function(func, date_rule=None, time_rule=None, half_days=True, calendar=None):
"""Schedules a function to be called according to some timed rules.
Parameters
Expand Down

0 comments on commit cf44fcb

Please sign in to comment.