Commit Graph

9 Commits

Author SHA1 Message Date
Eddie Hebert 58af62f18d REL: Update copyright on all files touched since end of 2012.
s/Copyright 2012/Copyright 2013/
2013-04-05 14:28:15 -04:00
Eddie Hebert e901e06f39 Changes the API for recording variables.
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)
```
2013-03-02 18:28:35 -05:00
Thomas Wiecki f1ff9cee0d ENH: New example algorithm OLMAR. 2013-03-01 15:33:12 -05:00
Matti Hanninen 4026e6122f Fixes an incorrect order in examples. 2013-02-01 18:17:23 +02:00
Eddie Hebert c298cfda03 Adds recorded variable to dual moving average example.
Attr: Thomas Wiecki <thomas.wiecki@gmail.com> (@twiecki)
2013-01-31 08:19:07 -05:00
Eddie Hebert 0ba6f88a84 Fixes event window length in example algo.
It was using the old days parameter.
2012-11-20 16:38:56 -05:00
Eddie Hebert 9f715258e6 Updates pairtrade example to use window_length.
Batch transforms now use window_length instead of days.
2012-11-20 16:31:18 -05:00
Thomas Wiecki 126e9fdf26 Fixed batch_transform window length not being market aware.
Added accompanying unittest.

Minor refactoring of unittests and factory.
2012-11-06 21:13:27 -05:00
Thomas Wiecki 42c2a6b892 Adds example algorithm scripts. 2012-10-23 17:46:02 -04:00