yahoofi-info-signal
npx machina-cli add skill limit881010/stocks/yahoofi-info-signal --openclawYahoo Stock Analysis Skill
Overview
This skill uses Yahoo Finance (yfinance) to fetch historical stock data and calculates technical indicators to provide a snapshot analysis and trading signals.
Capabilities
- Market Data: Current price, target price, analyst rating.
- Valuation: PE, P/B, PEG, EPS.
- Financials: Margins (Gross, Operating), ROE, ROA, Debt/Equity.
- Technical Indicators:
- Moving Averages (MA10, MA20, MA50)
- MACD (Moving Average Convergence Divergence)
- RSI (Relative Strength Index)
- Volume Analysis
- Signals: Generates buy/sell/hold signals based on MA crossover, RSI levels, and MACD.
Usage
Run the analyze.py script with a ticker symbol.
Analyze a Stock
To analyze a stock (e.g., NVIDIA):
python scripts/analyze.py NVDA
To analyze a Taiwan stock (e.g., TSMC):
python scripts/analyze.py 2330.TW
Output Interpretation
The script outputs two main sections:
- Fundamental & Data Overview: A table of valuation, financial, and basic price data.
- Technical Analysis:
- Recent 10 days of price and indicator values.
- Trend Analysis: Bullish/Bearish based on MA alignment.
- Signals: MACD Golden/Death Cross, RSI Overbought/Oversold.
- Volume: Analysis of volume trends relative to 20-day average.
Requirements
- Python 3.x
yfinancepandasnumpy
(Note: Ensure these packages are installed in the environment)
Source
git clone https://github.com/limit881010/stocks/blob/main/skills/yahoofi-info-signal/SKILL.mdView on GitHub Overview
This skill uses Yahoo Finance (yfinance) to fetch historical stock data and calculate technical indicators to provide a snapshot analysis and trading signals. It outputs two main sections: Fundamental & Data Overview and Technical Analysis, encompassing current price, valuation metrics, and technical signals (MA, MACD, RSI, volume).
How This Skill Works
Run the analyze.py script with a ticker symbol (e.g., NVDA or 2330.TW). The tool fetches historical data via yfinance, computes moving averages (MA10/MA20/MA50), MACD, RSI, and volume trends, then presents a Fundamental & Data Overview alongside Technical Analysis. Signals are generated from MA crossovers, RSI levels, and MACD to indicate buy, hold, or sell recommendations.
When to Use It
- When a user asks for analysis of a specific stock ticker using Yahoo Finance (yahoofi-info-signal).
- When the user says 'yahoo stock analysis' or requests analysis via Yahoo Finance data.
- When the user mentions 'get_info' or 'signal' scripts as part of the workflow.
- When RSI, MACD, MA, or simple trend signals are requested to inform trading decisions.
- When a quick snapshot including current price, target price, analyst rating, and valuation metrics is needed.
Quick Start
- Step 1: python scripts/analyze.py <TICKER>
- Step 2: Read the output in the 'Fundamental & Data Overview' and 'Technical Analysis' sections.
- Step 3: Use MA cross, RSI, and MACD signals to decide Buy/Hold/Sell.
Best Practices
- Verify ticker and exchange format (e.g., NVDA, 2330.TW) before analysis.
- Cross-check MA cross signals with RSI levels and MACD for confirmation before acting.
- Interpret 'Trend' as Bullish or Bearish based on MA alignment as shown in the output.
- Review both the Fundamental & Data Overview and Technical Analysis sections for a complete picture.
- Ensure the runtime environment has Python 3.x, yfinance, pandas, and numpy installed.
Example Use Cases
- NVDA: Bullish MA crossover with MACD positive and RSI around 50–60.
- 2330.TW: Bearish trend indicated by MA alignment and MACD trending down.
- AAPL: RSI approaching overbought levels with MACD positive, suggesting cautious optimism.
- TSM: MACD cross turning positive with rising price and higher volume.
- MSFT: MA10 above MA20 above MA50 with neutral RSI, implying a hold decision.