Repository navigation
IDC and Debt Fee Release [v3.21] - #195
Merged
Merged
Conversation
…uction loan up-front fee [construction]; add tests
…AM-EM Multiple Construction Years docs
6 of 18 tasks
softwareengineerprogrammer
marked this pull request as ready for review
November 15, 2026 16:56
softwareengineerprogrammer
marked this pull request as draft
November 15, 2026 16:57
softwareengineerprogrammer
marked this pull request as ready for review
November 16, 2026 18:52
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up from:
Completes the remaining NatLabRockies#529 checklist items (docs, images, CHANGELOG), fixes the construction loan up-front fee funding bug introduced in NatLabRockies#540, and bumps the version to 3.21.0.
The NatLabRockies#540 fee was added to
Installed cost [construction]and SAMtotal_installed_cost, but neitherIssuance of equity [construction]norIssuance of debt [construction]funded it. With multiple construction years, after-tax IRR and NPV combine the construction rows (After-tax net cash flow [construction]= −equity issuance) with SAMTotal after-tax returns ($)from Year 1 onward, dropping SAM's Year 0, where equity would implicitly fund it. The fee therefore increased ITC and depreciation basis without ever being paid, so adding a fee raised NPV and IRR. The fee is now paid by equity in the year of each construction debt draw.TODO
docs/_images/sam-em-mcy-design-diagram.png: b017852docs/_images/sam-em-mcy-construction-cash-flow-category.png(example_SAM-single-owner-PPA-5, now showsCapitalized interest [construction] ($)): ccba852docs/SAM-EM_Multiple-Construction-Years.mdIDC bullet wording: "Interest on the accumulated debt balance (Capitalized interest [construction]) is calculated using…": 8c8bb6eConstruction loan up-front fee (NatLabRockies#540) fix
Construction Loan Up-Front Fee, 0.05,example_SAM-single-owner-PPA-5Project NPV rose from 100.75 to 104.78 MUSD and IRR from 16.28% to 16.55% (see Manual testing)Issuance of equity [construction](and thusAfter-tax net cash flow [construction]), consistent with SAM's implicit Year 0 treatment; debt balance, capitalized interest, installed cost andeffective_debt_percentunchanged: f477458Debt up-front fee [construction] ($)→Construction loan up-front fee [construction] ($)(matches the input name; distinct from SAM's operating-periodDebt up-front fee ($)/cost_debt_upfront), moved afterCapitalized interest [construction] ($). The row was introduced in Construction loan up front fee NatLabRockies/GEOPHIRES-X#540 after v3.20.1, so no released output changes (same commit)geophires-request.json): fee is charged on each year's draw, paid by equity, and capitalized (simplification; real up-front fees are usually on the commitment at financial close) (same commit as fee fix)Release
Debt interest payment [construction] ($)→Capitalized interest [construction] ($)(Rename capitalized interest NatLabRockies/GEOPHIRES-X#542, Rename Debt interest payment [construction] cash flow row: it's capitalized interest, not a cash payment NatLabRockies/GEOPHIRES-X#529); up-front fee funding fix: 921b21abumpversion minor(3.20.1 → 3.21.0;.bumpversion.cfgauto-commits and tags): 691dc76Testing & Verification
test_construction_loan_upfront_fee_sources_equal_uses(test_economics_sam_pre_revenue.py): per-year fee, equity, debt, capitalized interest, installed cost and after-tax net cash flow values for a 3-year, 2% fee case; equity + debt + capitalized interest = installed cost in every construction year.test_construction_loan_upfront_fee_reduces_npv_and_irr(test_economics_sam.py): a 5% fee lowers Project NPV and After-tax IRR forexample_SAM-single-owner-PPA-5.test_construction_loan_upfront_fee(test_economics_sam_pre_revenue.py) for theConstruction loan up-front fee [construction] ($)row rename.example_SAM-single-owner-PPA-5with and withoutConstruction Loan Up-Front Fee, 0.05:Results without the fee are unchanged.
test_economics_sam.pyandtest_economics_sam_pre_revenue.py: 49 passed, 2 skipped (pre-existing skips).No example input uses the fee, so no example
.outfiles change.Change Checklist
Observe the following checklist items before and after merging, as applicable.
Before merging:
After merging:
git push origin refs/tags/vM.m.PSelf-reviewed in #195
Footnotes
See versioning notes and version management docs. ↩