TerraFin

Public core of a broader AI4Finance workflow

Since May 2023 | Open-sourced April 2026

Overview

TerraFin is the open-source core of my AI4Finance work: a public platform for unified data access, lightweight analytics, browser interfaces, and agent-ready workflows.

Project Links

The repository shows the public core, and the demo shows how that core behaves as a working finance interface.

What TerraFin Makes Public

The public surface is meant to keep data access, analysis, interfaces, and agent workflows aligned enough that the same finance workflow can move across notebooks, browser pages, and automation without being rebuilt from scratch.

  • Unified data layer. Normalizes market, macro, corporate, and optional private-access integrations behind one interface.
  • Analytics and simulation utilities. Supports indicators, valuation workflows, options and rates analysis, and other finance-oriented utilities.
  • Browser interface. Serves chart, dashboard, market-insights, calendar, stock-analysis, and watchlist pages from one FastAPI app.
  • Agent-ready workflows. Reuses the same backend through Python, CLI, skill, and JSON API entrypoints.

Beyond the Public Core

The public repo is only one layer of how I actually work on AI4Finance. The rest is a private side built on the same public core:

  • Data sources. My own sources plug into the core through private-access, an open extension point that lets anyone connect and customize their own.
  • LLM-based sentiment prediction.
    • An LLM with a classification head turns market text into calibrated probabilities, not free text, an idea since seen in recent models like Jev.
    • I aggregate the probabilities into my own market-sensitivity indicators, the way a quant builds a signal.
    • An MLOps loop of retraining, calibration, and human-reviewed relabeling keeps the probabilities reliable.
  • NexTick Daily. A daily US market newsletter in Korean and English.
    • The newsletter's pipeline runs on TerraFin's data and agent layers.
    • The pipeline runs automatically after each US trading day.
    • With no human intervention, the pipeline picks the stories, drafts the issue, and fact-checks the draft's figures against the market data.
  • Others. Weekly stock screening, with more pipelines on the way.

If you also work on AI4Finance, I am always open to thoughtful technical conversations that go deeper than the OSS surface.

Architecture

TerraFin is organized as a layered system so the same core logic can serve notebooks, browser pages, and agent workflows without duplicating business logic.

  • Data layer normalizes public providers such as yfinance-backed market data, FRED, and SEC EDGAR, with optional private-access extensions for deployment-specific data.
  • Analytics layer computes indicators and standalone finance models on top of those normalized frames.
  • Interface layer renders browser-based views for chart exploration, dashboard monitoring, market context, and company analysis.
  • Agent and cache layer keeps the same pipeline available to CLI, Python, and HTTP clients while maintaining responsive progressive loading.

From LLM4Finance to TerraFin

The project began as LLM4Finance, a personal project built around the LLM-based sentiment-prediction pipeline.

  • Rebuilding LLM4Finance around agents turned it into a wider system for data, analytics, interfaces, and agent workflows.
  • Part of the rebuilt system is now open source as TerraFin.
  • The sentiment pipeline still runs, as part of the private side described in "Beyond the Public Core".

Open-Source Scope

  • MIT-licensed software with documentation for public/demo operation.
  • Explicit about the difference between open-source software and third-party data rights.
  • Some deployment-specific extensions and model pipelines remain outside the OSS surface by design.

Current Focus

The goal is not just to expose a set of finance tools, but to make one coherent AI4Finance workspace where data access, analysis, interface, and agent workflows reinforce each other.

  • Improving the dashboard and chart experience so the public core feels usable as a serious day-to-day finance workspace.
  • Making public/demo mode cleaner and more informative for OSS users even without private-access extensions.
  • Expanding documentation and strengthening the agent-ready workflow surface so outside users can build on TerraFin without reconstructing the stack.
  • Keeping clear seams between the open-source core and deployment-specific extensions.