{"id":26661326,"url":"https://github.com/louisbrulenaudet/pizzly","last_synced_at":"2025-04-11T17:22:41.253Z","repository":{"id":277872221,"uuid":"932370632","full_name":"louisbrulenaudet/pizzly","owner":"louisbrulenaudet","description":"Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️","archived":false,"fork":false,"pushed_at":"2025-03-26T22:04:49.000Z","size":3641,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T11:51:11.642Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pizzly/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louisbrulenaudet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"louisbrulenaudet"}},"created_at":"2025-02-13T20:00:46.000Z","updated_at":"2025-03-26T22:04:52.000Z","dependencies_parsed_at":"2025-02-16T18:27:57.979Z","dependency_job_id":"5b0a8972-c792-48da-8577-5ffffd94d55e","html_url":"https://github.com/louisbrulenaudet/pizzly","commit_stats":null,"previous_names":["louisbrulenaudet/agentic-market-tool","louisbrulenaudet/pizzly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fpizzly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fpizzly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fpizzly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisbrulenaudet%2Fpizzly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louisbrulenaudet","download_url":"https://codeload.github.com/louisbrulenaudet/pizzly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447991,"owners_count":21105216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2025-03-25T13:16:24.480Z","updated_at":"2025-04-11T17:22:41.239Z","avatar_url":"https://github.com/louisbrulenaudet.png","language":"Python","funding_links":["https://github.com/sponsors/louisbrulenaudet"],"categories":[],"sub_categories":[],"readme":"![Plot](https://github.com/louisbrulenaudet/pizzly/blob/main/assets/thumbnail.png?raw=true)\n\n# Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Maintainer](https://img.shields.io/badge/maintainer-@louisbrulenaudet-blue) ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg) ![Code Style](https://img.shields.io/badge/code%20style-ruff-000000.svg) ![Package Manager](https://img.shields.io/badge/package%20manager-uv-purple.svg)\n\nThis 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.\n\nThe 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.\n\nMarket 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.\n\nThe 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.\n\n## Implementation Guide\n\n### Installation\n\nInstall the package using pip:\n\n```bash\npip install pizzly\n```\n\n# Usage\n\nFirst, set up your API credentials as environment variables:\n\n```bash\nexport ALPACA_API_KEY=your_alpaca_api_token\nexport ALPACA_API_SECRET=your_alpaca_api_secret\nexport HF_TOKEN=your_hf_token\n```\n\nThen use Pizzly like this:\n\n```python\nfrom smolagents import DuckDuckGoSearchTool, HfApiModel\nfrom smolagents.agents import ToolCallingAgent\n\nfrom pizzly.data.alpaca import AlpacaStock\nfrom pizzly.tools import FinancialTool\n\nmodel = HfApiModel(\n    \"meta-llama/Llama-3.3-70B-Instruct\",\n    token=hf_token\n)\n\ndata_provider = AlpacaStock(api_key, secret_key)\nmarket_analysis_tool = FinancialTool(data_provider=data_provider)\n\nsearch_tool = DuckDuckGoSearchTool()\n\nagent = ToolCallingAgent(\n    tools=[\n        market_analysis_tool,\n        search_tool\n    ],\n    model=model\n)\n\nprompt = f\"\"\"Please give me a detailed analysis of the market conditions for NVDA.\nInclude:\n- Technical indicators (RSI, Bollinger Bands) using financial_tool\n- Current news sentiment\n- PE ratio comparison with industry\n- Market trend analysis\nThe date of the day is {datetime.now().strftime(\"%Y-%m-%d\")}.\"\"\"\n\nagent_output = agent.run(\n    prompt\n)\n```\n\n## Development\n### Prerequisites\n\n- Python 3.10 or higher\n- [uv](https://github.com/astral-sh/uv) for package management\n\n### Setting up the development environment\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/louisbrulenaudet/pizzly\ncd pizzly\n```\n\n2. Initialize the development environment:\n```bash\nmake init\n```\n\n## Citing this project\nIf you use this code in your research, please use the following BibTeX entry.\n\n```BibTeX\n@misc{louisbrulenaudet2025,\n\tauthor = {Louis Brulé Naudet},\n\ttitle = {Pizzly, financial market analysis combining technical indicators with LLMs, featuring real-time data processing and AI-powered market insights ⚡️},\n\thowpublished = {\\url{https://github.com/louisbrulenaudet/pizzly}},\n\tyear = {2025}\n}\n```\n\n## Feedback\nIf you have any feedback, please reach out at [louisbrulenaudet@icloud.com](mailto:louisbrulenaudet@icloud.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrulenaudet%2Fpizzly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisbrulenaudet%2Fpizzly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrulenaudet%2Fpizzly/lists"}