Skip to main content

A package for calculating Financial Services specifically for loans or investment scenarios.

Project description

FinanceCalculator2025


Documentation Status codecov

Project Summary

FinanceCalculator2025 is a Python package for calculating financial metrics specifically designed for loans or investment scenarios.
This package serves as a convenient tool for managing personal finances, offering functionalities such as Contribution, Future Value, Present Value, and Number of Periods Calculations.


Contributors


Installation

$ pip install financecalculator2025

Package Content

This package offers four key functions:

Functions:

  1. calculate_contribution: Calculates the periodic payment (contribution) required to pay off a loan or reach a specified future value over a given number of periods.
  2. future_value: Calculates the future value of an investment or loan, factoring in optional periodic contributions.
  3. present_value: Calculates the present value of an investment or loan, considering optional monthly contributions.
  4. n_periods: Calculates the number of periods (in months) required to reach a specified future value, given an initial principal, an annual interest rate, and optional monthly contributions.

Common Parameters:

  • principal (float):
    The initial investment or loan amount (also known as Present Value in financial terms).

  • future_value (float):
    The desired amount at the end of the calculation period (e.g., remaining loan balance or target savings).

  • annual_rate (float):
    Annual interest rate expressed as a percentage (e.g., 5 for 5%).

  • n_periods (int):
    Total number of periods (typically in months) over which the calculation will be performed.

  • contribution (float, optional):
    The amount paid or contributed per period (e.g., monthly contributions). Defaults to 0 if not provided.


Python Ecosystem

The FinanceCalculator2025 package situates itself within the Python ecosystem as a learning-oriented initiative aimed at developing practical skills in financial computation and programming. While the Python ecosystem already includes robust packages and applications like Loan Calculator and Financial Calculator App, this project differentiates itself by offering an accessible, user-friendly tools that simplifies core financial concepts. With intuitive function names like calculate_contribution, future_value, and present_value, it allows users — especially beginners and students — to quickly grasp the essentials without needing to understand complex financial formulas. This project also serves as a hands-on exercise for those eager to deepen their understanding of both finance and Python programming, making it a valuable resource for anyone looking to deepen their understanding of financial concepts and Python development.


Developer Note

  1. Clone this repository and navigate to the project root directory.

  2. Create a new virtual environment in terminal and activate it:

conda create --name financecalculator2025 python=3.11.0
conda activate financecalculator2025
  1. To install the needed packages via poetry, run the following command. If poetry hasn't been set up yet, please following this link for installtion.
poetry install
  1. To test the package and check coverage, run the following command
pytest tests/
pytest tests/ --cov=financecalculator2025
  1. The set up is done! You can now use the FinanceCalculator2025 package! Please click on the function documentation at the top of this README on how to use the package.

Usage

The FinanceCalculator2025 package allows users to perform essential financial calculations conveniently. Below is a quick start example of how to use this package:

import pandas as pd

import financecalculator2025
from financecalculator2025.present_value import present_value
from financecalculator2025.future_value import future_value
from financecalculator2025.contribution import calculate_contribution
from financecalculator2025.n_periods import n_periods

Calculate periodic payments for a loan:

payment = calculate_contribution(principal=20000, future_value=0, annual_rate=5, n_periods=24)

Calculate future value of an investment:

fv = future_value(principal=5000, annual_rate=7, n_periods=36, contribution=200)

Calculate present value for a target amount

pv = present_value(principal=0, annual_rate=4, n_periods=12, contribution=500)

Calculate the number of months to reach a goal

months = n_periods(principal=10000, annual_rate=6, future_value=50000, contribution=300)

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.


License

FinanceCalculator2025 was created by Meagan Gardner, Zoe Ren, Ziming Fang, and Chaoyu Ou. It is licensed under the terms of the MIT license.


Credits

FinanceCalculator2025 was created with cookiecutter and the py-pkgs-cookiecutter template.

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

financecalculator2025-0.1.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

financecalculator2025-0.1.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file financecalculator2025-0.1.2.tar.gz.

File metadata

  • Download URL: financecalculator2025-0.1.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for financecalculator2025-0.1.2.tar.gz
Algorithm Hash digest
SHA256 18a7ec450accd49227bf8e3222211f49c261d63079ece52f1e33d20c15b72178
MD5 5b526c02a122299092e875a907119a32
BLAKE2b-256 796745f78ce3d21906d74b4bf6207cc3fbe99e6cd8d7bede33f94986f01c9b9d

See more details on using hashes here.

File details

Details for the file financecalculator2025-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for financecalculator2025-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e6a64874b88fe0ea59ed5b51eaa8bf9a0df960094f3994665ba3d54daf5a2c4
MD5 e953015f9233928eca9d9ca3f9de5e33
BLAKE2b-256 f447abe4d34592aa9ea42b700fa71a3e977889074ee6bf018da93dc9db735af0

See more details on using hashes here.

Supported by

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