- Paper: MACI Framework
- Our newest version MACI support Magentic multi-agent tool.
- Our previous MACI-framework could support multi-agent tools: LangGraph, AutoGen, Crewai, LangChain, and to be extended on LlamaIndex, Haystack.
- OpenAI LLMs: including gpt-4, gpt-4o, gpt-4o-mini, etc.
- Ollama: including Llama 3.3, DeepSeek-R1, Phi-4, Mistral, Gemma 2, etc.
- Anthropic: including Claud 3.7.
- Mistral:
- LiteLLM:
- or any other OpenAI schema-compatible model
- FinAgent(ours)
- Your Self-developed LLMs(ours)
- Access to financial database such as Alphavantage, and yahoo api. adapts to unexpected changes in real-time financial information.
Large Language Models (LLMs) excel at pattern recognition but struggle with complex planning tasks that require:
- π§ Deliberate reasoning
- β³ Temporal awareness
- π Constraint management
-
β Lack of Self-Verification
- LLMs cannot validate their own outputs, leading to errors.
-
π― Attention Bias & Constraint Drift
- Contextual focus shifts, ignoring earlier constraints.
-
ποΈ Lack of Common Sense Integration
- Omits real-world constraints (e.g., logistics delays).
MACI is designed to overcome these LLM limitations using a three-layer approach:
-
ποΈ Meta-Planner (MP)
- Constructs task-specific workflows, identifying roles and constraints.
-
π€ Common & Task-Specific Agents
- Common Agents: Validate constraints & reasoning quality.
- Task-Specific Agents: Optimize domain-specific tasks.
-
π‘ Run-Time Monitor
- Adapts to unexpected changes in real-time.
-
β Lack of Self-Verification
- Independent validation agents ensure correctness.
-
π Attention Bias
- Task-specific agents with constrained context windows prevent bias.
-
π Lack of Common Sense
- Integration agents enhance real-world feasibility.
- π Spec completed, paper submitted to ICML.
- π Tested on Traveling Salesperson & Thanksgiving Dinner Planning, outperforming all LLMs, including DeepSeek.
- π Stock Prediction application designed.
- π (Sprint 1) Implementation, Experiments, First Results β
- π (Sprint 2) First App Demo (Frond-End & Back-End) β
- π§ (Sprint 3) MACI Enhancement, Second App Demo β
- π€ (Demo Day) App Integration, Paper Submission for NeurIPS, Final App Demo β
- π (1) LLM Specializatioβ : Different LLMs tailored for Stock Prediction, Company Analysis, Personal Insights, and Job Market Trends.
- π (2) Overall Architectureβ : Using MACI Framework with website, Multi-Agents selection and collaboration, to generate holistic financial and career insights.
- π (3) Agent 1 & 2β : Stock Prediction & Company Analysis: Real-time data integration, LLMs for market trends and company analysis.
- π₯ (4) Agent 3 & 4β : Investment Expert Analysis & Job Analysis: AI-driven investment, career suggestion, and matching based on market shifts.
- π (5) Milestones: Iterative development, testing, and user feedback loops.
We plan to evaluate our multi-agent temporal planning framework on S&P 500 stocks (2018-2024), incorporating historical trading data, reports data, and other relevant financial data. Our focus will be on three major market sectors.
All experiments will utilize publicly available data from sources like:
- π Yahoo Finance (Stock Prices)
- π SEC EDGAR (Financial Reports)
-
π Baseline Models:
- Traditional machine learning methods (Logistic Regression, SVM, LSTM(best), LLM, MACI(best) networks).
-
π Comparison with MACI:
- Evaluating prediction accuracy (MAE, MSE) and directional accuracy for stock movement prediction.
-
π§© Ablation Studies:
- Testing different combinations of agents and their impact on performance.
-
π Robustness & Scalability:
- Assessing performance across different market conditions and unseen stocks (out-of-sample validation).
- π Paper: Multi-Agent Collaborative Intelligence for Robust Temporal Planning β Edward Y. Chang
- π Paper: REALM-Bench: A Real-World Planning Benchmark for LLMs and Multi-Agent Systems β Longling Gloria Geng, Edward Y. Chang
- π» GitHub Setup, App Development, and Experiments β Longling Gloria Geng
It is recommended to use a virtual environment to manage dependencies:
python3 -m venv env
source env/bin/activate # On macOS/Linux
env\Scripts\activate # On WindowsEnsure you have all necessary dependencies installed:
pip install -r requirements.txtOr install manually:
pip install pandas numpy matplotlib prophetThe dataset is available on Kaggle:
π S&P 500 Stocks Dataset
Extract and place the CSV file inside the sp500_stocks/ directory:
mkdir -p sp500_stocks
mv path/to/sp500_stocks.csv sp500_stocks/Run the stock prediction script:
python3 main.pyThe script will:
β
Predict stock prices for 2 years into the future
β
Load and preprocess the stock data
β
Train a Prophet forecasting model
β
Generate & save plots showing historical vs. forecasted values
Once the script completes, youβll find the forecasted plots in the project folder:
AAPL_forecast.pngβ Forecast for AppleTSLA_forecast.pngβ Forecast for TeslaMETA_forecast.pngβ Forecast for Meta- other plots etc.
cd checkcothen open index.html
cd checkco
python3 server.pythen open front.html
cd MACI_stock_predictionthen follow README file to set up your own multi-agent framework and pipeline.
β Step 1: Run FastAPI with Uvicorn Make sure you're in the same directory as main.py and then run:
export OPENAI_API_KEY=
export...
uvicorn main:app --reloadβ Step 2: go to 127.0.0.1.8000/static/front.html
Check File Structure Your project should be organized like this:
MACI-Stock-Prediction/
βββ main.py # β
FastAPI app entry point
βββ static/ # β
HTML, CSS, and JavaScript for UI
β βββ index.html
β βββ style.css
β βββ script.js
βββ templates/ # (Optional) Jinja2 templates
βββ utils/ # β
Helper functions (e.g., API calls)
β βββ indicators.py
β βββ charts.py
βββ .env # β
API Keys
βββ requirements.txt # β
Python dependencies
βββ README.md # β
Project documentationThis README provides an overview of the CS224G MACI for Stock Prediction project, highlighting its motivations, project plan, methodologies, demo, and future directions. π