This commit is contained in:
Youssef Aitousarrah 2026-02-17 10:27:13 -08:00
parent aef83cd6e0
commit 457d650e42
4 changed files with 21 additions and 13 deletions

View File

@ -27,11 +27,13 @@ logger = get_logger(__name__)
def main():
logger.info("""
logger.info(
"""
TradingAgents - Historical Memory Builder
""")
"""
)
# Configuration
tickers = [

View File

@ -89,7 +89,8 @@ def build_strategy_memories(strategy_name: str, config: dict):
strategy = STRATEGIES[strategy_name]
logger.info(f"""
logger.info(
f"""
Building Memories: {strategy_name.upper().replace('_', ' ')}
@ -98,7 +99,8 @@ Strategy: {strategy['description']}
Lookforward: {strategy['lookforward_days']} days
Sampling: Every {strategy['interval_days']} days
Tickers: {', '.join(strategy['tickers'])}
""")
"""
)
# Date range - last 2 years
end_date = datetime.now()
@ -157,7 +159,8 @@ Tickers: {', '.join(strategy['tickers'])}
def main():
logger.info("""
logger.info(
"""
TradingAgents - Strategy-Specific Memory Builder
@ -168,7 +171,8 @@ This script builds optimized memories for different trading styles:
2. Swing Trading - 7-day returns, weekly samples
3. Position Trading - 30-day returns, monthly samples
4. Long-term - 90-day returns, quarterly samples
""")
"""
)
logger.info("Available strategies:")
for i, (name, config) in enumerate(STRATEGIES.items(), 1):
@ -216,11 +220,13 @@ This script builds optimized memories for different trading styles:
logger.info("\n" + "=" * 70)
logger.info("\n💡 TIP: To use a specific strategy's memories, update your config:")
logger.info("""
logger.info(
"""
config = DEFAULT_CONFIG.copy()
config["memory_dir"] = "data/memories/swing_trading" # or your strategy
config["load_historical_memories"] = True
""")
"""
)
if __name__ == "__main__":

View File

@ -129,10 +129,12 @@ def main():
6. Save updated positions
7. Print progress messages
"""
logger.info("""
logger.info(
"""
TradingAgents - Position Updater
""".strip())
""".strip()
)
# Initialize position tracker
tracker = PositionTracker(data_dir="data")

View File

@ -110,9 +110,7 @@ def _build_dynamic_chart(history: pd.DataFrame, timeframe: str) -> tuple[go.Figu
line=dict(color=line_color, width=2.8),
fill="tozeroy",
fillcolor=(
"rgba(34,197,94,0.18)"
if line_color == COLORS["green"]
else "rgba(239,68,68,0.18)"
"rgba(34,197,94,0.18)" if line_color == COLORS["green"] else "rgba(239,68,68,0.18)"
),
hovertemplate=f"{timeframe}<br>%{{x|%b %d, %Y}}<br>$%{{y:.2f}}<extra></extra>",
name=f"{timeframe} Focus",