Skip to content

Document the conventions of Rate addition and subtraction - #66

Merged
alecloudenback merged 1 commit into
mainfrom
docs/rate-arithmetic
Sep 25, 2026
Merged

alecloudenback merged 1 commit into
mainfrom
docs/rate-arithmetic

Conversation

@alecloudenback

Copy link
Copy Markdown
Member

Documents the existing behavior of + and - on Rates; no behavior changes.

  • Same-convention sums are nominal: Periodic(0.04, 1) + Periodic(0.03, 1) == Periodic(0.07, 1).
  • Mixed conventions follow the left operand's convention, so + is not commutative across conventions. This is the spread-quoting convention (a spread is added in the base rate's convention).
  • Continuous(a) + b is the order-independent force sum: its discount factor is the product of the two discount factors.

This replaces #53's proposal to redefine + as force addition, which would change existing values (4% + 3% annual would become 7.12%) and ActuaryUtilities' IR01/CS01 coordinate. The force sum gets an explicit name, compose, in the factor-process protocol (#65).

🤖 Generated with Claude Code

Rate + Rate adds nominally in the left operand's convention (the way a
spread is quoted), so mixed-convention sums depend on the order. Say so,
and show Continuous(a) + b as the convention-independent sum: the rate
whose discount factor is the product of the two.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@alecloudenback
alecloudenback merged commit 82b0985 into main Sep 25, 2026
8 checks passed
@alecloudenback
alecloudenback deleted the docs/rate-arithmetic branch September 25, 2026 05:04
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