Skip to content

Add Lorig reference tests for compounding and cashflow valuation - #69

Closed
alecloudenback wants to merge 1 commit into
mainfrom
test/lorig-reference-2611
Closed

alecloudenback wants to merge 1 commit into
mainfrom
test/lorig-reference-2611

Conversation

@alecloudenback

Copy link
Copy Markdown
Member

Add deterministic regression tests for compounding over a fixed horizon and fair exchanges of certain cashflows. The cases distinguish total compounding count from compounding frequency and check the balancing payment's value and sign using signed Cashflow schedules.

Reference: Matthew Lorig (2026), An Introduction to Financial Derivatives: Open Lecture Notes, arXiv:2611.01355v1.

  • Section 2.3, Eq. (2.1): periodic and continuous accumulation and discounting.
  • Exercise 2.2 and Eqs. (A.38)–(A.42): a fair exchange of two cashflows, including the zero-value boundary and negative receipts.

Test comments link to the versioned source and identify the relevant equations. Parameters are chosen for these regression cases. The new file is included in the standard test runner.

Validation: all 24 new assertions and the full FinanceCore Pkg.test suite pass on Julia 1.13.1; git diff --check passes.

@alecloudenback

Copy link
Copy Markdown
Member Author

Closing after comparing this proposal with the existing tests. test/Rates.jl already covers periodic and continuous accumulation/discounting at noninteger times, and test/present_value.jl covers the continuous-rate cashflow valuation. The frequency conversion, balancing payment, sign, and threshold checks add algebraic consequences rather than independent package coverage, so these additions do not justify a separate PR.

For clarity, the paper references are Section 2.3 and Exercise 2.2; equation numbers in the original proposal follow the arXiv HTML, whose numbering differs from the PDF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant