https://github.com/louisbrulenaudet/pizzly
Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️
https://github.com/louisbrulenaudet/pizzly
agent agentic-ai ai alpaca alpaca-trading-api artificial-intelligence duckduckgo finance financial-analysis huggingface huggingface-transformers llm nlp polars polars-dataframe python smolagents stock-market
Last synced: about 1 month ago
JSON representation
Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️
- Host: GitHub
- URL: https://github.com/louisbrulenaudet/pizzly
- Owner: louisbrulenaudet
- License: apache-2.0
- Created: 2025-02-13T20:00:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-26T22:04:49.000Z (about 2 months ago)
- Last Synced: 2025-04-01T11:51:11.642Z (about 1 month ago)
- Topics: agent, agentic-ai, ai, alpaca, alpaca-trading-api, artificial-intelligence, duckduckgo, finance, financial-analysis, huggingface, huggingface-transformers, llm, nlp, polars, polars-dataframe, python, smolagents, stock-market
- Language: Python
- Homepage: https://pypi.org/project/pizzly/
- Size: 3.47 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️
[](https://opensource.org/licenses/Apache-2.0)    This agentic market analysis system is a Python-based framework that combines technical analysis with artificial intelligence to provide comprehensive market insights. At its core, the system implements a modular architecture that seamlessly integrates statistical analysis methods with natural language processing capabilities.
The system's foundation is built upon two primary technical indicators: the Relative Strength Index (RSI) and Bollinger Bands. The RSI implementation provides momentum analysis through a configurable calculation window (default: 14 periods), employing dynamic gain/loss computation and rolling averages to measure the velocity and magnitude of price movements. This is complemented by a Bollinger Bands implementation that utilizes Simple Moving Averages (SMA) and dynamic standard deviation calculations to create adaptive volatility bands that automatically adjust to market conditions.
Market data acquisition is handled through an integration with the Alpaca API, providing access to historical price data across various timeframes. The system employs Polars for high-performance data manipulation, leveraging its columnar storage format and lazy evaluation capabilities to efficiently process large datasets.
The AI integration layer bridges technical analysis with natural language processing using the Qwen2.5-72B-Instruct model via the Hugging Face API. This enables sophisticated market analysis by combining traditional technical indicators with real-time news sentiment analysis through DuckDuckGo search integration.
## Implementation Guide
### Installation
Install the package using pip:
```bash
pip install pizzly
```# Usage
First, set up your API credentials as environment variables:
```bash
export ALPACA_API_KEY=your_alpaca_api_token
export ALPACA_API_SECRET=your_alpaca_api_secret
export HF_TOKEN=your_hf_token
```Then use Pizzly like this:
```python
from smolagents import DuckDuckGoSearchTool, HfApiModel
from smolagents.agents import ToolCallingAgentfrom pizzly.data.alpaca import AlpacaStock
from pizzly.tools import FinancialToolmodel = HfApiModel(
"meta-llama/Llama-3.3-70B-Instruct",
token=hf_token
)data_provider = AlpacaStock(api_key, secret_key)
market_analysis_tool = FinancialTool(data_provider=data_provider)search_tool = DuckDuckGoSearchTool()
agent = ToolCallingAgent(
tools=[
market_analysis_tool,
search_tool
],
model=model
)prompt = f"""Please give me a detailed analysis of the market conditions for NVDA.
Include:
- Technical indicators (RSI, Bollinger Bands) using financial_tool
- Current news sentiment
- PE ratio comparison with industry
- Market trend analysis
The date of the day is {datetime.now().strftime("%Y-%m-%d")}."""agent_output = agent.run(
prompt
)
```## Development
### Prerequisites- Python 3.10 or higher
- [uv](https://github.com/astral-sh/uv) for package management### Setting up the development environment
1. Clone the repository:
```bash
git clone https://github.com/louisbrulenaudet/pizzly
cd pizzly
```2. Initialize the development environment:
```bash
make init
```## Citing this project
If you use this code in your research, please use the following BibTeX entry.```BibTeX
@misc{louisbrulenaudet2025,
author = {Louis Brulé Naudet},
title = {Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️},
howpublished = {\url{https://github.com/louisbrulenaudet/pizzly}},
year = {2025}
}
```## Feedback
If you have any feedback, please reach out at [[email protected]](mailto:[email protected]).