Stock Market Pro

Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends

Stock Market Pro is a community skill for stock market analysis using Yahoo Finance data, covering price quotes, fundamental metrics, ASCII trend charts, historical data retrieval, and market indicators for investment research and analysis.

What Is This?

Overview

Stock Market Pro provides comprehensive stock market data and analysis tools powered by Yahoo Finance through the yfinance library. It covers real-time price quotes that fetch current stock prices, market caps, and trading volumes across global exchanges, fundamental metrics that provide financial ratios, earnings data, and valuation indicators for company analysis, ASCII trend charts that visualize price movements in terminal-friendly text format for quick insights, historical data retrieval that downloads historical prices and volumes for backtesting and analysis, and market indicators that calculate technical analysis metrics like moving averages and momentum signals. The skill enables traders, analysts, and AI agents to access market data programmatically for building investment strategies, tracking portfolios, and conducting financial research without expensive data subscriptions or complex API setups.

Who Should Use This

This skill serves individual investors tracking portfolios, financial analysts conducting research, and developers building trading applications and market monitoring tools.

Why Use It?

Problems It Solves

Professional market data feeds require expensive subscriptions that individual investors cannot afford or justify. Building stock analysis tools from scratch requires understanding financial APIs, data normalization, and market conventions across different exchanges. Manually tracking multiple stocks and calculating technical indicators becomes tedious and error-prone at scale. Accessing historical price data for backtesting strategies involves complex data downloads and format conversions from various fragmented sources.

Core Highlights

Quote fetcher retrieves real-time prices and market data across global exchanges. Fundamentals engine provides financial ratios, earnings, and valuation metrics. Chart generator creates ASCII visualizations for terminal display and logging. Historical downloader retrieves price and volume data for analysis.

How to Use It?

Basic Usage

from stock_market_pro import Stock

stock = Stock("AAPL")
quote = stock.get_quote()
print(f"Price: "
      f"{quote['price']}")

fundamentals = stock.get_info()
print(f"PE Ratio: "
      f"{fundamentals['pe']}")

chart = stock.ascii_chart(
    period="1mo")
print(chart)

Real-World Examples

portfolio = [
    "AAPL", "GOOGL",
    "MSFT", "TSLA"]

for ticker in portfolio:
    stock = Stock(ticker)
    quote = stock.get_quote()
    print(
        f"{ticker}: "
        f"{quote['price']} "
        f"({quote['change_pct']}%)")

stock = Stock("AAPL")
history = stock.get_history(
    period="1y",
    interval="1d")

history["MA50"] = \
    history["Close"].rolling(
        window=50).mean()

Advanced Tips

Cache quote data for short periods to avoid excessive API calls when displaying dashboards or tracking multiple securities simultaneously. Combine fundamental metrics with technical indicators to create comprehensive stock screening tools that identify investment opportunities based on quantitative criteria. Download historical data in bulk once and store locally for backtesting to reduce latency and API dependency during strategy development iterations.

When to Use It?

Use Cases

Build a portfolio tracking dashboard that monitors stock prices and calculates daily gains and losses automatically. Create automated stock screening tools that filter securities based on fundamental metrics like PE ratio and dividend yield. Develop backtesting systems that evaluate trading strategies against historical price data for performance validation.

Related Topics

Stock market APIs, financial analysis, technical indicators, portfolio management, Yahoo Finance, and quantitative trading.

Important Notes

Requirements

Network access to Yahoo Finance servers for fetching market data and price quotes. The yfinance Python library installed with dependencies for data retrieval and processing. Understanding of stock ticker symbols and market conventions for proper data requests.

Usage Recommendations

Do: implement caching to avoid rate limiting when refreshing data frequently for multiple securities simultaneously. Verify ticker symbols are valid before making API calls to prevent errors and wasted requests. Handle market holidays and trading hours appropriately since data availability varies by exchange schedule and region.

Don't: rely on free data sources for critical trading decisions without understanding potential delays and accuracy limitations. Make excessive API calls unnecessarily when cached data would suffice for your time sensitivity requirements. Assume data is real-time since free tiers typically have slight delays compared to professional feeds.

Limitations

Yahoo Finance data may have slight delays compared to professional real-time feeds used by institutional traders. Historical data quality varies by exchange and may contain gaps or errors for less liquid securities. Some advanced fundamental metrics may not be available for all companies, particularly smaller international firms.