An open API service indexing awesome lists of open source software.

https://github.com/xandersteyn/hyperiondev.finance-calculator

CLI finance calculator for investments and bonds ~ built in Python
https://github.com/xandersteyn/hyperiondev.finance-calculator

hyperiondev portfolio software-engineering

Last synced: 5 months ago
JSON representation

CLI finance calculator for investments and bonds ~ built in Python

Awesome Lists containing this project

README

          


Variables and Control Structures - CLI Investment & Bond Calculator

Features

- **Investment Calculator:** Calculate returns on investments with both simple and compound interest
- **Bond Calculator:** Calculate monthly home loan repayments
- **Input Validation:** Robust error handling with positive number validation
- **User-Friendly Interface:** Clear prompts and formatted output
- **Recursive Operation:** Option to perform multiple calculations in one session
- **Comprehensive Error Handling:** Graceful handling of invalid inputs

How It Works

- **Investment Calculator:**

- *Simple Interest:*
`A = P × (1 + r × t)`

- *Compound Interest:*
`A = P × (1 + r) ^ t`

*Where:*
`P` = principal amount
`r` = annual interest rate (decimal)
`t` = number of years invested

- **Bond Calculator:**

- *Monthly Repayment:*
`repayment = (i × P) / (1 - (1 + i) ^ (-n))`

*Where:*
`P` = present value (house price)
`i` = monthly interest rate (decimal)
`n` = number of months to repay

Technologies Used

- **Python** – Core programming language
- **Math Module** – For mathematical calculations (pow function)

Setup Instructions

#### 1. Clone the repository
```bash
git clone https://github.com/XanderSteyn/HyperionDev.Variables-Control-Structures/
```

#### 2. Change to the project directory
```bash
cd "HyperionDev.Variables-Control-Structures"
```

#### 3. Run the application
```bash
python finance_calculators.py
```

License

This repository is protected by a custom license. See the [LICENSE](LICENSE) file for details.

Unauthorized copying or submission of this work for academic purposes is prohibited.