Skip to main content

YAML-driven Excel financial model generator

Project description

excel-model

YAML-driven Excel financial model generator.

Build professional financial models (P&L, DCF, Budget vs Actuals, Scenario Analysis) from declarative YAML specs. Generates .xlsx workbooks with named ranges, styled sheets, and Excel formulas using openpyxl.

Installation

pip install excel-model

Or for development:

pixi install

Quick Start

CLI

# Build a P&L model
excel-model build --spec model.yaml --output model.xlsx --mode batch

# Validate a spec
excel-model validate --spec model.yaml

# Describe what a spec would produce
excel-model describe --spec model.yaml --format text

Python API

from excel_model.spec_loader import load_spec
from excel_model.validator import validate_spec
from excel_model.excel_writer import build_workbook
from excel_model.config import load_style

spec = load_spec("model.yaml")
errors = validate_spec(spec)
assert not errors

style = load_style(None)  # uses bundled defaults
build_workbook(spec=spec, inputs=None, output_path="model.xlsx", style=style)

Model Types

Type Description
p_and_l Profit & Loss statement
dcf Discounted Cash Flow valuation
budget_vs_actuals Budget vs Actuals comparison
scenario Multi-scenario analysis (Base/Bull/Bear)
comparison Cross-entity comparison

Formula Types

21 built-in formula types including growth_projected, pct_of_revenue, sum_of_rows, subtraction, ratio, discounted_pv, terminal_value, npv_sum, variance, variance_pct, constant, custom, and more.

Configuration

Style config controls Excel formatting (colors, fonts, number formats). A bundled default is included; override with --style:

header_fill_hex: "1F3864"
header_font_color: "FFFFFF"
font_name: "Calibri"
font_size: 10
number_format_currency: '#,##0'
number_format_percent: '0.0%'

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

excel_model-0.1.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

excel_model-0.1.0-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file excel_model-0.1.0.tar.gz.

File metadata

  • Download URL: excel_model-0.1.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for excel_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38524534fef648a8b6c6c6c11205cd775270a5cda12ec67e82e2fdb7965dec01
MD5 be0155d7806e86b71757aa6b23c12cd0
BLAKE2b-256 8019224d64ef63b7b53fb7f3030a9fd85fa5b145742461bef7ce4909a17e7632

See more details on using hashes here.

Provenance

The following attestation bundles were made for excel_model-0.1.0.tar.gz:

Publisher: publish.yml on neuralsignal/excel-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file excel_model-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: excel_model-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for excel_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6811e201bab84d1cc1595461911707cd10e8cd790d542fd1b64900727f2542a2
MD5 accb00c1c5b274e4dea29242d316b82f
BLAKE2b-256 fae8c3952152271e3aa740a4d66a17ab4bc9120eb1e27336ae0e0623ce088eef

See more details on using hashes here.

Provenance

The following attestation bundles were made for excel_model-0.1.0-py3-none-any.whl:

Publisher: publish.yml on neuralsignal/excel-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page