TerraFin

Public core of a broader AI4Finance workflow

Since May 2023 | Open-sourced April 2026

Overview

TerraFin is terraform for financial research and investment decisions, and the open-source core of my AI4Finance work.

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

It has four parts, built so the agent and you work from the same data.

  • Skills for any agent. They give Claude Code, Codex, or opencode a financial analyst's toolkit, including full DCF with turnaround mode, reverse DCF, and an S&P 500 DCF.
  • TerraFin Terminal. A web dashboard for browsing markets and companies.
  • Its own agent. Built on the same skills, it sees what you have open in the Terminal.
    • Ask "is this cheap?" on a stock page and it knows which ticker you mean.
    • In the filing reader it works from the section you are reading. In the DCF workbench it reads the inputs you entered.
    • Other agents can call it as a sub-agent over HTTP or the CLI.
  • A data pipeline. It fetches, caches, and normalizes each source (market data, FRED, SEC EDGAR, and optional private-access extensions) once, so one agent can sweep a whole watchlist or search a stock universe in a few calls.

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.

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.

  • Widening skill coverage so more of an analyst's workflow runs through any agent.
  • Giving the Terminal agent context on more pages.
  • Making public/demo mode useful without private-access extensions.
  • Keeping clear seams between the open-source core and deployment-specific extensions.