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.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

tmval-0.0.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tmval-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 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.2.tar.gz
Algorithm Hash digest
SHA256 333d2216160f1588689f1aa5b1968f4bba0560366f46272ffe5bc18f4054ab7b
MD5 27afc43257ce4017affabb3c79a5a671
BLAKE2b-256 6e0dd2fcff7d8a8daa27f1cb9780a0bbd122c9f71d32a78bc8b7c092dbe18d04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tmval-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c293a64b9592c342e37e3e9002cb377a0cbde2ab170383ee4db06fbd7a17702
MD5 9483030ecf6541662e405dd550ab84f8
BLAKE2b-256 3523a8a4db743792a789882a10001dd23bd33f074a085f9c5c6c977a79c3debe

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