Skip to content

Commit

Permalink
scenario.py: fix negative sign on user account
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbigz committed Jul 22, 2024
1 parent 0212554 commit 40e8033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sections/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def price_shock_plot(price_scenario_users: list[Any], oracle_distort: float):

spot_bankrs = []
for df in dfs:
spot_b_t1 = -(df[(df['spot_asset']<df['spot_liability']) & (df['net_usd_value']<0)])
spot_bankrs.append(-(spot_b_t1['spot_liability'] - spot_b_t1['spot_asset']).sum())
spot_b_t1 = (df[(df['spot_asset']<df['spot_liability']) & (df['net_usd_value']<0)])
spot_bankrs.append((spot_b_t1['spot_liability'] - spot_b_t1['spot_asset']).sum())

xdf = [[-df[df['net_usd_value']<0]['net_usd_value'].sum() for df in dfs],
spot_bankrs
Expand Down

0 comments on commit 40e8033

Please sign in to comment.