Barcelona School of Economics · Summer School

Large Language Models for Finance

A hands-on graduate course on how large language models, agents, and modern NLP are reshaping financial research and practice — from transformer foundations to valuation, credit risk, trading, and compliance.

Instructor: Juan F. Imbet Host: Barcelona School of Economics Format: Summer School · lectures + Python labs Level: Graduate / professional

About the course

This course bridges the theory of large language models with their applied use in finance. We start from the architecture and training of modern LLMs, then build toward autonomous agents and concrete financial applications. Each topic pairs conceptual depth with reproducible Python labs.

Foundations

Transformer architecture, tokenization, pre-training, fine-tuning, and what actually makes these models work.

Agents & workflows

Tool use, retrieval, loops, goals, and iterations — building LLM agents that act on financial tasks.

Applied finance

Valuation, credit risk, sentiment, portfolio construction, RegTech, summarization, and explainability.

Syllabus

Seventeen modules spanning model internals and financial applications. Slides for the first six modules are live below; the remaining materials are released progressively.

  1. Introduction AvailableWhy LLMs matter for finance, and how the course is structured.Lecture slidesEmbedding-analogy code (king − man + woman ≈ queen)Setup guide
  2. LLM Architecture & Practice AvailableTransformers, attention, tokenization, and the modern LLM stack.Lecture slidesPractical session
  3. Training & Fine-Tuning AvailablePre-training, instruction tuning, LoRA, and adapting models to finance.Lecture slidesPractical session
  4. LLM Agents in Finance AvailableTool use, planning, and autonomous agents for financial tasks.Lecture slidesPractical sessioncompany_analysis agent — code/practicals/04-llm-agents/company_analysis/
  5. Business Valuation AvailableUsing LLMs to support and scale company valuation workflows.Lecture slidesPractical sessionProject overviewvaluation agents — code/practicals/05-business-valuation/
  6. Credit Risk Analysis AvailableLanguage models for borrower assessment and default prediction.Lecture slides
  7. Applications & Future TrendsEmerging use cases across the financial industry.
  8. Domain-Specific Financial LLMsBuilding and evaluating finance-tuned models and corpora.
  9. Financial NLP & SentimentLexicons, classifiers, and sentiment signals from financial text.
  10. Portfolio Optimization & Trading AvailableLLM-driven signals for quantitative trading and allocation.Lecture slides
  11. RegTech, Compliance & AMLRegulation, monitoring, and anti-money-laundering pipelines.
  12. Explainability & InterpretabilityMaking model decisions transparent and auditable in finance.
  13. Limitations & Rigorous EvaluationHallucination, benchmarking, and trustworthy evaluation.
  14. Text Summarization & ExtractionCondensing filings, reports, and news into structured signals.
  15. Privacy & Local DeploymentsOn-prem models, de-identification, and data protection.
  16. AI, ML & Text in FinanceSituating LLMs within the broader machine-learning toolkit.
  17. Loops, Goals & IterationsAgents, skills, and hooks — orchestrating reliable LLM systems.

Course materials

Everything you need to follow along, released progressively.

Setup & tech requirements Available

Install everything before the first session — Anaconda, VS Code, Node.js, Claude Code, Cline, and API keys, on Windows/macOS/Linux: Open the setup guide →

Lecture slides Available

Interactive HTML decks — lecture and practical — for the first six modules are live, with the rest released progressively: Browse all slide decks →

The book (PDF) Available

Read the full Large Language Models in Finance manuscript in your browser: View the book (PDF) →
Companion reference volume: View the appendices (PDF) →

Readings & notes Coming soon

Chapter notes and reference material accompanying each lecture.

Code & notebooks Available

Python labs and figure-generation code live in the public repository: github.com/jfimbett/llm-finance-book.

🗓️

Release in progress. The book PDF and the slide decks for the first four modules are available now; the remaining modules and student handouts are being finalized and will appear here ahead of the Summer School.

Companion code

All notebooks, the shared llmfin Python package, and the scripts used to generate the book's figures are open-source on GitHub.