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

Uploaded Source

Built Distribution

tmval-0.0.4-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tmval-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 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.4.tar.gz
Algorithm Hash digest
SHA256 5ee8c263cd5bc6e6ae6d4fbb90b8273a6a2122610445e081b654b48b5131f240
MD5 b940f9ddc6d8fb3d18edf96bb37bc26b
BLAKE2b-256 58199533dcd3cfa08e238e6638ed1c5ef2327c391bfcbedf4d1c2241344d1b21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tmval-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9256ea062fb9b84bd43a62cf431bd649e37e2afe2398ae002fae8848606d7d48
MD5 0f3d051b0574229193bd49d152ccdd63
BLAKE2b-256 666ececa50143603710dee9a0d668de52e06e57885e4a5ab0abe47204e24e890

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