This Rust application calculates loan amortisation schedules. It takes several parameters as command line arguments and outputs a detailed amortisation schedule.
- Calculates monthly payments for a loan
- Provides a detailed amortisation schedule
- Supports different interest calculation methods
To use this application, you need to provide the following command line arguments:
--principalor-p: The principal amount of the loan--rateor-r: The annual interest rate (as a percentage)--num_paymentsor-n: The number of payments (months)--disbursal_dateor-d: The disbursal date of the loan (YYYY-MM-DD)--first_payment_dateor-f: The date of the first payment (YYYY-MM-DD)--first_capitalisation_dateor-c: The first capitalisation date (YYYY-MM-DD)--interest_methodor-i: The interest calculation method (Convention30_360, Actual365, Actual360, ActualActual)--interest_typeor-t: The interest rate type (Simple, Compound)
cargo run -- \
--principal 15000 \
--rate 8.9 \
--num_payments 36 \
--disbursal_date 2023-01-01 \
--first_payment_date 2023-02-01 \
--first_capitalisation_date 2023-01-15 \
--interest_method ActualActual \
--interest_type SimpleTo build the executable, run the following command in the root directory of the project:
cargo build && wasm-pack build --target webFor a release build, use:
cargo build --releaseThe executable will be located in the target/debug or target/release directory, respectively.
To run the tests for this project, use the following command:
cargo testThis project uses the following dependencies:
clap: For parsing command line argumentschrono: For handling datesrust_decimal: For precise decimal arithmetic
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
The GNU General Public License v3.0 ensures that this software remains free for all its users. You are free to use, modify, and distribute this software, provided that any derivative works are also licensed under the same terms. This license guarantees that users interacting with the software over a network can receive the source code of the software.
David Neale - david@neale.dev