Skip to content

Commit

Permalink
mark not available valuation data as N/A
Browse files Browse the repository at this point in the history
  • Loading branch information
JackZhao516 committed Jan 6, 2025
1 parent deae18d commit cefc38c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _parallel_get_stocks_valuation_score(self, stocks: List[StockSymbol]) -> Non
"""
stocks = [stock for stock in stocks if stock not in self._stocks_valuation_score]
valuation_scores_res = []
step = len(stocks) // 8
step = len(stocks) // 8 + 1
with ThreadPoolExecutor(max_workers=8) as executor:
for i in range(8):
valuation_scores_res.append(executor.submit(self.get_stocks_valuation_score, stocks[i*step:(i+1)*step]))
Expand Down
2 changes: 1 addition & 1 deletion smrti_quant_alerts/stock_crypto_api/stock_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def get_stocks_valuation_score(self, stock_list: List[StockSymbol]) -> Dict[Stoc
estimate.get("estimatedRevenueAvg", 0) / revenue[stock].float_data - 1,
FinancialDataType.FLOAT)
break
res = defaultdict(FinancialMetricsData)
res = defaultdict(lambda: "2025 Revenue Prediction N/A")
for stock in stock_list:
if gross_profits[stock] == 0 or enterprise_values[stock] == 0 or estimated_revenue_growth[stock] == 0:
continue
Expand Down

0 comments on commit cefc38c

Please sign in to comment.