| Crates.io | rust_finprim |
| lib.rs | rust_finprim |
| version | 0.4.0 |
| created_at | 2024-06-05 01:35:55.117501+00 |
| updated_at | 2025-04-14 00:29:12.919701+00 |
| description | Various finance and accounting calculations/formulas implemented Rust |
| homepage | |
| repository | https://github.com/daneski13/rust-finprim |
| max_upload_size | |
| id | 1262273 |
| size | 151,852 |
This is a minimal library providing various primitive functions to perform financial calculations.
Built on top of the rust_decimal crate, providing high precision while maintaining respectable performance. The Decimal type provides a fixed-point decimal number of up to 28 significant digits. Offering much more precision than calculations using an f64 and implementations in spreadsheet programs.
Some functions and their args mimic those found in Excel and Google Sheets.
rust_finprim::tvm module.
rust_finprim::rate module.
rust_finprim::amort_dep_tax module.
rust_finprim::derivatives module.
1st and 2nd derivative of present value with respect to interest rate
1st and 2nd derivative of WACC (Weighted Average Cost of Capital) with respect to the debt/equity ratio
There are a few features that can be enabled:
std - Enabled by default. You can use the library in a no_std environment with default-features = false in your Cargo.toml.serde - Enables serialization and deserialization of the provided structs using serde.Add the following to your Cargo.toml:
[dependencies]
rust_finprim = "0.4.0"
Or
cargo add rust_finprim