Detect Qdrant embedding drift and verify bounded re-embedding
Compare live embeddings with stored vectors and repair an approved batch only when held-out retrieval has degraded.
Automate daily stock analysis with Kestra and OpenAI GPT-4o. Fetch Yahoo Finance data, compute RSI and momentum, log to PostgreSQL, and alert Slack.
Automate daily stock watchlist analysis with AI. This blueprint pulls 30 days of price history for a configurable list of tickers from Yahoo Finance, computes technical indicators (daily and monthly momentum, a 14-day RSI, proximity to 52-week highs and lows), then sends those signals to OpenAI GPT-4o for risk-calibrated BUY/HOLD/SELL/WATCH recommendations. Every signal is logged to PostgreSQL for backtesting and a formatted briefing is delivered to Slack before market open. It solves the problem of manually scanning a watchlist each morning by turning raw quotes into explained, confidence-scored recommendations on a reliable schedule.
market_open_daily io.kestra.plugin.core.trigger.Schedule trigger fires Monday to Friday
at 14:00 UTC (09:00 ET market open).fetch_market_data (io.kestra.plugin.core.flow.Loop with concurrencyLimit: 5) iterates the
watchlist input and runs fetch_quote (io.kestra.plugin.core.http.Request) against the Yahoo
Finance chart API for a 30-day daily range per ticker.prepare_analysis_data (io.kestra.plugin.scripts.python.Script) parses the raw quotes and computes
day and month change percentages, a 14-day RSI approximation, and 52-week levels, emitting clean
signals via Kestra.outputs.generate_ai_analysis (io.kestra.plugin.openai.ChatCompletion, model gpt-4o) consumes those
signals with a jsonResponseSchema so GPT-4o returns a strict JSON object of recommendations,
confidence scores, rationale, and risk flags, calibrated to the risk_profile input.log_to_postgres (io.kestra.plugin.jdbc.postgresql.Queries) creates the stock_analysis_log table
if needed and inserts every recommendation joined to its price metrics.send_alerts (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts the market summary
and per-ticker calls to Slack.watchlist, analysis_horizon, and risk_profile inputsA scheduled cron in a script or a standalone OpenAI call cannot coordinate multiple systems, retry a
flaky quote fetch, or keep an audit trail. Kestra runs this end to end from a declarative YAML flow:
an event-driven Schedule trigger replaces fragile crontab entries, per-task retries and bounded
Loop concurrency handle Yahoo Finance rate limits, and execution lineage links every Slack alert
back to the exact quotes, Python signals, and GPT-4o response that produced it. Neither OpenAI's API
nor a database scheduler can fan out HTTP calls, run Python, call an LLM, write to PostgreSQL, and
notify Slack as one observable, replayable pipeline.
0.20.0+ recommended)gpt-4oOPENAI_API_KEY: OpenAI API key for the ChatCompletion taskSLACK_WEBHOOK_URL: Slack incoming webhook URL for alertsPOSTGRES_URL: JDBC URL for the PostgreSQL databasePOSTGRES_USER: PostgreSQL usernamePOSTGRES_PASSWORD: PostgreSQL passwordnamespace if needed.watchlist, analysis_horizon, and risk_profile inputs to your strategy.Schedule trigger run it automatically each weekday morning.io.kestra.plugin.core.flow.Pause) before any execution step.