Skip to content

iukea1/yfiance_db_cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yfiance_db_cron

main libary used

Stock Data Collector

A Python project for fetching and storing stock data using yfinance. The project sets up a local SQLite database to persist stock price history, dividends, splits, and metadata, enabling offline or reproducible analysis workflows.

Table of Contents

  1. Features
  2. Requirements
  3. Installation
  4. Usage
  5. Database Schema
  6. Project Structure
  7. Contributing
  8. License

Features

  • Data Retrieval: Fetch daily, weekly, or intraday stock data from Yahoo Finance via yfinance.
  • SQLite Storage: A structured database schema to store stock metadata, price history, dividends, splits, etc.
  • Configurable: Easily extend or modify the schema and scripts to suit specific trading or analytical needs.
  • Secure & Offline Analysis: By storing data locally, you reduce reliance on the network and can perform analyses offline.

Requirements

  • Python 3.8+ (Recommended 3.10+ for modern syntax and type hints)
  • yfinance
  • pandas
  • sqlite3 (built-in with Python, no separate installation needed)
  • (Optional) SQLAlchemy if you prefer an ORM approach

Install dependencies with:

pip install yfinance pandas

Thought about stock database schema design for 4 seconds

Below is an example project description, a sample README.md, and a suggested SQLite database schema that can store stock data pulled using yfinance.


Project Description

Project Name: Stock Data Collector

Overview: The Stock Data Collector project fetches historical and real-time stock data using the yfinance library and stores it into a local SQLite database. This allows users to persist stock data for analysis, backtesting, or other financial applications without relying on external APIs in real-time.

Key Features:

  1. Data Fetching: Leverages yfinance to pull daily, weekly, or intraday stock data.
  2. Database Storage: Saves fetched stock data into a well-structured SQLite database.
  3. Historical and Current Data: Supports storing both historical and updated data points, including dividends, stock splits, and more.
  4. Easy to Extend: Built with modular design so additional functionality (e.g., advanced data analytics, charting) can be added later.

Use Cases:

  • Academic or personal finance research
  • Data analysis and visualization
  • Backtesting trading strategies in Python
  • Integration with machine learning pipelines

README.md

Table of Contents

  1. Features
  2. Requirements
  3. Installation
  4. Usage
  5. Database Schema
  6. Project Structure
  7. Contributing
  8. License

Features

  • Data Retrieval: Fetch daily, weekly, or intraday stock data from Yahoo Finance via yfinance.
  • SQLite Storage: A structured database schema to store stock metadata, price history, dividends, splits, etc.
  • Configurable: Easily extend or modify the schema and scripts to suit specific trading or analytical needs.
  • Secure & Offline Analysis: By storing data locally, you reduce reliance on the network and can perform analyses offline.

Requirements

  • Python 3.8+ (Recommended 3.10+ for modern syntax and type hints)
  • yfinance
  • pandas
  • sqlite3 (built-in with Python, no separate installation needed)
  • (Optional) SQLAlchemy if you prefer an ORM approach

Install dependencies with:

pip install yfinance pandas

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published