loango

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 1 Imported by: 0

README

loan-go

ローンの計算

usage

$ go install github.com/haton14/loan-go/cmd/loan@v0.0.1

$ loan -help     
Usage of loan:
  -interestRate float
        金利(年利)(%) (default 1)
  -principal int
        元金 - 借りる金額 (単位: 円) (default 10000000)
  -term int
        期間(月) (default 420)

## 今のところは元利金等返済での、毎月の支払額, 毎月の元金額, 利息額を求める機能だけ対応しています
$ loan --principal 10000000 --interestRate 0.625 --term 420
月の支払額: 26514.7336202080067668863
元金, 利息
21306.4002868746737668309, 5208.3333333333330000554

## 住宅ローン金利の上がり幅に対して125%ルール内に収まっているか確認するなどに使えます
$ loan --principal 10000000 --interestRate 1.625 --term 420
31234.4320858842827750994

$ python
>>> 31234.4320858842827750994 / 26514.7336202080067668863
1.1780028618533507

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterestRate

type InterestRate = udecimal.Decimal

金利(年利)(%)

type MonthlyPayment added in v0.0.2

type MonthlyPayment = udecimal.Decimal

func CalculateMonthlyPayment

func CalculateMonthlyPayment(p Principal, r InterestRate, t Term) MonthlyPayment

for level payment

type Principal

type Principal = udecimal.Decimal

元金

type RemainingPrincipal added in v0.0.2

type RemainingPrincipal = udecimal.Decimal

func CalculateRemainingPrincipal added in v0.0.2

func CalculateRemainingPrincipal(p Principal, r InterestRate, x MonthlyPayment, currentMonth Term) RemainingPrincipal

for level payment

type Term

type Term = int32

期間(年)

Directories

Path Synopsis
cmd
loan command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL