Skip to content

Commit

Permalink
Bumping hyperdrivetypes version. Bump agent0 version to 0.26.0 (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheng Lundquist authored Dec 11, 2024
1 parent 197c487 commit f2ed7c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "agent0"
version = "0.25.1"
version = "0.26.0"
# Authors are the current, primary stewards of the repo
# contributors can be found on github
authors = [
Expand Down Expand Up @@ -33,7 +33,7 @@ dependencies = [
"fixedpointmath>=0.2.1",
"hexbytes>=1.2.1",
"hyperdrivepy==0.17.1",
"hyperdrivetypes==1.0.20.12",
"hyperdrivetypes==1.0.20.13",
"ipython>=8.26.0",
"ipykernel>=6.29.5",
"matplotlib>=3.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_liquidation_trades(
The list of liquidation trades.
"""
minimum_transaction_amount = interface.pool_config.minimum_transaction_amount
action_list = []
action_list: list[Trade] = []
for maturity_time, long in wallet.longs.items():
logging.debug("closing long: maturity_time=%g, balance=%s", maturity_time, long)
if long.balance > minimum_transaction_amount:
Expand All @@ -67,7 +67,8 @@ def get_liquidation_trades(

# We use the underlying policies rng object for randomizing liquidation trades
if randomize_trades:
action_list = rng.permutation(action_list).tolist()
# Numpy has issues with typing of list of Trades
action_list: list[Trade] = rng.permutation(action_list).tolist() # type: ignore

# Always set withdrawal shares to be last, as we need trades to close first before withdrawing
if wallet.withdraw_shares > 0:
Expand Down

0 comments on commit f2ed7c8

Please sign in to comment.