Skip to main content

mortgage_calculator:

Project description

mortgage_calculator

Repository that calculate the mortgage roadmap of two types of mortgage calculators:

  • Mortgage_Constant_ChargeOff: Mortgage roadmap where you pay an constat chart off each month
  • Mortgage_Constant_Pay: Mortgage roadmap where you pay an constat fee each monthmap

How it work:

  1. Create en python environent and install the package using de command:

    pip install mortgage-roadmap
    
  2. Once you get installed the package you can import the packahe in the python module by:

    • import the classes:

      from mortgage_roadmap import ( Mortgage_Constant_ChargeOff, Mortgage_Constant_Pay )
      
    • import the module:

      import mortgage_roadmap 
      

Examples:

  1. Basic exaple where we import the nodule with all the classes. Then we change the amount of units that we will as output. Thrn we create a dataframe as output an as last we export the information in an excel file
from mortgage_roadmap import *
Mortgage_Constant_ChargeOff.setDecimals(4)

a = Mortgage_Constant_ChargeOff(100000., 50, 4,8)

a.create_Dataframe

{'roadmap': [{'dept': 133543.56, 'charge_off': 1456.44, '.....'

a.create_XLSX_File('data/xlsx/mortgage_inform.xlsx')

Compatibility:

  1. Dependency of this package:

    • sympy
    • basic-decorators
  2. Optional Packages to use all features of this package:

    • pandas
    • openpyxl

Content:

  • Mortgage_Constant_ChargeOff (class): Class that calculate an constant chargeoff Morgage:

    • Parameters:
      • INITIAL_DEPT ( int | float): Is the initial dept of the mortgage
      • QUOTAS ( int ): Number of quotas of the Mortgage
      • APR ( int | float): The interest that must be payed ofver an period of 12 months
    • Methods:
      • Strict Class Methods:
        • getDecimals(cls): strict class method that return the defined number of decimals as output of the calculations
        • setDecimals(cls, value: int): strict class method that is used to set the number of decimals as output of the calculations
      • Create or Build Informs:
        • create_Dataframe(self): Create an dataframe with all the information related with the mortgage
        • create_XLS_File(self, path: str): method that create an excel file with the extension '.xls'
        • create_XLSX_File(self, path: str): method that create an excel file with the extension '.xlsx'
        • create_CSV_File(self, path: str): method that create an comma separated csv file with the extension '.csv'
      • Getters:
        • self.number_of_decimals: get the number of decimals for the outputs
        • self.initial_dept: Is the initial dept of the mortgage
        • self.quotas: Number of quotas of the Mortgage
        • self.APR: The interest that must be payed ofver an period of 12 months
        • self.roadmap: Is the Mortgage roadmap of all the quotas
        • self.inform: dict taht include the roadmap but also all the other relevant information of the mortgage
        • self.total_interest_pay: That is total amout to pay in interest
        • self.total_pay: Is the total ampount to pay of the Mortgage (dept + interest_pay)
      • Setters:
        • self:number_of_decimals: Setter that define the number of decimals (integer) of the outputs
  • Mortgage_Constant_Pay (class): Class that calculate an constant Pay Morgage:

    • Parameters:
      • INITIAL_DEPT ( int | float): Is the initial dept of the mortgage
      • QUOTAS ( int ): Number of quotas of the Mortgage
      • APR ( int | float): The interest that must be payed ofver an period of 12 months
    • Methods:
      • Strict Class Methods:
        • getDecimals(cls): strict class method that return the defined number of decimals as output of the calculations
        • setDecimals(cls, value: int): strict class method that is used to set the number of decimals as output of the calculations
      • Create or Build Informs:
        • create_Dataframe(self): Create an dataframe with all the information related with the mortgage
        • create_XLS_File(self, path: str): method that create an excel file with the extension '.xls'
        • create_XLSX_File(self, path: str): method that create an excel file with the extension '.xlsx'
        • create_CSV_File(self, path: str): method that create an comma separated csv file with the extension '.csv'
      • Getters:
        • self.number_of_decimals: get the number of decimals for the outputs
        • self.initial_dept: Is the initial dept of the mortgage
        • self.quotas: Number of quotas of the Mortgage
        • self.APR: The interest that must be payed ofver an period of 12 months
        • self.roadmap: Is the Mortgage roadmap of all the quotas
        • self.inform: dict taht include the roadmap but also all the other relevant information of the mortgage
        • self.total_interest_pay: That is total amout to pay in interest
        • self.total_pay: Is the total ampount to pay of the Mortgage (dept + interest_pay)
      • Setters:
        • self:number_of_decimals: Setter that define the number of decimals (integer) of the outputs

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

mortgage_roadmap-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

mortgage_roadmap-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file mortgage_roadmap-0.1.0.tar.gz.

File metadata

  • Download URL: mortgage_roadmap-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for mortgage_roadmap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 845e20f9618b829ba6f5010c6b06dc06d4bb0728ed9d6bb6372d735f19d0e602
MD5 5e3c7cd5fad5df73b2fd22fe959406b1
BLAKE2b-256 c814c63b5a83e53c71bf751ca157b3973dda84426cb76dc6ad5b03b068b42210

See more details on using hashes here.

File details

Details for the file mortgage_roadmap-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mortgage_roadmap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 799f44b227bfe529fdbad3efa66e5c4b894ac0e5e6f856b731333f890787eb91
MD5 03657e86e18e8bc14b800753ede08486
BLAKE2b-256 fb08d6d6f1309e8dbb11f0ee321c07d3c17c9e0bdd61aa8e68b68700b4aa9b90

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