Example #1
0
 def __init__(self, currency: str, quantity: float, source: str, execution_time: dt.datetime):
     super().__init__(Cash(currency), quantity, generation_time=execution_time, source=source)
     """
     Create a cost order e.g. transaction or servicing cost
     :param execution_time: the time when the order is executed
     """
     self.execution_time = execution_time
 def __init__(self, data_handler: DataHandler):
     self.data_handler = data_handler
     self.performance = pd.Series()
     self.cash_asset = Cash('USD')
     self.holdings = {}
     self.orders = []
     self.initial_value = 100
Example #3
0
 def __init__(self, data_handler: DataHandler):
     self.data_handler = data_handler
     self.performance = pd.Series()
     self.cash_asset = Cash('USD')
     self.holdings = {}
     self.holdings_projected = {}
     self.orders = []
Example #4
0
 def __init__(self, data_handler: DataHandler):
     self.data_handler = data_handler
     self.performance = pd.Series()
     self.cash_asset = Cash('USD')
     self.holdings = defaultdict(float)
     self.historical_holdings = pd.Series()
     self.historical_weights = pd.Series()
     self.orders = []
     self.initial_value = 100
     self.results = {}