Examples#

This gallery walks through every public feature of financialkit.time_value: compounding and equivalent rates, present and net present value, annuities and perpetuities, the internal rate of return and its pitfalls, amortizing loans and the APR, and day-count conventions.

Each script in this gallery is self-contained and can be run directly with python examples/time_value/<section>/<script>.py.

Sections#

  • present_value – Fibonacci’s present value, Fisher’s real rate and Fisher’s net present value.

  • compounding – Pacioli’s rule of 72, Witt’s compound-interest tables and Bernoulli’s continuous compounding.

  • annuities – De Witt’s life annuities, the consol perpetuity and Price’s sinking fund.

  • irr – the internal rate of return, Lorie and Savage’s multiple IRRs and Baldwin’s modified IRR.

  • amortization – the fully amortizing mortgage and the Truth-in-Lending APR.

  • day_counts – 30/360 accrued interest and the actual/actual family.

Amortization#

Level-payment loans that repay themselves, and the APR that the Truth in Lending Act made lenders disclose.

The fully amortizing mortgage

The fully amortizing mortgage

Truth in Lending: APR and the effective rate

Truth in Lending: APR and the effective rate

Annuities#

Streams of level payments: De Witt’s life annuities, the perpetual consol, and Price’s sinking fund.

De Witt’s life annuities

De Witt's life annuities

Consols and the perpetuity

Consols and the perpetuity

Price’s sinking fund

Price's sinking fund

Compounding#

Interest on interest: Pacioli’s rule of 72, Witt’s compound-interest tables, and Bernoulli’s limit of ever more frequent compounding.

Pacioli’s rule of 72

Pacioli's rule of 72

Witt’s compound-interest tables

Witt's compound-interest tables

Bernoulli and continuous compounding

Bernoulli and continuous compounding

Day counts#

Turning dates into year fractions: 30/360 accrued interest and ISDA’s actual/actual conventions.

SIA 30/360 and accrued interest

SIA 30/360 and accrued interest

ISDA’s actual/actual and the day-count zoo

ISDA's actual/actual and the day-count zoo

Internal rate of return#

The rate that zeroes a project’s NPV, the projects that have several, and Baldwin’s modified IRR.

The internal rate of return

The internal rate of return

Lorie and Savage: multiple IRRs

Lorie and Savage: multiple IRRs

Baldwin’s modified IRR

Baldwin's modified IRR

Present value#

Discounting payments to one comparable number: Fibonacci’s present value, Fisher’s real and nominal rates, and Fisher’s net present value.

Fibonacci’s present value: comparing payment schedules

Fibonacci's present value: comparing payment schedules

Fisher’s real and nominal rates of interest

Fisher's real and nominal rates of interest

Fisher’s net present value: choosing between income streams

Fisher's net present value: choosing between income streams

Gallery generated by Sphinx-Gallery