MCPcopy Create free account
hub / github.com/FinancialComputingUCL/LOBFrame / short

Method short

simulator/trading_agent.py:19–23  ·  view source on GitHub ↗
(self, price, datetime=None)

Source from the content-addressed store, hash-verified

17 self.date_time_entry_long = datetime
18
19 def short(self, price, datetime=None):
20 amount = 1
21 self.short_inventory += amount
22 self.short_price = price
23 self.date_time_entry_short = datetime
24
25 def exit_long(self, price, datetime=None):
26 self.trading_history.append({'Type': 'Long', 'Entry_Long': self.date_time_entry_long, 'Price_Entry_Long': self.long_price,

Callers 1

backtestFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected