remove rules to screener
This commit is contained in:
parent
96027e973b
commit
87b91b844a
@ -56,18 +56,12 @@ async def get_stock_screener(con,symbols):
|
|||||||
|
|
||||||
#Stock Screener Data
|
#Stock Screener Data
|
||||||
|
|
||||||
cursor.execute("SELECT symbol, name, avgVolume, change_1W, change_1M, change_3M, change_6M, change_1Y, change_3Y, sma_50, sma_200, ema_50, ema_200, rsi, atr, stoch_rsi, mfi, cci, priceToSalesRatio, priceToBookRatio, eps, pe, marketCap, revenue, netIncome, grossProfit, costOfRevenue, costAndExpenses, interestIncome, interestExpense, researchAndDevelopmentExpenses, ebitda, operatingExpenses, operatingIncome, growthRevenue, growthNetIncome, growthGrossProfit, growthCostOfRevenue, growthCostAndExpenses, growthInterestExpense, growthResearchAndDevelopmentExpenses, growthEBITDA, growthEPS, growthOperatingExpenses, growthOperatingIncome, beta FROM stocks WHERE eps IS NOT NULL AND revenue IS NOT NULL AND marketCap IS NOT NULL AND beta IS NOT NULL")
|
cursor.execute("SELECT symbol, name, avgVolume, sma_50, sma_200, ema_50, ema_200, rsi, atr, stoch_rsi, mfi, cci, priceToSalesRatio, priceToBookRatio, eps, pe, marketCap, revenue, netIncome, grossProfit, costOfRevenue, costAndExpenses, interestIncome, interestExpense, researchAndDevelopmentExpenses, ebitda, operatingExpenses, operatingIncome, growthRevenue, growthNetIncome, growthGrossProfit, growthCostOfRevenue, growthCostAndExpenses, growthInterestExpense, growthResearchAndDevelopmentExpenses, growthEBITDA, growthEPS, growthOperatingExpenses, growthOperatingIncome, beta FROM stocks WHERE eps IS NOT NULL AND revenue IS NOT NULL AND marketCap IS NOT NULL AND beta IS NOT NULL")
|
||||||
raw_data = cursor.fetchall()
|
raw_data = cursor.fetchall()
|
||||||
stock_screener_data = [{
|
stock_screener_data = [{
|
||||||
'symbol': symbol,
|
'symbol': symbol,
|
||||||
'name': name,
|
'name': name,
|
||||||
'avgVolume': avgVolume,
|
'avgVolume': avgVolume,
|
||||||
'change1W': change_1W,
|
|
||||||
'change1M': change_1M,
|
|
||||||
'change3M': change_3M,
|
|
||||||
'change6M': change_6M,
|
|
||||||
'change1Y': change_1Y,
|
|
||||||
'change3Y': change_3Y,
|
|
||||||
'sma50': sma_50,
|
'sma50': sma_50,
|
||||||
'sma200': sma_200,
|
'sma200': sma_200,
|
||||||
'ema50': ema_50,
|
'ema50': ema_50,
|
||||||
@ -105,7 +99,7 @@ async def get_stock_screener(con,symbols):
|
|||||||
'growthOperatingExpenses': growthOperatingExpenses,
|
'growthOperatingExpenses': growthOperatingExpenses,
|
||||||
'growthOperatingIncome': growthOperatingIncome,
|
'growthOperatingIncome': growthOperatingIncome,
|
||||||
'beta': beta,
|
'beta': beta,
|
||||||
} for (symbol, name, avgVolume, change_1W, change_1M, change_3M, change_6M, change_1Y, change_3Y, sma_50, sma_200, ema_50, ema_200, rsi, atr, stoch_rsi, mfi, cci, priceToSalesRatio, priceToBookRatio, eps, pe, marketCap, revenue, netIncome, grossProfit,costOfRevenue, costAndExpenses, interestIncome, interestExpense, researchAndDevelopmentExpenses, ebitda, operatingExpenses, operatingIncome, growthRevenue, growthNetIncome, growthGrossProfit, growthCostOfRevenue, growthCostAndExpenses, growthInterestExpense, growthResearchAndDevelopmentExpenses, growthEBITDA, growthEPS, growthOperatingExpenses, growthOperatingIncome, beta) in raw_data]
|
} for (symbol, name, avgVolume, sma_50, sma_200, ema_50, ema_200, rsi, atr, stoch_rsi, mfi, cci, priceToSalesRatio, priceToBookRatio, eps, pe, marketCap, revenue, netIncome, grossProfit,costOfRevenue, costAndExpenses, interestIncome, interestExpense, researchAndDevelopmentExpenses, ebitda, operatingExpenses, operatingIncome, growthRevenue, growthNetIncome, growthGrossProfit, growthCostOfRevenue, growthCostAndExpenses, growthInterestExpense, growthResearchAndDevelopmentExpenses, growthEBITDA, growthEPS, growthOperatingExpenses, growthOperatingIncome, beta) in raw_data]
|
||||||
|
|
||||||
stock_screener_data = [{k: round(v, 2) if isinstance(v, (int, float)) else v for k, v in entry.items()} for entry in stock_screener_data]
|
stock_screener_data = [{k: round(v, 2) if isinstance(v, (int, float)) else v for k, v in entry.items()} for entry in stock_screener_data]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user