#NEWLINE# def __init__( self , start_prices = None , freq = 'minute' , start = None , end = None , drift = 0.1 , sd = 0.1 , calendar = calendar_nyse ) : #NEWLINE# #INDENT# "\n        :Arguments:\n            start_prices : dict\n                 sid -> starting price.\n                 Default: {0: 100, 1: 500}\n            freq : str <default='minute'>\n                 Emits events according to freq.\n                 Can be 'daily' or 'minute'\n            start : datetime <default=start of calendar>\n                 Start dt to emit events.\n            end : datetime <default=end of calendar>\n                 End dt until to which emit events.\n            drift: float <default=0.1>\n                 Constant drift of the price series.\n            sd: float <default=0.1>\n                 Standard deviation of the price series.\n            calendar : calendar object <default: NYSE>\n                 Calendar to use.\n                 See zipline.utils for different choices.\n\n        :Example:\n            # Assumes you have instantiated your Algorithm\n            # as myalgo.\n            myalgo = MyAlgo()\n            source = RandomWalkSource()\n            myalgo.run(source)\n\n        " #NEWLINE# self . arg_string = hash_args ( start_prices , freq , start , end , calendar . __name__ ) #NEWLINE# if ( freq not in self . VALID_FREQS ) : #NEWLINE# #INDENT# raise ValueError ( ( '%s not in %s' % ( freq , self . VALID_FREQS ) ) ) #NEWLINE# #UNINDENT# self . freq = freq #NEWLINE# if ( start_prices is None ) : #NEWLINE# #INDENT# self . start_prices = { #NEWLINE# #INDENT# 0 : 100 , #NEWLINE# 1 : 500 , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . start_prices = start_prices #NEWLINE# #UNINDENT# self . calendar = calendar #NEWLINE# if ( start is None ) : #NEWLINE# #INDENT# self . start = calendar . start #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . start = start #NEWLINE# #UNINDENT# if ( end is None ) : #NEWLINE# #INDENT# self . end = calendar . end_base #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . end = end #NEWLINE# #UNINDENT# self . drift = drift #NEWLINE# self . sd = sd #NEWLINE# self . sids = self . start_prices . keys ( ) #NEWLINE# self . open_and_closes = calendar . open_and_closes [ self . start : calendar . end ] #NEWLINE# self . _raw_data = None