{"id":20548665,"url":"https://github.com/kenkundert/tvm","last_synced_at":"2025-04-14T10:53:17.156Z","repository":{"id":62585612,"uuid":"179416140","full_name":"KenKundert/tvm","owner":"KenKundert","description":"Time Value of Money","archived":false,"fork":false,"pushed_at":"2023-01-03T00:55:42.000Z","size":56,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T00:07:19.155Z","etag":null,"topics":["annuity","financial","interest","loans","money","savings","time-value-of-money"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KenKundert.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-04T03:39:47.000Z","updated_at":"2024-03-04T06:16:57.000Z","dependencies_parsed_at":"2023-02-01T04:45:24.927Z","dependency_job_id":null,"html_url":"https://github.com/KenKundert/tvm","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenKundert%2Ftvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenKundert%2Ftvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenKundert%2Ftvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenKundert%2Ftvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KenKundert","download_url":"https://codeload.github.com/KenKundert/tvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647832,"owners_count":21139167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annuity","financial","interest","loans","money","savings","time-value-of-money"],"created_at":"2024-11-16T02:14:14.393Z","updated_at":"2025-04-14T10:53:17.137Z","avatar_url":"https://github.com/KenKundert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"TVM — Time Value of Money\n=========================\n\n\n.. image:: https://pepy.tech/badge/tvm/month\n    :target: https://pepy.tech/project/tvm\n\n.. image:: https://img.shields.io/pypi/v/tvm.svg\n    :target: https://pypi.python.org/pypi/tvm\n\n.. image:: https://img.shields.io/pypi/pyversions/tvm.svg\n    :target: https://pypi.python.org/pypi/tvm/\n\n\n:Author: Ken Kundert\n:Version: 1.0.0\n:Released: 2020-07-19\n\n\nWhat?\n-----\n\nTime value of money calculations relate the following quantities:\n\n- future value\n- present value\n- payments\n- number of periods\n- discount rate\n\n*tvm* computes one of these values (other than discount rate) given the others.\n\nThe number of periods is split between two values, the number of years and the \nnumber of periods per year (the frequency).\n\n\nGetting Started\n---------------\n\nInstall using::\n\n    pip3 install --user tvm\n\nThis installs *tvm* to ~/.local/bin; make sure this directory is on your path.\n\nUsage::\n\n    tvm [options] [fv|pv|pmt|years]\n\nOptions::\n\n    -f \u003cval\u003e, --fv \u003cval\u003e     future value\n    -p \u003cval\u003e, --pv \u003cval\u003e     present value\n    -P \u003cval\u003e, --pmt \u003cval\u003e    payment per period\n    -y \u003cval\u003e, --years \u003cval\u003e  total number of years\n    -n \u003cval\u003e, --freq \u003cval\u003e   number of payments per year\n    -r \u003cval\u003e, --rate \u003cval\u003e   annual discount rate\n    -i, --ignore             ignore any previously specified values\n\nIf a value is not given it is recalled from the previous invocation.\nSpecify ``--ignore`` to use the default values for all unspecified options,\nwhich are: *pv* = 0, *fv* = 0, *pmt* = 0, *years* = 30, *freq* = 12.\n\nWhen the program runs, it always shows the specified values along with the \ncomputed value to make it easy for you to confirm that you used the right \nvalues.  The computed value is capitalized and shown in a different color to \nmake it easier to pick out.\n\n\nSavings Accounts\n----------------\n\nConsider case where you have a interest bearing account that pays 5% per annum \ncompounded monthly. If you start with $10,000, you can compute the amount you \nwill have after 5 years with::\n\n    tvm --pv=10000 --rate=5 --freq=12 --years=5 fv\n\nThe amount in 5 years is referred to as the future value (fv). The current \namount is the present value (pv). The frequency is the number of periods per \nyear. The program responds with::\n\n    pv = $10,000.00\n    pmt = $0.00\n    FV = $12,833.59\n    r = 5%\n    periods = 60\n    years = 5\n\n*periods* is the total number of periods and equals the product of the years and \nthe number of periods per year.\n\nYou can specify values with SI scale factors, units, and commas.  The units and \ncommas are ignored. So you can do the same thing with either::\n\n    tvm --pv='$10,000' --rate=5% --freq=12 --years=5 fv\n\nor::\n\n    tvm --pv=10k --rate=5% --freq=12 --years=5 fv\n\nThe quotes are needed in the first case to prevent $ from being interpreted by \nthe shell.\n\n*tvm* remembers the values specified on the previous invocation and uses them if \nthey are not specified.  This allows you to rapidly run what-if experiments \nwithout having to re-specify values that do not change.\nSo, once you have run the first command, you can now quickly determine how much \nyou will have in 10 years using::\n\n    tvm -y 10\n\n    pv = $10,000.00\n    pmt = $0.00\n    FV = $16,470.09\n    r = 5%\n    periods = 120\n    years = 10\n\nWithout changing anything else, you can determine what happens if you make an \nadditional $100 contribution each month::\n\n    tvm --pmt 100\n\n    pv = $10,000.00\n    pmt = $100.00\n    FV = $31,998.32\n    r = 5%\n    periods = 120\n    years = 10\n\n\nLoans\n-----\n\nYou can also use *tvm* to explore loans.  For example, you can compute the \npayment for a mortgage given the principal, interest rate, and length::\n\n    tvm --ignore --pv=-250k --rate=4.375 --years=30 pmt\n\n    pv = -$250,000.00\n    PMT = $1,248.21\n    fv = $0.00\n    r = 4.375%\n    periods = 360\n    years = 30\n\nThe ``--ignore`` option was added so that we start from scratch; any values that\nwere previously specified are ignored.\n\nYou can now understand how paying a little extra affects how long it takes\nto pay off the loan using::\n\n    tvm --pmt=1.5k years\n\n    pv = -$250,000.00\n    pmt = $1,500.00\n    fv = $0.00\n    r = 4.375%\n    periods = 257.08\n    YEARS = 21.42\n\nTo compute the payments for a 5-year interest only balloon mortgage, use::\n\n    tvm -y 5 -f -250k pmt\n\n    pv = -$250,000.00\n    PMT = $911.46\n    fv = -$250,000.00\n    r = 4.375%\n    periods = 60\n    years = 5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenkundert%2Ftvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenkundert%2Ftvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenkundert%2Ftvm/lists"}