mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-10-01 08:52:39 +03:00
docs: drop comments that narrate the next line
- about seventy '# Create/Initialize/Add ...' lines across graph, cli and dataflows, and the file-path headers; comments that give a reason stay
This commit is contained in:
@@ -180,7 +180,6 @@ def get_stock_stats_indicators_window(
|
||||
date_values.append((date_str, indicator_value))
|
||||
current_dt = current_dt - relativedelta(days=1)
|
||||
|
||||
# Build the result string
|
||||
ind_string = ""
|
||||
for date_str, value in date_values:
|
||||
ind_string += f"{date_str}: {value}\n"
|
||||
@@ -225,16 +224,13 @@ def _get_stock_stats_bulk(
|
||||
df = wrap(data)
|
||||
df["Date"] = df["Date"].dt.strftime("%Y-%m-%d")
|
||||
|
||||
# Calculate the indicator for all rows at once
|
||||
df[indicator] # This triggers stockstats to calculate the indicator
|
||||
|
||||
# Create a dictionary mapping date strings to indicator values
|
||||
result_dict = {}
|
||||
for _, row in df.iterrows():
|
||||
date_str = row["Date"]
|
||||
indicator_value = row[indicator]
|
||||
|
||||
# Handle NaN/None values
|
||||
if pd.isna(indicator_value):
|
||||
result_dict[date_str] = "N/A"
|
||||
else:
|
||||
@@ -274,7 +270,6 @@ def get_stockstats_indicator(
|
||||
|
||||
|
||||
|
||||
|
||||
def get_closes(symbol: str, start_date: str, end_date: str) -> pd.Series:
|
||||
"""Daily closes from ``start_date`` up to, not including, ``end_date``."""
|
||||
canonical = normalize_symbol(symbol)
|
||||
|
||||
Reference in New Issue
Block a user