GitHub Actions runs Energy_update_prices.py daily. It fetches live prices, 1D/1W/1M/YTD returns, P/E, short interest, analyst scores and up to 5 recent headlines with sentiment scores for all 20 energy stocks via Yahoo Finance.
Before ranking, the model is directed to search online for the latest news on the top 10 highest-momentum stocks — surfacing oil price moves, OPEC+ decisions, LNG contract wins, refining margin data, renewable energy capacity additions and earnings beats.
Energy_generate_signals_local.py sends the full dataset to deepseek/deepseek-v4-flash via OpenRouter with the web search plugin enabled. The model scores each stock across momentum, fundamentals, analyst consensus and live news sentiment, then returns a ranked top 10 in JSON.
The full pipeline runs automatically every Monday, Wednesday and Friday. You can also trigger it manually from the GitHub Actions tab, or run python Energy_generate_signals_local.py locally to generate fresh signals on demand.