Git Product home page Git Product logo

interestratecalculator's Introduction

Demo version - https://nelg.github.io/InterestRateCalculator/InterestRateCalculator.html

This tools is for calculating the after-tax return and various other related values for a given principal amount and a set of interest rates, personal tax rate, and portfolio investment income tax rate. It uses the argparse library to parse command line arguments for the principal, pir_tax_rate, personal_tax_rate, and interest_rates. It then iterates over the interest rates, calculates various values for each rate, and appends the results to a list. Finally, it prints the results in a table using the tabulate library, with various values colored using the terminalcolor library.

The code also includes some helper functions for converting between RGB and hex color codes and generating color gradients.

Screenshot

Screenshot

Requirements:

pip install -r requirements.txt -t .

Example output:

-------- INPUTS --------- Principal: $ 100000.00 PIR Tax Rate: 28.00% Personal Tax Rate: 33.00%

Interest Rate Return Before Taxes Tax Payable Personal Interest Rate Return Before Taxes Tax Payable After-tax Return (using input interest rate) (using PIR tax rate) (you need at least this) (using calculated interest rate) (using personal tax rate)


4.00% $ 4000.00 $ 1120.00 4.30% $ 4298.51 $ 1418.51 $ 2880.00 5.00% $ 5000.00 $ 1400.00 5.37% $ 5373.13 $ 1773.13 $ 3600.00 5.20% $ 5200.00 $ 1456.00 5.59% $ 5588.06 $ 1844.06 $ 3744.00 5.50% $ 5500.00 $ 1540.00 5.91% $ 5910.45 $ 1950.45 $ 3960.00 5.60% $ 5600.00 $ 1568.00 6.02% $ 6017.91 $ 1985.91 $ 4032.00 5.80% $ 5800.00 $ 1624.00 6.23% $ 6232.84 $ 2056.84 $ 4176.00 6.00% $ 6000.00 $ 1680.00 6.45% $ 6447.76 $ 2127.76 $ 4320.00 7.00% $ 7000.00 $ 1960.00 7.52% $ 7522.39 $ 2482.39 $ 5040.00 8.00% $ 8000.00 $ 2240.00 8.60% $ 8597.01 $ 2837.01 $ 5760.00 9.00% $ 9000.00 $ 2520.00 9.67% $ 9671.64 $ 3191.64 $ 6480.00 10.00% $ 10000.00 $ 2800.00 10.75% $ 10746.27 $ 3546.27 $ 7200.00 11.00% $ 11000.00 $ 3080.00 11.82% $ 11820.90 $ 3900.90 $ 7920.00

Example use:

python3 InterestRateCalculator.py --principal 50000 0.06 0.07

seq 1 .2 40 | xargs python3 InterestRateCalculator.py

lolcat output

./InterestRateCalculator.py | lolcat

HTML output:

yay python-ansi2html python3 InterestRateCalculator.py --principal 500000 4 4.2 4.4 4.6 4.7 4.8 30 33 | ansi2html > InterestRates.html

interestratecalculator's People

Contributors

nelg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.