{"id":29642931,"url":"https://github.com/The-Swarm-Corporation/ForexTreeSwarm","last_synced_at":"2025-07-21T23:02:09.570Z","repository":{"id":268031806,"uuid":"903088952","full_name":"The-Swarm-Corporation/ForexTreeSwarm","owner":"The-Swarm-Corporation","description":"A sophisticated forex market analysis system using a swarm of specialized AI agents organized in a forest structure to provide comprehensive market insights and trading recommendations.","archived":false,"fork":false,"pushed_at":"2025-01-20T05:51:09.000Z","size":27,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T22:37:32.462Z","etag":null,"topics":["agents","ai","finance","forex","ml","multi-agent","quantitative-trading","swarms"],"latest_commit_sha":null,"homepage":"https://swarms.xyz/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/The-Swarm-Corporation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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,"zenodo":null},"funding":{"github":["kyegomez"]}},"created_at":"2024-12-13T22:20:13.000Z","updated_at":"2025-05-10T15:09:39.000Z","dependencies_parsed_at":"2024-12-13T23:22:47.147Z","dependency_job_id":"4087fdc7-916c-4a9d-a907-e88c57d88a03","html_url":"https://github.com/The-Swarm-Corporation/ForexTreeSwarm","commit_stats":null,"previous_names":["the-swarm-corporation/forextreeswarm"],"tags_count":0,"template":false,"template_full_name":"The-Swarm-Corporation/Swarms-Example-1-Click-Template","purl":"pkg:github/The-Swarm-Corporation/ForexTreeSwarm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FForexTreeSwarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FForexTreeSwarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FForexTreeSwarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FForexTreeSwarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Swarm-Corporation","download_url":"https://codeload.github.com/The-Swarm-Corporation/ForexTreeSwarm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Swarm-Corporation%2FForexTreeSwarm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266398441,"owners_count":23922460,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["agents","ai","finance","forex","ml","multi-agent","quantitative-trading","swarms"],"created_at":"2025-07-21T23:01:38.432Z","updated_at":"2025-07-21T23:02:09.555Z","avatar_url":"https://github.com/The-Swarm-Corporation.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":["💰 Financial Services \u0026 Trading"],"sub_categories":["Trading \u0026 Investment"],"readme":"\n# Forex Forest System\n\n\n[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge\u0026logo=x\u0026logoColor=white)](https://x.com/kyegomezb)\n\n\n[![GitHub stars](https://img.shields.io/github/stars/The-Swarm-Corporation/Legal-Swarm-Template?style=social)](https://github.com/The-Swarm-Corporation/Legal-Swarm-Template)\n[![Swarms Framework](https://img.shields.io/badge/Built%20with-Swarms-blue)](https://github.com/kyegomez/swarms)\n\n\n\nA sophisticated forex market analysis system using a swarm of specialized AI agents organized in a forest structure to provide comprehensive market insights and trading recommendations.\n\n## Overview\n\nThe Forex Forest System combines real-time market data collection with distributed AI analysis through a multi-layered tree structure of specialized agents. Each agent focuses on specific aspects of market analysis, working together to generate holistic trading recommendations.\n\n## System Architecture\n\n### Data Collection Layer\n\n```mermaid\nflowchart TD\n    A[ForexDataFeed] --\u003e B[ECB Rates]\n    A --\u003e C[Forex Factory]\n    A --\u003e D[Trading Economics]\n    A --\u003e E[DailyFX]\n    \n    B --\u003e F[Exchange Rates]\n    C --\u003e G[Economic Calendar]\n    D --\u003e H[Economic Indicators]\n    E --\u003e I[Market News]\n    \n    F --\u003e J[Market Data Aggregator]\n    G --\u003e J\n    H --\u003e J\n    I --\u003e J\n    \n    J --\u003e K[Forest Swarm Input]\n```\n\nThe system collects data from multiple reliable sources:\n- European Central Bank (ECB): Real-time exchange rates\n- Forex Factory: Economic calendar events\n- Trading Economics: Economic indicators and forecasts\n- DailyFX: Market news and analysis\n\n### Forest Swarm Structure\n\n```mermaid\nflowchart TD\n    subgraph \"Forest Swarm\"\n        A[Strategy Coordination Tree] --\u003e B[Technical Analysis Tree]\n        A --\u003e C[Fundamental Analysis Tree]\n        A --\u003e D[Sentiment Analysis Tree]\n        \n        subgraph \"Technical Tree\"\n            B --\u003e TA1[Price Action Analyst]\n            B --\u003e TA2[Cross Rate Analyst]\n            B --\u003e TA3[Volatility Analyst]\n        end\n        \n        subgraph \"Fundamental Tree\"\n            C --\u003e FA1[Economic Data Analyst]\n            C --\u003e FA2[News Impact Analyst]\n            C --\u003e FA3[Central Bank Analyst]\n        end\n        \n        subgraph \"Sentiment Tree\"\n            D --\u003e SA1[News Sentiment Analyst]\n            D --\u003e SA2[Risk Sentiment Analyst]\n            D --\u003e SA3[Market Positioning Analyst]\n        end\n    end\n```\n\n### Analysis Flow\n\n```mermaid\nsequenceDiagram\n    participant DF as DataFeed\n    participant TS as Technical Swarm\n    participant FS as Fundamental Swarm\n    participant SS as Sentiment Swarm\n    participant SC as Strategy Coordinator\n    \n    DF-\u003e\u003eTS: Market Data\n    DF-\u003e\u003eFS: Economic Data\n    DF-\u003e\u003eSS: News \u0026 Sentiment Data\n    \n    par Technical Analysis\n        TS-\u003e\u003eTS: Analyze Patterns\n    and Fundamental Analysis\n        FS-\u003e\u003eFS: Analyze Economics\n    and Sentiment Analysis\n        SS-\u003e\u003eSS: Analyze Sentiment\n    end\n    \n    TS-\u003e\u003eSC: Technical Signals\n    FS-\u003e\u003eSC: Fundamental Assessment\n    SS-\u003e\u003eSC: Sentiment Indicators\n    \n    SC-\u003e\u003eSC: Synthesize Analysis\n    SC-\u003e\u003e+SC: Generate Recommendations\n```\n\n## Features\n\n### Modular Agent Structure\n- Technical Analysis Tree\n  - Price action analysis\n  - Cross-rate correlations\n  - Volatility assessment\n\n- Fundamental Analysis Tree\n  - Economic data evaluation\n  - News impact analysis\n  - Central bank policy tracking\n\n- Sentiment Analysis Tree\n  - News sentiment analysis\n  - Risk sentiment monitoring\n  - Market positioning assessment\n\n- Strategy Coordination Tree\n  - Signal synthesis\n  - Risk management\n  - Position sizing\n\n### Real-time Data Processing\n- Asynchronous data collection\n- Multiple data source integration\n- Automated data validation\n- Error handling and logging\n\n### Intelligent Analysis\n- Multi-perspective market analysis\n- Cross-validation of signals\n- Risk-aware recommendations\n- Continuous market monitoring\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/forex-forest-system.git\n\n# Install dependencies\npip install -r requirements.txt\n```\n\nRequired dependencies:\n- Python 3.8+\n- aiohttp\n- beautifulsoup4\n- loguru\n- swarms\n\n## Usage\n\n```python\nfrom forex_forest import ForexForestSystem\n\nasync def main():\n    # Initialize the system\n    system = ForexForestSystem()\n    \n    # Start market monitoring\n    await system.monitor_markets(interval_seconds=300)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## Configuration\n\nThe system can be configured through environment variables:\n\n```bash\nFOREX_FOREST_LOG_LEVEL=INFO\nFOREX_FOREST_INTERVAL=300  # Analysis interval in seconds\nFOREX_FOREST_PAIRS=EUR/USD,GBP/USD,USD/JPY  # Comma-separated currency pairs\n```\n\n## Output Format\n\nThe system generates structured analysis output:\n\n```json\n{\n    \"timestamp\": \"2024-12-13T10:00:00Z\",\n    \"recommendations\": [\n        {\n            \"pair\": \"EUR/USD\",\n            \"action\": \"buy\",\n            \"confidence\": 8,\n            \"entry_points\": [1.0850, 1.0830],\n            \"stop_loss\": 1.0800,\n            \"take_profit\": 1.0900,\n            \"rationale\": \"Strong technical setup with fundamental support\"\n        }\n    ]\n}\n```\n\n## Logging\n\nThe system uses structured logging with rotation:\n- Log file: `forex_forest.log`\n- Rotation: 500 MB\n- Log level: Configurable through environment variables\n\n## Error Handling\n\nThe system implements comprehensive error handling:\n- Graceful degradation on data source failures\n- Automatic retry mechanisms\n- Detailed error logging\n- Circuit breakers for external APIs\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Swarm-Corporation%2FForexTreeSwarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThe-Swarm-Corporation%2FForexTreeSwarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Swarm-Corporation%2FForexTreeSwarm/lists"}