Skip to content

A comprehensive loan calculator that supports both annuity and differentiated payment calculations, offering detailed loan repayment insights based on user inputs.

License

Notifications You must be signed in to change notification settings

RafaelKarcz/LoanCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Loan Calculator Project

This document provides instructions for setting up the Python environment on a Linux system using Anaconda and Conda, and it outlines the steps for running a Python-based loan calculator that computes monthly payments and differentiated payments.

Environment Setup

  1. Creating a New Conda Environment:

    To create a new isolated environment for the project:

    conda create --name loancalculator python=3.12

    This command creates a new environment named loancalculator with Python 3.12.

  2. Activating the Environment:

    Activate the created environment with the following command:

    conda activate loancalculator

    This ensures that any Python operations or package installations are confined to this environment.

  3. Installing Necessary Packages:

    Install necessary packages required for running the loan calculator:

    conda install argparse math

Project Execution

The core of this project involves calculating loan payments based on the user-provided loan parameters. The loan calculator script, loan_calculator.py, supports both annuity and differentiated payment calculations.

  1. Running the Loan Calculator:

    Navigate to the directory containing loan_calculator.py and run the script with the necessary arguments. For example, to calculate the annuity payment for a loan with a principal of 1,000,000 over 60 months at an interest rate of 10%:

    python loan_calculator.py --type=annuity --principal=1000000 --periods=60 --interest=10

    To calculate differentiated payments for a loan with a principal of 500,000 over 8 months at an interest rate of 7.8%:

    python loan_calculator.py --type=diff --principal=500000 --periods=8 --interest=7.8
  2. Arguments:

    • --type: The type of calculation (annuity or diff).
    • --principal: The loan principal amount (must be a positive number).
    • --periods: The total number of repayment periods (must be a positive number).
    • --interest: The annual interest rate without the percentage sign (must be a positive number).
    • --payment: The monthly payment amount (must be a positive number, used only for annuity calculations).

Example Usages

  1. Calculate Annuity Payment:

    python loan_calculator.py --type=annuity --principal=1000000 --periods=60 --interest=10

    Output: Your monthly payment = 21248! Overpayment = 274880

  2. Calculate Differentiated Payments:

    python loan_calculator.py --type=diff --principal=500000 --periods=8 --interest=7.8

    Output: Month 1: payment is 65750 Month 2: payment is 65344 ... Overpayment = 14628

Contributing

Contributions to this project are welcome. Please ensure to maintain the environment specifications and follow the coding standards used in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A comprehensive loan calculator that supports both annuity and differentiated payment calculations, offering detailed loan repayment insights based on user inputs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages