Skip to main content

Time Value of Money

Project description

TmVal

PyPI version

Time Value of Money

Introduction

TmVal is a package that provides tools for the valuation of various financial instruments (annutities, bonds).

It can be used to study for Actuarial Exam FM, and (hopefully) used on the job for projects where time value of money is relevant.

Installation

pip install tmval

or

git clone https://github.com/genedan/TmVal

Examples

Define an amount function that pays 25% simple interest per period:

import tmval

def f(k, t):
    return k + 250 * t

my_amt = tmval.Amount(f, k=1000)

Check the value at time t=4

my_amt.val(t=4)
Out[3]: 2000

Check the interest earned during the first 5 periods:

my_amt.interest_earned(t1=0, t2=5)
Out[4]: 1250

Check the interest rate between times t=0 and t=1:

my_amt.effective_rate(1)
Out[6]: 0.25

The above example can also be constructed with a special subclass, SimpleAmt, representing the simple interest amount function:

my_simple = tmval.SimpleAmt(k=1000, s=.25)
my_simple.val(t=4)
my_simple.interest_earned(t1=0, t2=5)
my_simple.effective_rate(1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmval-0.0.6.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

tmval-0.0.6-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file tmval-0.0.6.tar.gz.

File metadata

  • Download URL: tmval-0.0.6.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for tmval-0.0.6.tar.gz
Algorithm Hash digest
SHA256 48b629700eeea7031da87a29bef14f24a4c8a9651ea66ce828844881b957f4bf
MD5 c8cdc38d91ca280fdcdf341c4531ce48
BLAKE2b-256 3000b6f38aa321112dba8f3649f59b232411e394b3776812865a4bba141411a5

See more details on using hashes here.

File details

Details for the file tmval-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: tmval-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for tmval-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e10b4d24533c58c0ed8ae734c61564ca2ce9d22ee38ec5a1625e32c26170bff7
MD5 225ce1918512fab1d327de82ed76739b
BLAKE2b-256 1b8123a7555f13679068a0d228cf3d864c5e7c72d8cd3ac32201a18de89625c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page