From 2201678375d17314600a4a01f92e6eb42cd3d189 Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Thu, 23 Aug 2012 15:47:53 -0400 Subject: [PATCH] Adds docstring for parameters of SimulatedTradingLite --- zipline/lines.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zipline/lines.py b/zipline/lines.py index ba973943..5283756f 100644 --- a/zipline/lines.py +++ b/zipline/lines.py @@ -371,7 +371,25 @@ class SimulatedTradingLite(object): algorithm, environment, style): + """ + @sources - an iterable of iterables + These iterables must yield ndicts that contain: + - type :: a ziplines.protocol.DATASOURCE_TYPE + - dt :: a milliseconds since epoch timestamp in UTC + @transforms - An iterable of instances of StatefulTransform. + + @algorithm - An object that implements: + `def initialize(self)` + `def handle_data(self, data)` + `def get_sid_filter(self)` + `def set_logger(self, logger)` + `def set_order(self, order_callable)` + + @environment - An instance of finance.trading.TradingEnvironment + + @style - protocol.SIMULATION_STYLE + """ self.date_sorted = date_sorted_sources(*sources) self.transforms = transforms # Formerly merged_transforms.