MarketMind leverages knowledge graphs to map complex dependencies and entity relationships in financial markets, enabling a human-like understanding of market movements. Unlike traditional analysis, it uncovers hidden network effects, supply chain dependencies, and sentiment-driven trends. By applying graph algorithms, MarketMind enhances event impact analysis, reduces noise, and improves predictive insights—transforming how markets are understood and analyzed.
See here for my full technical demo!
Shows raw system capabilities and data analysis:
# Example: Analyze iPhone 15 launch impact across supply chain
event_impact = tool.run("event_impact: ticker=AAPL, event_date=2023-09-12, window=5")
supply_chain = tool.run("supply_chain_impact: ticker=AAPL, depth=2")Traditional market analysis treats stocks as isolated entities, analyzing price movements in a vacuum. But markets are deeply interconnected - a chip shortage in Taiwan can impact iPhone sales, which affects hundreds of suppliers. I've built trading algorithms before, which told me about how markets were moving, but never actually why - I wanted to create a system that could derive a human-like understanding of markets. MarketMind uses graph database technology to map these complex relationships and predict cascade effects across markets.
Knowledge graphs are an incredibly rich representation of data for any machine learning system to derive semantic undestanding, engendering immensely practical applications including the reduction of hallcuination in LLMs, more accurate information retrieval for applications such as RAG, and many more!
Key differentiators:
- Supply Chain Mapping: Automatically identifies and quantifies supplier relationships
- Event Impact Analysis: Measures how events (like product launches) ripple through related companies
- Sentiment Integration: Combines news sentiment with price data to spot early warning signs
- Network Effects: Uses graph algorithms to find hidden dependencies traditional analysis misses
Uses CrewAI and GPT-4 for intelligent market insights:
# Example: AI analysis of supply chain impacts
crew = Crew(
agents=[market_analyst],
tasks=[analysis_task],
process=Process.sequential
)
result = crew.kickoff()- Python 3.8+
- Neo4j Database (Community Edition is fine)
- News API Key (for sentiment analysis)
- SEC API Key (for financial data)
- OpenAI API Key (for AI-powered analysis)
# Clone the repository
git clone https://github.com/[your-username]/market_mind.git
cd market_mind
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the project root:
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password
NEWS_API_KEY=your_news_api_key
SEC_API_KEY=your_sec_api_key
OPENAI_API_KEY=your_openai_key # Required for demo.py- Download and install Neo4j
- Create a new database
- Set password to match your .env file
- Start the database server
# Make sure your virtual environment is activated
PYTHONPATH=. python3 data_ingestion/ingest_data.py# Technical feature demonstration
PYTHONPATH=. python3 demo_features.py
# AI-powered analysis
PYTHONPATH=. python3 demo.pymarket_mind/
├── data_ingestion/ # Data collection and graph building
│ ├── __init__.py
│ ├── graph_builder.py # Graph database population
│ └── ingest_data.py # Main ingestion script
├── knowledge_graph/ # Core analysis tools
│ ├── __init__.py
│ ├── graph_interface.py # Neo4j interface
│ └── query_tools.py # Analysis methods
├── demo_features.py # Technical feature demonstration
├── demo.py # AI-powered analysis demo
├── test_connections.py # Connection testing
└── requirements.txt
- Maps supplier relationships
- Quantifies relationship strengths
- Tracks cascading effects
- Analyzes price relationships
- Identifies leading indicators
- Spots divergences
- Real-time news processing
- Sentiment scoring
- Event impact analysis
- Pre/post event comparison
- Volume analysis
- Supply chain effects
- Complex pattern recognition
- Natural language queries
- Automated market research
- Historical comparisons
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.