Inspiration

The inspiration for our AI-powered financial chatbot stemmed from a growing need in the financial world: accessibility to real-time, actionable insights . As individual investors and analysts increasingly rely on data-driven decisions, the complexity of financial research tools often creates barriers to entry. We envisioned a solution that could democratize access to stock research by combining structured financial metrics with qualitative sentiment analysis.

We also drew inspiration from the rise of conversational AI in industries like customer service and healthcare. Why not bring this innovation to finance?

What it does

Our project is an AI-powered financial research tool :

  1. Real-Time Stock Research :

    • Fetches key financial data (e.g., Market Cap, P/E Ratio, Revenue, EBITDA, Net Income) for any given stock ticker symbol using APIs like Alpha Vantage .
      • It calculates derived metrics such as Enterprise Value (EV), EV/Sales, and EV/EBITDA to provide deeper insights into a company’s valuation.
  2. News Sentiment Analysis:

    • Using NewsAPI , the agent aggregates recent news articles related to the stock ticker symbol.
    • It performs basic sentiment analysis on articles by identifying positive or negative keywords and assigns a sentiment score (Positive, Negative, or Neutral).
    • This helps users gauge market perception and potential impacts on stock performance.
  3. Interactive Dashboard : Interactive dashboard accessible via a Salesforce Digital Experience site (investment Portal) , providing a seamless user interface for financial research with graphics.

    • Financial metrics (e.g., Price, Market Cap, Revenue, Debt, Cash).
    • Derived metrics (e.g., EV/Sales, EV/EBITDA).
    • News headlines with sentiment analysis.

How we built it

Building the agent was methodical :

  1. Research and Planning : Conducted market research to identify pain points in financial research tools. Explored APIs like Alpha Vantage, NewsAPI, and Salesforce Embedded Service to understand their capabilities.
  2. Development Process :
    • Used Apex methods (FinancialDataService,ReportService, ReportingService) to fetch and process financial data from different APIs.
    • Integrated NewsAPI for sentiment analysis, enhancing the depth of insights provided to users.
    • Built reports and an interractive Dashboard from Salesforce buit-in tools
    • Built a Lightning Web Component (FinancialMetricsDashboard) for displaying dashboard into the digital site using Apex, Javascript and CSS. The component connects to ReportingService Apex class.
    • Built a Lightning Web Component (ReportDashboard) for displaying existing stock researches by ticker symbol, instead of connecting to APIs to retrieve the same informations. LWC component is built using Apex, Javascript and CSS, and connect to ReportService Apex class to retrieve data.
  3. Testing and Iteration : Conducted rigorous testing to ensure data accuracy and system reliability. For example NewsAPI was retrieving news from around the word with different languages. I fixed the issue to get only english news.

Challenges we ran into

Many challenges faced while building this tool:

  1. Couldn't publish the site : After clicking on "Publish", no email was received and the live site didn't appear in Embedded Digital Experience > All Sites (Todo list).
  2. Couldn't embed the chatbot into Digital Experience site (Todo list configuring Salesforce's Embedded Service Deployment).
  3. Tried to add new pages in the digital site without success. Each time a new page designed and linked with a new navigation tab, the page became blank (Optional).
  4. Built a simple autolaunched flow to call the apex class and displayed the results. After connecting the flow with the Topic's action, the Output section became empty. The work around was to connect the Topic's action directly to Apex class instead of using flows (Specially that the flows were very basic : Start > Call apex class > Returns data > End. Sending emails after each research was not necessary, because anyone can access the digital site containing all Dashboards). The problem was solved
  5. We had issue integrating Dashboard into the digital site. But, we found out that the annotation for Apex method should @AuraEnabled instead of @InvocableMethod. The problem was solved.

Accomplishments that we're proud of

Building this Agent and digital site and learning Salesforce along the way, is an accomplishment for me. I am a programmer and I built many applications and used many platforms. But, Salesforce's access restrictions and permissions, are on a whole new level.

What we learned

  1. Learned to navigate Salesforce and played with access restrictions.
  2. Learned Apex language, LWC, Salesforce's Digital Site, Reports and Dashboard.
  3. Started with Event Planing Agent and built flows and actions. But, I found that many similar agent already built. So, I switched to something unique and used Apex classes instead.

What's next for AI Financial Research Agent

Many things to be added to enhance the agent, specially :

  1. Advanced Sentiment Analysis using LLM models. The sentiment analysis built is based on keywords (Positive sentiment if the article contains positive keywords and vice versa)
  2. Stock Price Prediction using AI based on technical analysis and patterns and statistics. With advanced sentiment analysis and accurate price prediction features, the agent will worth millions of dollars.

Built With

Share this project:

Updates