Adds tests asserting that we resolve conflicts in accordance with the
following rules when we have multiple assets holding the same symbol at
the same time:
If multiple SIDs exist for symbol S at time T, return the candidate
SID whose start_date is highest. (200 cases)
If multiple SIDs exist for symbol S at time T, the best candidate
SIDs share the highest start_date, return the SID with the highest
end_date. (34 cases)
It is the opinion of the author (ssanderson) that we should consider
this malformed input and fail here. But this is the current indended
behavior of the code, and I accidentally broke it while refactoring.
These will serve as regression tests until the time comes that we
decide to enforce this as an error.
See https://github.com/quantopian/zipline/issues/837 for more
details.
Our DataFrame index resolution logic relies on failed lookups **not**
being cached, but not caching failed lookups is a nontrivial performance
hit when repeatedly looking up sids. The "solution" here is to clear
the caches after writing in new assets.
The real fix for this is either:
1. Don't construct an AssetFinder until we have the datasource in hand
in run(), or
2. Don't symbol-map the user's input source if it's a DataFrame.
Instead we should make our data loaders pre-map the data.
Rather than repeatedly try and fail to download data that's not yet
available, only try to download again if we haven't successfully
downloaded in the last hour.
Allows us to run subtests while still seeing which parameter
combination caused the tests to fail. The decorator can be used to
create subtests inside a test or to parameterize an entire test method.
We cannot use something like unittest2.TestCase.subTest because our test
runner does not support that.
versioneer let's us track the version using git tags. This prevents
issues like the 0.8.2->0.8.3 push. This also puts the number of commits
from the release and the commit you are on in the version.
Fixes the case where a delta has an asof_date of the last requested
day and an index error would occur. This guards against this
specifically to make the delta be effective through the end of the
requested window.
Adds a test case for this behavior.