quantopian/zipline — pull request #62 by twiecki (2013-01-16 19:59:12+00:00)
Title: Record vars

This PR adds a record_vars() method to TransformAlgorithm. It's effect is best seen by the updated DMA algorithm:
https://github.com/quantopian/zipline/blob/record_vars/zipline/examples/dual_moving_average.py

Relevant code passages

```python
self.record_variables(['short_mavg', 'long_mavg', 'buy', 'sell'])

def handle_data(self, data):
self.short_mavg = data['AAPL'].short_mavg['price']
self.long_mavg = data['AAPL'].long_mavg['price']

results = dma.run(data)
print results.short_mavg
```