Metadata-Version: 2.3
Name: quantstream
Version: 0.0.1
Summary: 'QuantStream' is a Python library for financial data analysis and visualization.
Author: quantstream
License: The MIT License (MIT)
        Copyright (c) 2024 quantstream
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
        DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
        OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
        OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: matplotlib>=3.8.4
Requires-Dist: mplfinance>=0.12.10b0
Requires-Dist: nbformat>=5.10.4
Requires-Dist: numpy>=1.26.4
Requires-Dist: pandas>=2.2.1
Requires-Dist: plotly>=5.22.0
Requires-Dist: polars>=0.20.25
Requires-Dist: pypdf>=4.2.0
Requires-Dist: pytest>=8.2.2
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.26.0
Requires-Dist: rich>=13.7.1
Requires-Dist: typer[all]>=0.9.0
Requires-Dist: xarray>=2024.2.0
Provides-Extra: dev
Requires-Dist: bandit>=1.7.1; extra == 'dev'
Requires-Dist: black>=24.3.0; extra == 'dev'
Requires-Dist: click>=8.1.7; extra == 'dev'
Requires-Dist: coverage-badge>=1.1.0; extra == 'dev'
Requires-Dist: coverage>=7.4.4; extra == 'dev'
Requires-Dist: darglint>=1.8.1; extra == 'dev'
Requires-Dist: ipykernel>=6.29.4; extra == 'dev'
Requires-Dist: isort[colors]>=5.10.1; extra == 'dev'
Requires-Dist: mypy-extensions>=1.0.0; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pre-commit>=3.6.2; extra == 'dev'
Requires-Dist: pydocstyle>=6.1.1; extra == 'dev'
Requires-Dist: pylint>=3.1.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-html>=4.1.1; extra == 'dev'
Requires-Dist: pytest>=8.1.1; extra == 'dev'
Requires-Dist: pyupgrade>=3.15.1; extra == 'dev'
Requires-Dist: requests-mock>=1.11.0; extra == 'dev'
Requires-Dist: ruff>=0.0.276; extra == 'dev'
Description-Content-Type: text/markdown


# **QuantStream**

QuantStream is a Python-based financial modeling platform designed to interact with real-time financial data via APIs, including the Financial Modeling Prep (FMP) API. The platform provides tools for model training, real-time data integration, and visualization.

## **Features**
- **API Wrapper**: Integration with the FMP API for fetching financial data.
- **Model Training**: Train models using financial data directly within the platform.
- **Real-time Visualization**: Display and interact with real-time financial data.
- **Data Export**: Download financial data in various formats such as CSV.
- **Extensible Architecture**: Easily add new models or financial data providers.

## **Installation**

### **Requirements**
- Python 3.11 or higher
- `uv` package for environment and dependency management
- `ruff` for linting

### **Setup**

1. Clone the repository:

   ```bash
   git clone https://github.com/yourusername/quantstream.git
   cd quantstream
   ```

2. Install `uv` and sync dependencies:

   ```bash
   curl -sSL https://install.astral.sh | sh
   uv sync --all-extras --dev
   ```

3. Set up the environment variable for your API key:

   ```bash
   export FMP_API_KEY=your_api_key_here
   ```

4. Run the application:

   ```bash
   uv run python -m quantstream
   ```

## **Usage**

### **Train a Model**

```bash
uv run python -m quantstream.train_model --symbol AAPL --model linear
```

This command trains a linear model for Apple Inc. using real-time financial data.

### **Get Real-Time Data**

```bash
uv run python -m quantstream.fetch_data --symbol AAPL
```

Fetches the latest financial data for Apple Inc. from the FMP API.

### **Visualize Data**

The platform comes with visualization tools for real-time financial data. You can run the visualization module using:

```bash
uv run python -m quantstream.visualize --symbol AAPL
```

## **Development Workflow**

### **Code Style and Linting**

We use `ruff` for code linting. You can check for any style issues by running:

```bash
uv run ruff check .
```

### **Running Tests**

Tests are managed using `pytest`. You can run all tests with:

```bash
uv run pytest tests/
```

### **Pre-commit Hooks**

This project uses `pre-commit` hooks to enforce code quality. Install the hooks by running:

```bash
pre-commit install
```

## **Contributing**

We welcome contributions! Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file for guidelines.

## **License**

This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
