Add the ability for an algorithm to request the current contract for a
future chain via `data.current`.
e.g.:
```
data.current(ContinuousFuture('CL', offset=0, roll='calendar'),
'contract')
```
This allows optionally setting the last available dts in the DataPortal
explicitly. If these args aren't provided, we fall back to inferring
these from the underlying readers, which was the previous behavior.
When dispatching to sub readers in dispatch reader, pass along the asset
object, instead of extracting the sid.
The in development reader for continuous futures values besides `sid`
are needed from the `ContinuousFuture` object.
In days_at_time, use a Timedelta instead of a DateOffset. We were
previously using DateOffset to work around a pandas 16 bug even though
it raises a PerformanceWarning. Now that we're on pandas 18, we can use
the much simpler Timedelta construction.
- Use parameter_space instead of `parameterized.expand`.
- Use a timedelta instead of concatenating strings.
- Use a (possibly no-op) scramble function instead of reordering list
literals.
- Use `freeze_dt, unfreeze_dt, re_freeze_dt` instead of `dts[n]`.
- Rename `assert_vectorized_results` to `assert_all_restrictions`.
In favor of a new method `set_restrictions` which takes a Restrictions
object. Calls to `set_do_not_order_list` should raise a deprecation
warning and create an equivalent Restrictions object, with which
`set_restrictions` will be called. For convenience, create a
RestrictionsSet from which the "restrictions" version of a security
list can be accessed
Introducing a WithCreateBarData fixture which allows for the
creation of a BarData using only the `simulation_dt_func` and
`restrictions` params. Assumes that each suite uses the same
`data_portal`, `data_frequency` and `trading_calendar`
The SecurityList implements a non-exposed method
`current_securities(dt)` which SecurityListRestrictions calls to
determine if an asset is restricted. Deprecate the `__iter__` and
`__contains__` methods of security lists in favor of
`current_securities(dt)`
An ABC Restrictions defines a group of restrictions responsible
for returning restriction information for sids on certain dts. An
InMemoryRestrictions is a point-in-time group of such restrictions,
with all restrictions and their dates passed in upon instantiation.
A StaticRestrictedList takes a list of sids, restricting them at all
dates
MAINT: optimization - only look at assets appearing in data
TST: simplify test
DOC: add documentation for checkpoints
MAINT: explicitly cast event date field to datetime
MAINT: add back import
TST: fix indexing to remove setting wtih copy warning
TST: fix quarter normalization test
TST: change test name
BUG: remove arg
BUG: look at dict keys
TST: add test for windowing
MAINT: raise ValueError instead of asserting
TST: add assertion to check windowing
TST: parametrize test over number of quarters forward/back.
BUG: fix adjustment calculation logic for quarter crossovers.
TST: add test for previous quarter windows
BUG: fix bugs in calculating previous windows
BUG: fix missing value for datetime
TST: add test case for missing quarter