ENH: fast stochastic oscillator added.
A fast stochastic oscillator has been added to the technical
factors. This is the simplest of the stochastic oscillators,
and can be used to build the others.
Tests have been added that compare against the values expected
from that of ta-lib STOCHF.
FastStochasticOscillator is marked as window_safe=True to allow taking
moving averages for smoothing.
The file format converted by this script has no support for reading in
Zipline. Remove since it requires import of a library not defined in
requirements.
Make the delineation between `DailyEquityHistoryTestCase` and
`MinuteEquityHistoryTestCase` whether or not minute dts or daily dts are
used as the query timestamp, instead of whether the frequency is `1d`
vs. `1m`.
Preparing for adding a repro case for where using `1d` with minute data
fails when there is an adjustment occuring the day before the query
minute dt.
When writing first_trading_day, it is already in the correct frame of
reference (seconds since epoch) and does not need to be transformed
further. Adjusts the reader to expect this value.
Instead of inferring it from the minute/daily writer, we now require the
first trading day to be passed explicitly, so the creator of the
DataPortal controls what is used as the first trading day.
Allow `WithBcolzDailyBarData` to opt-in to reading data defined by
`WithBcolzMinuteBarData`, so that the daily and minute test for the same
asset and dts correlate between the two readers.
The correlation is relevant for history tests which blend daily and
minute data.
Also, make the test data for the split and mergers assets in the minute
suite align at the thousands place if the adjustmets are applied
correctly, by starting the prices with a base of 4000 and then halving
the start value each day.
We need to call gc.collect before tearing down our class because we have
a cycle between TradingAlgorithm and AlgorithmSimulator which ultimately
holds a reference to the pipeline engine passed to the tests here.
This means that we're not guaranteed to have deleted our disk-backed
resource readers (e.g. SQLiteAdjustmentReader) before trying to delete
the tempdir, which causes failures on Windows because Windows doesn't
allow you to delete a file if someone still has an open handle to that
file.
The real fix for this is to break the cycle between TradingAlgorithm and
AlgorithmSimulator, but that requires significant breaking API changes.
If minutes already exist for the last existing day, adjust the number of
minutes padded to account for them. Previously we would always pad 390,
leading to a mismatch in the number of rows.