Removes from requirements_dev.txt, since requirements_dev.txt is
used in various unit testing environments, ipython, pyzmq, etc.
is extra weight that is being unecessarily pulled in.
- perf modified to let non-performance related events flow through.
- changes to support streaming non-trading data through batch transforms
and for mixing in sids with just custom data.
- allowing CUSTOM events to flow through to transforms.
- Added logic to maintain pre-specified sid filter.
Instead of a loosely defined object for Order, explicitly
defines the parameters and corresponding members.
Clearing the way for adding more members to the Order object.
Makes TradingAlgorithm available at the top-level.
So that algorithms can do:
```
import zipline
class MyAlgo(zipline.TradingAlgorithm)
```
OR
```
from zipline import TradingAlgorithm
class MyAlgo(TradingAlgorithm)
```
Instead of using division of the amount by itself to extract
the direction, uses math's copysign.
Should be almost functionally equivalent,
but copysign won't have a possible floating point error leading
the direction to not be exactly 1.
So that both computational and memory overhead is reduced,
this turns off serializing positions for cumulative performance.
Positions were essentially being doubled up by being stored
in both cumalative and daily.
So that transactions are kept by default.
This prepares for the addition of the serialize flag added by
@fawce.
Setting the default to True, so that the flags will be aligned.
- repeated calls with the same data window do not update batch transform
windows.
- repeated calls with the same data and same supplemental parameters do
not update batch transform results
- repeated calls with the same data and different supplemental params
do update batch transform results
If the trading_days end date is not greater than the date being
tested, (this can happen if the algorithm's end date is set to a date
that is before the latest date available saved in the msgpacks),
then trying to get the location will fail, instead searchsorted
will get the lastest date available in the trading day map to use
as a test date.
- removed use_panel
- default for refresh_period is now 0
- refresh_period will only affect the recreation of the datapanel
- user's transform method is invoked on every call to batch transform
The loader_tool currently facilitates:
- Finding the last date in each source
- Forcing a complete reload of benchmark and treasury.
- Manipulating the msgpacks so that trailing dates are dropped,
so that the condition for an update can be recreated.
This is intended to make it easier to test the update logic added
by @rday in PR #88
- the underlying dequeue shouldn't be modified, so forwarding to the
user function is a bit misleading
- if we want to provide a dequeue we should consider another class
or an EventWindow decorator.
Uses a method called 'record' that provides a key value,
instead of providing keys to extract from context.
The variables are stored internally to the algorithm in a dictionary,
and not just stared as a property of the algorithm.
Main intent behind this change is to make the API more user friendly,
since the previous recorded_variables relies on the value to be set
in the algorithms context/self, the hope is that only having to use
the `record` method means less moving pieces and a more understandable
API.
i.e., instead of:
```
def initialize(self):
recorded_variables('foo', bar')
def handle_data(self, data):
self.foo = 1
self.bar = 2
```
The API is now:
```
def initialize(self):
pass
def handle_data(self, data):
self.record(foo=1, bar=2)
```
Adds a check to see if the s_squared value is near 0.
When the number was very near 0, a very small negative floating
point, the sqrt throws a 'math domain error', this prevents that
case.
The call to `Panel.dropna` after the fillna was deleting all values,
if a stock stopped trading mid run and thus provided volume 0.
i.e. if any sid had 0 non-null values the entire panel of frames
would be truncated.
It's possible to avoid the collapse via by adding the `how='all'` flag
to `dropna`, however with the current tick based creation of the panel,
the `dropna` with `how='all'` should be functionally equivalent to
not dropping at all.
The dropna has been dropped in favor of leaving the drop to algorithm
code.