# What Programming Languages Are Used in daily_stock_analysis?

> Discover the programming languages behind the daily_stock_analysis repository. Learn how Python, TypeScript, JavaScript, and more power its development.

- Repository: [mumu/daily_stock_analysis](https://github.com/ZhuLinsen/daily_stock_analysis)
- Tags: getting-started
- Published: 2026-04-30

---

**The daily_stock_analysis repository is primarily built with Python for backend data processing and API services, TypeScript and JavaScript for React and Electron frontends, and utilizes Shell scripts, YAML configurations, and Markdown documentation to support the full development lifecycle.**

The daily_stock_analysis project hosted on GitHub is a polyglot stock analysis platform that combines quantitative data processing with modern user interfaces. Understanding the programming languages used in daily_stock_analysis reveals a deliberate architecture that pairs Python's data science ecosystem with TypeScript-based frontend frameworks. This technology stack supports everything from scheduled market data fetching to interactive trading strategy visualization.

## Python: The Backend and Analysis Engine

Python serves as the dominant language for core business logic, data pipelines, and API services. The backend leverages **FastAPI** for web services and relies on the yfinance library for market data retrieval.

### Key Python Components

- **[`main.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/main.py)**: The CLI entry point that orchestrates analysis workflows, scheduling, and server start-up
- **[`api/app.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/api/app.py)**: FastAPI application definition exposing REST endpoints
- **[`data_provider/yfinance_fetcher.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/data_provider/yfinance_fetcher.py)**: Production data fetcher interfacing with Yahoo Finance
- **[`tests/test_main_schedule_mode.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/tests/test_main_schedule_mode.py)**: pytest suite validating scheduled execution logic

### Python Data Fetcher Implementation

```python

# example: data_provider/simple_fetcher.py

import yfinance as yf

def fetch_price(symbol: str) -> float:
    """Return the latest close price for a ticker."""
    ticker = yf.Ticker(symbol)
    return ticker.info["regularMarketPrice"]

```

*The production implementation resides in [`data_provider/yfinance_fetcher.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/data_provider/yfinance_fetcher.py), which handles real-time market data acquisition.*

## TypeScript and JavaScript: Frontend and Desktop Interfaces

The project delivers user experiences through two distinct frontend implementations: a web application built with React and Vite, and a desktop wrapper using Electron.

### Web Frontend (TypeScript)

The `apps/dsa-web` directory contains a modern React application utilizing TypeScript for type-safe component development. Key files include:

- **[`apps/dsa-web/vite.config.ts`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-web/vite.config.ts)**: Vite build configuration
- **[`apps/dsa-web/src/utils/validation.ts`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-web/src/utils/validation.ts)**: Input validation utilities
- **[`apps/dsa-web/src/hooks/useAuth.ts`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-web/src/hooks/useAuth.ts)**: Authentication state management

### Desktop Application (JavaScript)

The Electron wrapper in `apps/dsa-desktop` uses JavaScript to bridge the web UI with native desktop capabilities. The entry point at **[`apps/dsa-desktop/main.js`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-desktop/main.js)** bootstraps the application window and manages the Node.js runtime environment.

### React Hook Example

```typescript
// example: apps/dsa-web/src/hooks/useAuth.ts
import { useState, useEffect } from "react";
import { getAuthStatus } from "@/api/auth";

export function useAuth() {
  const [loggedIn, setLoggedIn] = useState<boolean>(false);

  useEffect(() => {
    getAuthStatus().then((res) => setLoggedIn(res.ok));
  }, []);

  return loggedIn;
}

```

*This hook demonstrates the TypeScript patterns used throughout the web interface for managing asynchronous state.*

## Infrastructure and Configuration Languages

Beyond application code, daily_stock_analysis employs specialized languages for automation, configuration, and documentation.

### Shell and PowerScript Automation

- **[`scripts/ci_gate.sh`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/scripts/ci_gate.sh)**: Bash script executing linting, static analysis, and test collection
- **`scripts/run-desktop.ps1`**: Windows-specific PowerShell runner for desktop application deployment
- **[`scripts/generate_stock_index.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/scripts/generate_stock_index.py)**: Python script invoked from Shell contexts

### Configuration Files

- **YAML**: Trading strategy definitions in [`strategies/ma_golden_cross.yaml`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/strategies/ma_golden_cross.yaml) and LLM configurations in [`litellm_config.example.yaml`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/litellm_config.example.yaml)
- **TOML**: Project metadata and Python dependencies declared in [`pyproject.toml`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/pyproject.toml)
- **JSON**: Tool metadata in [`opencode.json`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/opencode.json) and package configurations

### Documentation

Project documentation including [`README.md`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/README.md), [`docs/CHANGELOG.md`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/docs/CHANGELOG.md), and [`docs/full-guide.md`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/docs/full-guide.md) uses **Markdown** for developer onboarding, API references, and change tracking.

## Summary

- **Python** powers the backend data fetching, analysis pipelines, and FastAPI server in files like [`main.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/main.py) and [`api/app.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/api/app.py)
- **TypeScript** drives the React-based web frontend with modern tooling configured in [`apps/dsa-web/vite.config.ts`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-web/vite.config.ts)
- **JavaScript** enables the Electron desktop wrapper through [`apps/dsa-desktop/main.js`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-desktop/main.js)
- **Shell** and **PowerShell** scripts automate CI gates and platform-specific build processes
- **YAML**, **TOML**, and **Markdown** handle configuration, dependency management, and documentation throughout the repository

## Frequently Asked Questions

### Is daily_stock_analysis primarily a Python project?

While Python handles the majority of backend logic including data fetching and analysis, the repository is architecturally a polyglot project. According to the source code, Python dominates the core engine (in [`data_provider/yfinance_fetcher.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/data_provider/yfinance_fetcher.py) and [`api/app.py`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/api/app.py)), but TypeScript and JavaScript are essential for the user-facing components, making it a full-stack rather than purely Pythonic codebase.

### What frontend framework does daily_stock_analysis use?

The project employs **React** with **Vite** for the web frontend, as evidenced by the TypeScript configuration in [`apps/dsa-web/vite.config.ts`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-web/vite.config.ts). Additionally, an **Electron** wrapper in [`apps/dsa-desktop/main.js`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/apps/dsa-desktop/main.js) enables the web application to run as a standalone desktop application using JavaScript for the native shell.

### How are trading strategies configured in the daily_stock_analysis repository?

Trading strategies are defined using **YAML** configuration files. The repository includes examples such as [`strategies/ma_golden_cross.yaml`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/strategies/ma_golden_cross.yaml), which specifies moving average crossover parameters. These YAML files are consumed by the Python backend to execute algorithmic trading logic without modifying source code.

### Where is the CI/CD logic implemented in daily_stock_analysis?

Continuous integration gates are implemented as **Shell** scripts, specifically [`scripts/ci_gate.sh`](https://github.com/ZhuLinsen/daily_stock_analysis/blob/main/scripts/ci_gate.sh), which executes linting and test collection. For Windows environments, PowerShell scripts like `scripts/run-desktop.ps1` handle platform-specific automation tasks, demonstrating a cross-platform approach to DevOps scripting.