About MagicFin
Inspiration
Financial teams make important decisions using information scattered across annual reports, financial statements, PDFs, spreadsheets, and supporting documents. The problem is not a lack of data—it is that the data is often fragmented, difficult to compare, and time-consuming to verify.
That challenge immediately stood out to us in DevLeague Lab 1: AI-Powered Financial Report Analysis, which asks teams to turn structured and unstructured financial information into useful trends, anomalies, risks, summaries, and recommendations while keeping the analysis explainable and transparent.
We also noticed a deeper problem with many AI financial tools: they are good at summarising what a report says, but a confident summary is not necessarily a correct one.
A sentence in a financial report may claim that performance improved, margins strengthened, or liquidity remained healthy—but does that narrative actually agree with the underlying figures?
That question became the foundation of MagicFin.
MagicFin makes financial analysis feel like magic by transforming complex reports and spreadsheets into clear insights, hidden risks, and evidence-backed next steps.
Instead of simply generating another AI summary, MagicFin is designed to help users understand what the numbers mean, what deserves attention, and why they should trust the result.
What MagicFin Does
MagicFin brings financial reports and spreadsheet data together into one analysis workflow.
It can examine narrative claims from financial documents, compare them with the underlying numerical evidence, calculate key financial indicators, and surface:
- important financial trends;
- anomalies and exceptions;
- potential risks;
- inconsistencies between narrative claims and reported figures;
- concise insights and suggested areas for further investigation.
For important findings, MagicFin creates an explainable proof trail:
Claim → Source Data → Calculation → Result
Findings can then be classified conservatively as:
- Supported — the available evidence agrees with the claim;
- Uncertain — the evidence is incomplete, ambiguous, or insufficient;
- Contradicted — the underlying figures conflict with the claim.
This means a user does not have to blindly trust an AI-generated conclusion. They can see the evidence behind it and verify the reasoning themselves. This evidence-first approach is a core principle of the project.
How We Built It
We designed MagicFin around one principle:
AI should help interpret financial information, but authoritative calculations should remain deterministic and auditable.
The prototype uses a FastAPI backend with a React-based frontend and supports financial information coming from both PDFs and spreadsheets.
For document processing, the system prioritises native PDF text extraction and keeps source provenance such as page references. Spreadsheet information is normalised so that relevant figures can be compared consistently.
The current prototype calculates a focused set of financial indicators using deterministic code, including:
- revenue growth;
- operating margin;
- current ratio;
- free-cash-flow margin.
Rather than asking an AI model to calculate these values, MagicFin performs the arithmetic directly in code. AI assistance is used only where it adds value, such as interpreting or extracting structured claims from narrative financial information.
This separation helps reduce hallucinations and makes the results easier to inspect.
We also developed the system with privacy and responsible AI in mind. Uploaded files are handled within temporary sessions, deletion controls are considered explicitly, and hosted AI services are restricted rather than being treated as an invisible black box. The prototype intentionally avoids claiming production-level compliance where it has not been validated.
For our demonstration, we use real-world public financial information, including Apple FY2025, allowing MagicFin to show how the same workflow could be applied to actual company reporting rather than only artificial sample data.
Challenges We Faced
1. Financial documents are messy
PDFs are designed primarily for people to read, not machines.
The same financial value may appear in a paragraph, a table, a note, or a spreadsheet using different units and formatting. Even identifying whether two values are genuinely comparable can be difficult.
We therefore had to design MagicFin to preserve provenance and avoid forcing a conclusion when the evidence is unclear.
2. Preventing confident but incorrect AI answers
Financial analysis is particularly sensitive to hallucination.
A model-generated explanation may sound convincing while using the wrong figure or performing incorrect arithmetic. We addressed this by separating AI interpretation from deterministic financial calculations.
If the system cannot verify something reliably, “Uncertain” is a valid result rather than encouraging the AI to guess.
3. Explainability versus simplicity
Showing every extracted sentence, spreadsheet cell, formula, and warning at once would make the application overwhelming.
Our challenge was therefore not only analysing the information but presenting it in a way that a user can understand quickly.
MagicFin keeps the first view concise and allows users to progressively inspect the underlying evidence when they need it.
4. Building responsibly within hackathon constraints
We wanted the prototype to feel ambitious while still being truthful about what had actually been built.
Instead of claiming universal PDF understanding, perfect accuracy, or production-ready compliance, we deliberately focused on a narrow workflow that can be demonstrated clearly and reliably. That approach reflects one of our biggest lessons from the project: depth and trust can be more valuable than adding many superficial features.
What We Learned
The biggest thing we learned is that good financial AI is not just about generating smarter answers—it is about generating answers that users can verify.
We learned that:
- deterministic calculations are extremely important when accuracy matters;
- source provenance should be designed into the system from the beginning;
- uncertainty should be communicated instead of hidden;
- AI is strongest when combined with traditional software rather than replacing it;
- good financial analysis needs both numbers and context;
- explainability can itself become a product feature rather than simply a compliance requirement.
Most importantly, we realised that the real opportunity is not to replace financial analysts.
It is to remove the repetitive work of searching through documents, comparing figures, calculating ratios, and tracing evidence—so people can spend more time understanding what the information means and deciding what to do next.
That is the idea behind MagicFin:
Turning financial complexity into clarity—with evidence behind the magic.
Built With
- ai
- analysis
- api
- auth
- data
- fastapi
- financial
- fintech
- gemini
- gemma
- mcp
- pdfplumber
- pymupdf
- python
- react
- reportlab
- rest
- supabase
- typescript
- visualization
- xlsx
Log in or sign up for Devpost to join the conversation.