bugfixing

This commit is contained in:
MuslemRahimi 2024-10-30 19:50:26 +01:00
parent 7e009bc198
commit d7713a29fb

View File

@ -43,14 +43,14 @@ def all_hedge_funds(con):
all_ciks = cursor.fetchall()
res_list = [{
'cik': row[0],
'name': format_company_name(row[1]),
'numberOfStocks': row[2],
'marketValue': row[3],
'winRate': row[4],
'turnover': row[5],
'performancePercentage3year': row[6]
} for row in all_ciks if row[2] >= 3]
'cik': row[0],
'name': format_company_name(row[1]),
'numberOfStocks': row[2],
'marketValue': row[3],
'winRate': row[4],
'turnover': row[5],
'performancePercentage3year': row[6]
} 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)
@ -58,6 +58,7 @@ def all_hedge_funds(con):
ujson.dump(sorted_res_list, file)
def spy_performance():
import pandas as pd
import yfinance as yf