Build to simplify complex financial data and help you make smarter decisions, faster.
- Launch the application by following the installation instructions or using Docker Compose (see below).
- Access the web interface at http://localhost:3000.
- In the chat box, enter your questions about stocks, for example:
- "What will be Google's closing price tomorrow?"
- "Predict Tesla's stock using LSTM with 3 years of data."
- "Forecast Amazon's price for next week."
- The assistant will respond with analysis, predictions, and interactive charts.
- You can query different companies, models, and time periods.
- AI-powered financial assistant
- Real-time stock predictions using various Probabilistic, Deep Learning and Timeseries-Forecasting models
- Volatility models for measuring risk
- Checking for overbought or oversale behavior in stocks
- Interactive stock visualization
- Chat interface for natural language queries
Several models were used for achieving this task. These are:
Probabilistic models:
- ARIMA
- Hidden Markov Model
- Kalman Filter
Deep Learning models:
- Long-Short Term Memory (LSTM)
Time Series models:
- Facebook Prophet (FBProphet)
- Generalized Autoregressive Conditional Heteroskedasticity Model (GARCH)
- XGBoost model for volatility
- RSI index
Supervised machine learning algorithms were implemented for classification tasks to reach a "consensus" between models and predict with high truth if the stock will be up or down. These models include:
- Logistic Regression
- XGBoost
- Random Forest
- LightGBM
- CatBoost
- AdaBoost
The application consists of two main components:
-
Python Backend
- LangChain-based AI agent with quantitative analysis tools
- FastAPI server exposing the agent as an API
- Connects to MCP (Model Context Protocol) servers for various prediction models
-
Next.js Frontend
- Modern React UI with Assistant UI components
- Stock visualization with Recharts
- Real-time chat interface
- Python 3.10+
- Node.js 18+
- npm or yarn
-
Install Python dependencies
# Create a virtual environment (optional but recommended) python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies pip install -r requirements.txt -
Install JavaScript dependencies
cd frontend npm install
-
Start the MCP server
poetry run python -m src.mcp.main -
Start the FastAPI server
poetry run python -m src.main -
Start the Next.js frontend
cd app npm start -
Visit http://localhost:3000 to use the application
You can ask the assistant questions about stocks, such as:
- "What will be the closing price for Google stock tomorrow?"
- "Can you predict Tesla stock using LSTM with 3 years of data?"
- "Forecast Amazon stock price for next week"
In order to use Bro on your local machine, you must create a .env file and set the GEMINI_API_KEY=api_key variable. For the development of this project, we used a free trial Gemini API key. We want you to be able to use it as well, so we've created a new Gemini API key with a free trial (note: this means only a limited number of questions and attempts are allowed before reaching the token limit). However, it is perfectly suitable for trying out Bro. The api key is: `AIzaSyDOqUQzvkNoDPgFZVggPTTa55eXvAZhP9Y, we provide you this in order to test it easily.
We know this seems unsafe, but it is only for community use.
As we mentioned, Bro was built using several scientific research papers where different models were tried and proven. You can find them in the references. directory.
The assistant will use the appropriate prediction model and display the results in both text form and as visualizations in the chart area.
