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%'
Looking for Financial Modeling Input
This library was built by a software engineer, not a financial analyst. The model structures, formula types, and default assumptions reflect a developer's interpretation of common financial models.
If you work in finance, FP&A, investment banking, or accounting, your input would be incredibly valuable:
- Are the formula types correct? Do
growth_projected,pct_of_revenue,discounted_pv, andterminal_valuefollow standard conventions? - Missing model patterns? Are there common financial model structures (e.g., waterfall, three-statement, LBO) that should be supported?
- Named range conventions -- do the Excel named range naming patterns match what analysts expect?
- Number formatting -- are the default currency/percent/integer formats appropriate for professional models?
- Scenario analysis -- does the base/bull/bear override pattern match how scenarios are typically structured?
Please open an issue with the type:feat label, or start a discussion. All feedback is welcome, from quick corrections to detailed model reviews.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file excel_model-0.1.1.tar.gz.
File metadata
- Download URL: excel_model-0.1.1.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c448175386bba927db947689d2dab2a4e3119dc4fc9723686f86ffb998034cde
|
|
| MD5 |
f624b19ec6de9c2f9dd5b2c4cd8e558f
|
|
| BLAKE2b-256 |
e5f71410e19859edaff3d6b6791bc20c3ca2645f44b776241698e953fc204d3f
|
Provenance
The following attestation bundles were made for excel_model-0.1.1.tar.gz:
Publisher:
publish.yml on neuralsignal/excel-model
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
excel_model-0.1.1.tar.gz -
Subject digest:
c448175386bba927db947689d2dab2a4e3119dc4fc9723686f86ffb998034cde - Sigstore transparency entry: 1114979855
- Sigstore integration time:
-
Permalink:
neuralsignal/excel-model@e2c96ebe183ddd59297563605cf0c99af00cc4e2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/neuralsignal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e2c96ebe183ddd59297563605cf0c99af00cc4e2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file excel_model-0.1.1-py3-none-any.whl.
File metadata
- Download URL: excel_model-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77a66be45605c9be33d46002444b5fe2ed4ee9768333d0d939c6f7f312026df7
|
|
| MD5 |
bab8f3352b061c26c5bbdfc973a2f7c3
|
|
| BLAKE2b-256 |
e65f47950caf4de8d4b11e7f047a2eeff20d197864734a49df1e411ac8f1beef
|
Provenance
The following attestation bundles were made for excel_model-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on neuralsignal/excel-model
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
excel_model-0.1.1-py3-none-any.whl -
Subject digest:
77a66be45605c9be33d46002444b5fe2ed4ee9768333d0d939c6f7f312026df7 - Sigstore transparency entry: 1114979860
- Sigstore integration time:
-
Permalink:
neuralsignal/excel-model@e2c96ebe183ddd59297563605cf0c99af00cc4e2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/neuralsignal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e2c96ebe183ddd59297563605cf0c99af00cc4e2 -
Trigger Event:
push
-
Statement type: