|
@@ -50,6 +50,10 @@ def get_ana_data_lastdays( df, intervaldays=30):
|
|
|
lastdf['profit_usd'] / lastdf['buy_usd'],
|
|
|
-10,
|
|
|
)
|
|
|
+ earn_per_neg100_neg30 = len( lastdf[lastdf["earn_percent"] >=-1 & lastdf["earn_percent"] <=-0.3] )
|
|
|
+ earn_per_neg30_pos0 = len( lastdf[lastdf["earn_percent"] >-0.3 & lastdf["earn_percent"] <=0] )
|
|
|
+ earn_per_pos0_pos100 = len( lastdf[lastdf["earn_percent"] >0 & lastdf["earn_percent"] <=1] )
|
|
|
+ earn_per_pos100_posmax = len( lastdf[lastdf["earn_percent"] >1 ] )
|
|
|
|
|
|
earnmain_max = lastdf['profit_usd'].max()
|
|
|
last_earn_difmax_sum = last_earn_sum - earnmain_max
|
|
@@ -58,6 +62,8 @@ def get_ana_data_lastdays( df, intervaldays=30):
|
|
|
last_dif_earnper = (
|
|
|
last_earn_difmax_sum / last_cost_difmax_sum if last_cost_difmax_sum != 0 else -10
|
|
|
)
|
|
|
+
|
|
|
+
|
|
|
return (
|
|
|
last_cost_sum,
|
|
|
last_earn_sum,
|
|
@@ -68,6 +74,10 @@ def get_ana_data_lastdays( df, intervaldays=30):
|
|
|
last_cost_median,
|
|
|
last_cost_mean,
|
|
|
last_trans_amount,
|
|
|
+ earn_per_neg100_neg30,
|
|
|
+ earn_per_neg30_pos0,
|
|
|
+ earn_per_pos0_pos100,
|
|
|
+ earn_per_pos100_posmax,
|
|
|
|
|
|
)
|
|
|
|
|
@@ -124,8 +134,8 @@ def main():
|
|
|
(last_07d_cost, last_07d_earn, last_07d_earnper, last_07d_difcost, last_07d_difearn, last_07d_difper,
|
|
|
last_07d_costmedian, last_07d_costmean, last_07d_trans , ) = get_ana_data_lastdays( df=cur_df, intervaldays=7)
|
|
|
|
|
|
- (last_15d_cost, last_15d_earn, last_15d_earnper, last_15d_difcost, last_15d_difearn, last_15d_difper,
|
|
|
- last_15d_costmedian, last_15d_costmean, last_15d_trans , ) = get_ana_data_lastdays( df=cur_df, intervaldays=15)
|
|
|
+ # (last_15d_cost, last_15d_earn, last_15d_earnper, last_15d_difcost, last_15d_difearn, last_15d_difper,
|
|
|
+ # last_15d_costmedian, last_15d_costmean, last_15d_trans , ) = get_ana_data_lastdays( df=cur_df, intervaldays=15)
|
|
|
|
|
|
(last_30d_cost, last_30d_earn, last_30d_earnper, last_30d_difcost, last_30d_difearn, last_30d_difper,
|
|
|
last_30d_costmedian, last_30d_costmean, last_30d_trans , ) = get_ana_data_lastdays( df=cur_df, intervaldays=30)
|
|
@@ -146,15 +156,7 @@ def main():
|
|
|
last_07d_trans,
|
|
|
|
|
|
|
|
|
- last_15d_cost,
|
|
|
- last_15d_earn,
|
|
|
- last_15d_earnper,
|
|
|
- last_15d_difcost,
|
|
|
- last_15d_difearn,
|
|
|
- last_15d_difper,
|
|
|
- last_15d_costmedian,
|
|
|
- last_15d_costmean,
|
|
|
- last_15d_trans,
|
|
|
+
|
|
|
|
|
|
last_30d_cost,
|
|
|
last_30d_earn,
|
|
@@ -189,18 +191,6 @@ TotalAnalysis_columns = [
|
|
|
"07d_costmedian",
|
|
|
"07d_costmean",
|
|
|
"07d_trans",
|
|
|
-
|
|
|
-
|
|
|
- "15d_cost",
|
|
|
- "15d_earn",
|
|
|
- "15d_earnper",
|
|
|
- "15d_difcost",
|
|
|
- "15d_difearn",
|
|
|
- "15d_difper",
|
|
|
- "15d_costmedian",
|
|
|
- "15d_costmean",
|
|
|
- "15d_trans",
|
|
|
-
|
|
|
|
|
|
"30d_cost",
|
|
|
"30d_earn",
|