{"id":20052430,"url":"https://github.com/hyperjiang/finance","last_synced_at":"2025-07-04T00:06:28.719Z","repository":{"id":57533931,"uuid":"277324161","full_name":"hyperjiang/finance","owner":"hyperjiang","description":"Financial functions with the Excel function names and parameter order, along with an installment calculator.","archived":false,"fork":false,"pushed_at":"2020-08-01T23:43:02.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T08:46:02.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperjiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-05T14:59:44.000Z","updated_at":"2020-08-01T23:37:52.000Z","dependencies_parsed_at":"2022-09-26T18:21:23.061Z","dependency_job_id":null,"html_url":"https://github.com/hyperjiang/finance","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hyperjiang/finance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Ffinance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Ffinance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Ffinance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Ffinance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjiang","download_url":"https://codeload.github.com/hyperjiang/finance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Ffinance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263421933,"owners_count":23464049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T12:17:39.415Z","updated_at":"2025-07-04T00:06:27.554Z","avatar_url":"https://github.com/hyperjiang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# finance\n\n[![GoDoc](https://godoc.org/github.com/hyperjiang/finance?status.svg)](https://pkg.go.dev/github.com/hyperjiang/finance?tab=doc)\n[![Build Status](https://travis-ci.org/hyperjiang/finance.svg?branch=master)](https://travis-ci.org/hyperjiang/finance)\n[![](https://goreportcard.com/badge/github.com/hyperjiang/finance)](https://goreportcard.com/report/github.com/hyperjiang/finance)\n[![codecov](https://codecov.io/gh/hyperjiang/finance/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperjiang/finance)\n[![Release](https://img.shields.io/github/release/hyperjiang/finance.svg)](https://github.com/hyperjiang/finance/releases)\n\nFinancial functions with the Excel function names and parameter order, along with an installment calculator.\n\nRequire go version \u003e= 1.13.\n\n## Available Functions\n\n- `PMT`: calculates the payment for a loan based on constant payments and a constant interest rate.\n- `IPMT`: returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.\n- `PPMT`: returns the payment on the principal for a given period for an investment based on periodic, constant payments and a constant interest rate.\n- `PV`: returns the present value of an investment.\n- `FV`: returns the future value of an investment based on periodic, constant payments and a constant interest rate.\n- `NPER`: returns the number of periods for an investment based on periodic, constant payments and a constant interest rate.\n- `RATE`: calculates interest rate per period of an annuity.\n\n## Installment Calculator\n\nDemo usage:\n\n```\nimport (\n    \"fmt\"\n    \"github.com/hyperjiang/finance\"\n)\n\nloan := finance.Loan{\n    AnnualRate: 0.07,\n    Periods:    12,\n    Amount:     1000000,\n    Method:     finance.EqualPayment,\n}\n\ninstallments := loan.CalculateInstallments()\n\nfmt.Println(installments)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjiang%2Ffinance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjiang%2Ffinance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjiang%2Ffinance/lists"}