Inspiration

Corporate insiders, such as executives and directors, have a unique perspective on their companies. When they buy shares, those transactions become publicly available through SEC filings. However, interpreting thousands of filings alongside stock prices, market trends, and historical performance can be overwhelming.

We wanted to answer a simple question: How can we distinguish ordinary insider purchases from unusual activity that deserves further investigation?

For the Diameter Capital financial hackathon track, our team decided to combine our backgrounds in computer science, mathematics, statistics, and machine learning to build a financial research platform that goes beyond displaying insider transactions.

Our goal was to make quantitative financial analysis more accessible by bringing together statistical methods, machine learning, and generative AI into one interactive application.

That idea became InsiderEdge.

What it does

InsiderEdge is an AI-powered quantitative financial research platform that analyzes publicly reported corporate insider purchases to identify unusual trading activity and potential market dislocations.

Instead of treating every insider purchase as an equally important signal, InsiderEdge evaluates each event using five components:

  • Anomaly Detection: Uses Mahalanobis distance and statistical measures to identify purchases that differ significantly from historical patterns.
  • Insider Activity: Examines purchasing frequency, transaction activity, and clusters of insider buyers.
  • Machine Learning: Uses Logistic Regression and XGBoost to estimate the probability of a stock outperforming SPY over the following 30 trading sessions.
  • Statistical Evidence: Applies financial event studies, bootstrap confidence intervals, and randomized-timing tests to examine historical abnormal returns.
  • Market Dislocation: Identifies stocks experiencing unusual drawdowns or underperformance relative to their sectors.

These components are combined into a transparent InsiderEdge Score from 0 to 100, representing how strongly an insider event warrants further research.

Through our interactive Market Dislocation Radar, users can explore ranked companies, examine historical insider transactions, visualize stock performance, and investigate the statistical evidence behind each score.

We also integrated Google Gemini to generate understandable explanations of the quantitative results and ElevenLabs to provide AI-generated audio analyst briefings.

To extend our platform, we implemented Snowflake for contextual research retrieval and GoDaddy for our branded web deployment.

InsiderEdge is designed to support financial research, not automate trades or guarantee investment returns.

How we built it

We developed InsiderEdge as a full-stack application with a team of four, dividing responsibilities between backend/data engineering, quantitative analysis and machine learning, and frontend/product development.

Data Engineering and Backend

We built our backend using Python and FastAPI, with Tiger Data/PostgreSQL serving as the primary database.

Our data pipeline processes public SEC Form 4 insider transactions and historical market information from yfinance. We normalize insider purchase records, associate them with publicly available filing dates, and combine them with historical stock prices, trading volume, and market benchmarks.

We focused on preserving the distinction between transaction dates and public filing dates so our analysis would not accidentally use information that was unavailable at the time.

Quantitative Analysis and Machine Learning

Using NumPy, Pandas, SciPy, statsmodels, scikit-learn, and XGBoost, we built a quantitative analysis pipeline incorporating concepts from probability, statistics, and machine learning.

Our methods include:

  • Covariance-aware anomaly detection using Mahalanobis distance.
  • Financial event studies measuring cumulative abnormal returns over 5, 30, and 90 trading sessions.
  • Bootstrap confidence intervals and randomized-timing hypothesis tests.
  • Logistic Regression and XGBoost models trained using chronological data splits.
  • A weighted scoring system combining five quantitative research components.

We designed our machine learning pipeline around information available before each event and used temporal validation to reduce look-ahead bias.

Frontend and User Experience

We built the frontend with React, TypeScript, Vite, and Recharts.

Our goal was to create an intuitive, professional financial research dashboard where users could move from a high-level overview of potentially interesting insider activity to a detailed investigation of an individual company.

We implemented interactive charts, insider transaction markers, score breakdowns, financial statistics, machine learning predictions, and AI-generated research explanations.

AI and Sponsor Integrations

We incorporated several integrations to expand the platform's capabilities:

  • Tiger Data: PostgreSQL-based storage for insider transactions, market data, and research outputs.
  • Google Gemini: Natural-language explanations grounded in our calculated financial evidence.
  • ElevenLabs: AI-generated audio briefings summarizing company research.
  • Snowflake: Contextual company and filing research retrieval to complement quantitative analysis.
  • GoDaddy: Custom domain integration for a branded, accessible deployment.

Together, these technologies allowed us to build a complete research experience, from raw financial filings to interpretable results.

Challenges we ran into

One of our biggest challenges was combining several different financial and technical systems within a 48-hour hackathon.

Processing and aligning financial data: SEC filings and historical stock data have different structures and timestamps. We needed to normalize transaction records, identify relevant purchase events, and ensure that market observations aligned correctly with the information available at each filing date.

Avoiding data leakage: Financial machine learning requires careful handling of time. A model can appear highly accurate if future information accidentally enters training features. We addressed this by organizing events chronologically, restricting features to previously available information, and separating training, validation, and testing periods.

Making statistical analysis meaningful: Detecting unusual insider activity is more complicated than identifying a large purchase. We needed to consider historical purchasing behavior, market conditions, covariance between features, and the uncertainty surrounding historical outcomes.

Integrating multiple services: Coordinating our database, quantitative pipeline, machine learning models, frontend, generative AI services, and additional sponsor integrations required well-defined API contracts and clear communication between team members.

Balancing complexity and usability: Our quantitative methods generate a considerable amount of information. We wanted users to understand why a company received a particular score without needing an extensive background in statistics or financial modeling.

Accomplishments that we're proud of

We're especially proud of building a platform that combines financial data engineering, statistical inference, machine learning, and generative AI into one cohesive application.

Rather than relying entirely on an AI model to produce financial recommendations, we built a quantitative scoring system where every component has a defined mathematical purpose.

We also developed an interface that makes complex financial signals easier to investigate through interactive visualizations and natural-language explanations.

Another major accomplishment was integrating our core features with multiple sponsor technologies, including completing our Snowflake and GoDaddy stretch goals.

Most importantly, we turned mathematical and machine learning concepts into a functioning financial research application within the hackathon's limited timeframe.

What we learned

Building InsiderEdge helped us understand how much work goes into transforming raw financial information into reliable, interpretable research.

We strengthened our understanding of financial event studies, multivariate anomaly detection, statistical hypothesis testing, bootstrap methods, and machine learning validation.

We also learned why avoiding look-ahead bias is particularly important in financial modeling. A statistically impressive result is not necessarily meaningful unless the experiment respects what was actually known at the time.

From an engineering perspective, we gained experience designing data pipelines, connecting backend APIs to interactive dashboards, integrating external services, and coordinating development across a four-person team.

Perhaps our most important takeaway was that machine learning and generative AI are most useful in financial research when they complement transparent statistical evidence rather than replace it.

What's next for InsiderEdge

We see InsiderEdge as a foundation for a more comprehensive financial intelligence platform.

Future improvements could include expanding beyond the initial S&P 100 universe, incorporating additional SEC filings and company fundamentals, developing more sophisticated time-series prediction models, and evaluating our scoring methodology across longer historical periods.

We would also like to expand our Snowflake-powered research capabilities, improve the depth of AI-generated analysis, and make it easier for users to track changes in insider activity over time.

Our long-term vision is to make InsiderEdge a research assistant that helps investors and analysts discover important financial signals, understand their statistical significance, and investigate opportunities more efficiently.

Built With

Share this project:

Updates

Submission history