An intelligent trading assistant powered by LangChain that integrates with OpenBB for real-time market data. Supports multiple LLM providers: OpenAI, Google Gemini, and Perplexity.
- 🤖 Multi-LLM Support: Choose between OpenAI, Google Gemini, or Perplexity
- 📊 Real-time Market Data: Access stock quotes, historical data, news, and company profiles via OpenBB
- 📈 Economic Indicators: Fetch GDP, CPI, and other economic data
- 💬 Conversational Interface: Natural language queries for financial data
In order to install the application, first make sure you have git, conda installed.
Then, clone the source code from GitHub onto your local machine and navigate into the Trading-Assistant directory. Finally, use the provided environment.yaml file to create the conda environment.
git clone https://github.com/samarthiith/Trading-Assistant
cd Trading-Assistantconda env create -f envs/environment.yaml
conda activate tradingCopy the example environment file and add your API keys:
cp credentials/.env.example credentials/.envEdit .env and add your API keys:
- OpenAI: https://platform.openai.com/api-keys
- Google Gemini: https://makersuite.google.com/app/apikey
- Perplexity: https://www.perplexity.ai/settings/api
- OpenBB: https://docs.openbb.co/python/extensions/interface/openbb-api
Select the LLM model that you would like to us in the config.yaml.
Run the agent:
python agent.pyYou will see the initalization and then you can start to ask questions (taking Openai as an example):
Agent initialized with openai ✅
Type 'exit' or 'quit' to end the session.
You: What's the current price of Apple stock?
Assistant: [Agent fetches and analyzes AAPL data]
You: Get me the latest news about Tesla
Assistant: [Agent retrieves TSLA news]To run the Streamlit dashboard:
streamlit run dashboard.pyThe dashboard will open in your browser at http://localhost:8501. The app will enable you to interact in the chatbox.
The agent uses LangChain's modern architecture (post v1.0.0).
MIT License