Skip to content

Commit

Permalink
Merge pull request #91 from masanorihirano/bug-fix-230713
Browse files Browse the repository at this point in the history
bug fix in High frequency order execution handling
  • Loading branch information
masanorihirano authored Jul 13, 2023
2 parents bc674c6 + 13d9b5e commit 77a1063
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pams/runners/sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,17 @@ def _handle_orders(
raise NotImplementedError
if session.with_order_execution:
logs = market._execution()
self.simulator._update_agents_for_execution(
execution_logs=logs
)
for execution_log in logs:
agent = self.simulator.id2agent[
execution_log.buy_agent_id
]
agent.executed_order(log=execution_log)
agent = self.simulator.id2agent[
execution_log.sell_agent_id
]
agent.executed_order(log=execution_log)
self.simulator._trigger_event_after_execution(
execution_log=execution_log
Expand Down

0 comments on commit 77a1063

Please sign in to comment.