alexaxbreadbytes commited on
Commit
00b63e7
·
verified ·
1 Parent(s): 4019df8

update drawdown text + add drop cents func

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -179,7 +179,9 @@ def filt_df(df, cheader, symbol_selections):
179
  df = df[df[cheader].isin(symbol_selections)]
180
 
181
  return df
182
-
 
 
183
  def load_data(filename, account, exchange, otimeheader, fmat):
184
  cols = ['id','datetime', 'exchange', 'subaccount', 'pair', 'side', 'action', 'amount', 'price']
185
  df = pd.read_csv(filename, header = 0, names= cols)
@@ -558,7 +560,7 @@ def runapp() -> None:
558
  f"{get_rolling_stats(df,lev, otimeheader, 30):.2f}%",
559
  )
560
  st.metric(
561
- "Max Account Drawdown",
562
  "",#f"{np.round(100*max_draw/principal_balance,2)/100*principal_balance:.2f}",
563
  f"{np.round(max_draw)}%",
564
  )
 
179
  df = df[df[cheader].isin(symbol_selections)]
180
 
181
  return df
182
+ def drop_frac_cents(d):
183
+ D = np.floor(100*d)/100
184
+ return D
185
  def load_data(filename, account, exchange, otimeheader, fmat):
186
  cols = ['id','datetime', 'exchange', 'subaccount', 'pair', 'side', 'action', 'amount', 'price']
187
  df = pd.read_csv(filename, header = 0, names= cols)
 
560
  f"{get_rolling_stats(df,lev, otimeheader, 30):.2f}%",
561
  )
562
  st.metric(
563
+ "Max Drawdown",
564
  "",#f"{np.round(100*max_draw/principal_balance,2)/100*principal_balance:.2f}",
565
  f"{np.round(max_draw)}%",
566
  )