Skip to content

This repository provides a robust pipeline for collecting historical options data using Python. 🌟 It efficiently stores data in PostgreSQL and serves it through a FastAPI interface. πŸ™

License

Notifications You must be signed in to change notification settings

Brandonsamura/historical_options_pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ Historical Options Pipeline

GitHub release GitHub issues GitHub forks GitHub stars

Welcome to the Historical Options Pipeline repository! This project aims to provide a robust framework for collecting, processing, and analyzing historical options data. With a focus on usability and performance, this pipeline will help you delve into the world of financial data and quantitative finance.

Table of Contents

  1. Overview
  2. Features
  3. Getting Started
  4. Installation
  5. Usage
  6. Data Ingestion
  7. Data Pipeline
  8. API Server
  9. Contributing
  10. License
  11. Releases

Overview

The Historical Options Pipeline serves as a comprehensive tool for those interested in analyzing options data. It allows users to gather data from various sources, process it, and make it accessible for further analysis. This project is built using Python and integrates with PostgreSQL for data storage.

Features

  • Data Ingestion: Efficiently gather options data from multiple APIs.
  • Data Pipeline: Process and transform data into a usable format.
  • API Server: Serve processed data through a RESTful API.
  • Time-Series Analysis: Analyze historical trends in options data.
  • Open Interest Tracking: Monitor open interest in various options contracts.
  • User-Friendly: Designed for ease of use, even for those new to quantitative finance.

Getting Started

To get started with the Historical Options Pipeline, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Brandonsamura/historical_options_pipeline.git
  2. Navigate to the project directory:

    cd historical_options_pipeline
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. Set up your PostgreSQL database. Make sure to create a database and user with the appropriate permissions.

Installation

To install the Historical Options Pipeline, ensure you have Python 3.7 or higher installed on your system. Follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Brandonsamura/historical_options_pipeline.git
  2. Navigate to the Directory:

    cd historical_options_pipeline
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Database Setup: Create a PostgreSQL database and configure the connection settings in the config.py file.

Usage

Once you have installed the Historical Options Pipeline, you can start using it. The main script can be run as follows:

python main.py

This will initiate the data ingestion process and set up the API server. You can access the API at http://localhost:5000.

Data Ingestion

The data ingestion module is responsible for collecting options data from various sources. This module can be configured to pull data from different APIs, including but not limited to:

  • Alpha Vantage
  • Yahoo Finance
  • Interactive Brokers

You can customize the ingestion settings in the ingestion.py file.

Example Configuration

API_KEY = 'your_api_key'
SOURCE = 'Alpha Vantage'

Data Pipeline

The data pipeline processes the ingested data and transforms it into a structured format suitable for analysis. This involves cleaning the data, handling missing values, and organizing it into time-series format.

Key Steps in the Pipeline

  1. Data Cleaning: Remove duplicates and handle missing data.
  2. Data Transformation: Convert raw data into a structured format.
  3. Time-Series Formatting: Organize data into time-series for analysis.

API Server

The API server provides access to the processed data. It is built using Flask and allows users to query options data through RESTful endpoints.

Available Endpoints

  • GET /options: Retrieve all options data.
  • GET /options/: Retrieve options data for a specific symbol.
  • GET /open_interest: Retrieve open interest data.

Example Request

curl http://localhost:5000/options/AAPL

Contributing

We welcome contributions to the Historical Options Pipeline! If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/your-feature
  3. Make your changes and commit them:
    git commit -m "Add your message"
  4. Push to the branch:
    git push origin feature/your-feature
  5. Create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

For the latest releases, please visit this link. You can download the latest version and execute it as per the instructions provided in the repository.

If you encounter any issues or need further assistance, check the "Releases" section for updates and information.


Thank you for your interest in the Historical Options Pipeline! We hope this project helps you in your financial data analysis endeavors.

About

This repository provides a robust pipeline for collecting historical options data using Python. 🌟 It efficiently stores data in PostgreSQL and serves it through a FastAPI interface. πŸ™

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages