@prestamype/financial-functions

0.0.1 • Public • Published

financial-functions

Implementación de funciones financieras.


cronograma

Summary

Utility functions to calculate payment schedules

Types

  • payment_item

Functions

  • flexible(amount, nper, i_rate, commission_rate)
  • fija(amount, nper, i_rate, commission_rate)
  • puente(amount, nper, i_rate, commission_rate)

Types

payment: { i: Number, amortization: Number, fee: Number }

Where:

  • i: interes en soles
  • amortization: amortizacion en soles
  • fee: cuota total en soles, suma de interes y amortizacion. Por conveniencia para sacar el flujo directamente

Functions

All cronograma functions are implementations of the same interface that calculates the payment schedule. total_amount: es amount + el total de la comision a pagar

  • flexible(amount, nper, i_rate, commission_rate)
    flexible(Number, Number, Number, Number) :: { payments: [payment], total_amount: Number }
  • fija(amount, nper, i_rate, commission_rate)
    fija(Number, Number, Number, Number) :: { payments: [payment], total_amount: Number }
  • puente(amount, nper, i_rate, commission_rate)
    puente(Number, Number, Number, Number) :: { payments: [payment], total_amount: Number }

tasa

Summary

Types

Functions

  • tir(flow)
  • tcea(tir)
  • main(flow)

Types

Functions

  • tir(flow) Obtener la Tasa Interna de Retorno (TIR) a partir de un flujo, usualmente el primer elemento es el monto desembolsado total_amount y los siguientes son payment.fee
    async tir([Number]) :: Number | null
  • tcea(tir)
    tcea(Number) :: Number
  • main(flow)
    async main([Number]) :: { tir: Number | null, tcea: Number | null, tcem: Number | null }

Package Sidebar

Install

npm i @prestamype/financial-functions

Weekly Downloads

26

Version

0.0.1

License

ISC

Unpacked Size

16.3 kB

Total Files

20

Last publish

Collaborators

  • prestamype_dev
  • fjuarez97