Skip to content

Commit

Permalink
bug fix in calc sum executed volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
masanorihirano committed Aug 29, 2023
1 parent 06d4834 commit 3e47f30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/fat_finger.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
4 changes: 2 additions & 2 deletions pams/agents/market_share_fcn_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def get_sum_trade_volume(self, market: Market) -> int:
int: total trade volume.
"""
t: int = market.get_time()
time_window_size: int = min(t, self.time_window_size)
volume: int = sum(market.get_executed_volumes(range(1, time_window_size + 1)))
time_window_size: int = min(t + 1, self.time_window_size)
volume: int = sum(market.get_executed_volumes(range(0, time_window_size)))
return volume

0 comments on commit 3e47f30

Please sign in to comment.