bugfixing
This commit is contained in:
parent
7e009bc198
commit
d7713a29fb
@ -43,14 +43,14 @@ def all_hedge_funds(con):
|
|||||||
all_ciks = cursor.fetchall()
|
all_ciks = cursor.fetchall()
|
||||||
|
|
||||||
res_list = [{
|
res_list = [{
|
||||||
'cik': row[0],
|
'cik': row[0],
|
||||||
'name': format_company_name(row[1]),
|
'name': format_company_name(row[1]),
|
||||||
'numberOfStocks': row[2],
|
'numberOfStocks': row[2],
|
||||||
'marketValue': row[3],
|
'marketValue': row[3],
|
||||||
'winRate': row[4],
|
'winRate': row[4],
|
||||||
'turnover': row[5],
|
'turnover': row[5],
|
||||||
'performancePercentage3year': row[6]
|
'performancePercentage3year': row[6]
|
||||||
} for row in all_ciks if row[2] >= 3]
|
} for row in all_ciks if row[2] >= 3 and abs(row[6]) < 500]
|
||||||
|
|
||||||
sorted_res_list = sorted(res_list, key=lambda x: x['marketValue'], reverse=True)
|
sorted_res_list = sorted(res_list, key=lambda x: x['marketValue'], reverse=True)
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ def all_hedge_funds(con):
|
|||||||
ujson.dump(sorted_res_list, file)
|
ujson.dump(sorted_res_list, file)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def spy_performance():
|
def spy_performance():
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import yfinance as yf
|
import yfinance as yf
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user