
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
FinanceMath is a Ruby library for mapping Loan based Exel functions. It deals with problem of calculating the PMT and APR functions. It implements advanced usage, taking into account bank fees, fee for for each payment and currency protection (if currency other than $ USD). Highly precise with high speed of execution.
FinanceMath is available as a gem, to install it just install the gem:
gem install finance_math
If you're using Bundler, add the gem to Gemfile.
gem 'finance_math'
Run bundle install
.
bundle exec rspec spec/
Create an instance, and pass parameters for nominal annual rate, duration (in months), and amount of loan. Defaults are structure_fee = 5, currency protection = 3, so please update if you need other values.
FinanceMath::Loan.new(nominal_rate: 10.5, duration: 12, amount: 15000)
Create an instance, and pass parameters for nominal annual rate, duration (in months), and amount of loan, and additional values such as bank fee, currency protection, and fee for each monthly payment.
Defaults are structure_fee = 5, currency protection = 3, so please update if you need other values.
FinanceMath::Loan.new(nominal_rate: 10.5, duration: 12, amount: 15000, structure_fee: 5.1, currency_protection: 2.75, fee: 25)
This is the list of available functions.
Calculates the periodic payment for an annuity investment based on constant-amount periodic payments and a constant interest rate.
loan = FinanceMath::Loan.new(nominal_rate: 10, duration: 12, amount: 1000)
loan.pmt
# 87.9158872300099
Calculates the Annual Percentage Rate.
loan = FinanceMath::Loan.new(nominal_rate: 13, duration: 12, amount: 10000)
loan.apr
#29.179538647635006
loan = FinanceMath::Loan.new(nominal_rate: 15, duration: 36, amount: 10000, structure_fee: 5, currency_protection: 3, fee: 10)
loan.apr
#23.964418264624054
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Please cover with tests your pull requests
Currently supported version of 2.x and 3.x
Finance Math is maintained and sponsored by [Kolosek] (http://kolosek.com).
Initially developed by Nesha Zoric
###Follow up @kolosek
MIT License. See LICENSE for details.
FAQs
Unknown package
We found that finance_math demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.