tvm

R 패키지 메타데이터와 수집 신호를 모아 봅니다.

Packages / CRAN / tvm

tvm

v0.5.2
Repository CRANLicense MIT + file LICENSELifecycle activeNeeds compilation no
DOI
10.32614/CRAN.package.tvm
Task views
Empirical Finance
Reverse imports
39

Core Signals

첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.

2
Task views
Empirical Finance
Reverse imports
39

Supported Backends

DESCRIPTION에서 감지한 backend 관련 package입니다.

0
backend package 신호가 없습니다.

Quick Facts

기본 메타데이터를 작은 카드와 토큰으로 압축합니다.

profile
Repository
CRAN
Version
0.5.2
License
MIT + file LICENSE
Lifecycle
active
Needs compilation
no
Reverse imports
39
Last observed
2026-05-30
CRAN
cran.r-project.org/package=tvm

수집 소스별 패키지 정보

1개 소스
CRAN
0.5.2
2026-05-30
License
MIT + file LICENSE
Depends
R (>= 3.1.0)
Imports
ggplot2, reshape2, scales, stats, utils
Suggests
testthat, knitr, markdown, rmarkdown
Needs compilation
no
Reverse imports
39
Lifecycle
active
Last observed
2026-05-30 10:45:11

이 패키지가 의존하는 패키지

5개 표시전체 9개
PackageTypeSpec
ggplot2
CRAN · 0.5.2 · 2026-05-30
Importsggplot2
reshape2
CRAN · 0.5.2 · 2026-05-30
Importsreshape2
scales
CRAN · 0.5.2 · 2026-05-30
Importsscales
stats
CRAN · 0.5.2 · 2026-05-30
Importsstats
utils
CRAN · 0.5.2 · 2026-05-30
Importsutils
1 / 2

이 패키지를 쓰는 패키지

1개 표시전체 1개
PackageTypeSpec
yrnd
0.1.3
CRAN · 2026-05-30
Importstvm
1 / 1

Reverse dependency summary

1 types
TypePackages
Imports1

패키지 페이지

Reverse imports
2
All links
33
Repository
CRAN
Version
0.5.2
Collected
2026-05-20 03:38:29
Package page
https://cran.r-project.org/web/packages/tvm/index.html
DOI
10.32614/CRAN.package.tvm
CRAN checks
https://cran.r-project.org/web/checks/check_results_tvm.html
README
https://cran.r-project.org/web/packages/tvm/readme/README.html
NEWS
https://cran.r-project.org/web/packages/tvm/news/news.html
Reference HTML
https://cran.r-project.org/web/packages/tvm/refman/tvm.html
Reference PDF
https://cran.r-project.org/web/packages/tvm/tvm.pdf
Source package
https://cran.r-project.org/src/contrib/tvm_0.5.2.tar.gz
Archive
https://CRAN.R-project.org/src/contrib/Archive/tvm
In views
Finance
Page fields
Author
Juan Manuel Truppia
CRAN Checks
tvm results
DOI
10.32614/CRAN.package.tvm
In Views
Finance
License
MIT + file LICENSE
Maintainer
Juan Manuel Truppia <jmtruppia at gmail.com>
Materials
README , NEWS
NeedsCompilation
no
Old Sources
tvm archive
Package Source
tvm_0.5.2.tar.gz
Published
2023-08-30
Reference Manual
tvm.html , tvm.pdf
Reverse Imports
yrnd
URL
https://bitbucket.org/juancentro/tvm
Version
0.5.2
Vignettes
Intro ( source , R code )
Windows Binaries
r-devel: tvm_0.5.2.zip , r-release: tvm_0.5.2.zip , r-oldrel: tvm_0.5.2.zip
MacOS Binaries
r-release (arm64): tvm_0.5.2.tgz , r-oldrel (arm64): tvm_0.5.2.tgz , r-release (x86_64): tvm_0.5.2.tgz , r-oldrel (x86_64): tvm_0.5.2.tgz
Version
0.5.2
Published
2023-08-30
DOI
10.32614/CRAN.package.tvm
Author
Juan Manuel Truppia
Maintainer
Juan Manuel Truppia <jmtruppia at gmail.com>
License
MIT + file LICENSE
URL
https://bitbucket.org/juancentro/tvm
NeedsCompilation
no
Materials
README , NEWS
In Views
Finance
CRAN Checks
tvm results
Reference Manual
tvm.html , tvm.pdf
Vignettes
Intro ( source , R code )
Package Source
tvm_0.5.2.tar.gz
Windows Binaries
r-devel: tvm_0.5.2.zip , r-release: tvm_0.5.2.zip , r-oldrel: tvm_0.5.2.zip
MacOS Binaries
r-release (arm64): tvm_0.5.2.tgz , r-oldrel (arm64): tvm_0.5.2.tgz , r-release (x86_64): tvm_0.5.2.tgz , r-oldrel (x86_64): tvm_0.5.2.tgz
Old Sources
tvm archive
Reverse Imports
yrnd
Page sections 4
Documentation
Heading
Documentation
Links
[{"label":"tvm.html","section":"","type":"","url":"https://cran.r-project.org/web/packages/tvm/refman/tvm.html"},{"label":"tvm.pdf","section":"","type":"","url":"https://cran.r-project.org/web/packages/tvm/tvm.pdf"},{"label":"Intro","section":"","type":"","url":"https://cran.r-project.org/web/packages/tvm/vignettes/intro.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/tvm/vignettes/intro.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/tvm/vignettes/intro.R"}]
Text
Reference manual: tvm.html , tvm.pdf Vignettes: Intro ( source , R code )
Downloads
Heading
Downloads
Links
[{"label":"tvm_0.5.2.tar.gz","section":"","type":"","url":"https://cran.r-project.org/src/contrib/tvm_0.5.2.tar.gz"},{"label":"tvm_0.5.2.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.7/tvm_0.5.2.zip"},{"label":"tvm_0.5.2.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.6/tvm_0.5.2.zip"},{"label":"tvm_0.5.2.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.5/tvm_0.5.2.zip"},{"label":"tvm_0.5.2.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/sonoma-arm64/contrib/4.6/tvm_0.5.2.tgz"},{"label":"tvm_0.5.2.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/tvm_0.5.2.tgz"},{"label":"tvm_0.5.2.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.6/tvm_0.5.2.tgz"},{"label":"tvm_0.5.2.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.5/tvm_0.5.2.tgz"},{"label":"tvm archive","section":"","type":"","url":"https://CRAN.R-project.org/src/contrib/Archive/tvm"}]
Text
Package source: tvm_0.5.2.tar.gz Windows binaries: r-devel: tvm_0.5.2.zip , r-release: tvm_0.5.2.zip , r-oldrel: tvm_0.5.2.zip macOS binaries: r-release (arm64): tvm_0.5.2.tgz , r-oldrel (arm64): tvm_0.5.2.tgz , r-release (x86_64): tvm_0.5.2.tgz , r-oldrel (x86_64): tvm_0.5.2.tgz Old sources: tvm archive
Reverse dependencies
Heading
Reverse dependencies
Links
[{"label":"yrnd","section":"","type":"","url":"https://cran.r-project.org/web/packages/yrnd/index.html"}]
Text
Reverse imports: yrnd
Linking
Heading
Linking
Links
[{"label":"https://CRAN.R-project.org/package=tvm","section":"","type":"","url":"https://CRAN.R-project.org/package=tvm"}]
Text
Please use the canonical form https://CRAN.R-project.org/package=tvm to link to this page.
Materials 2
Documentation 5
Vignettes 3
Downloads 9
All page links 33

패키지 문서 원문

4 artifacts
field
NEWS
CRAN · 0.5.2 · Materials · text/html · 1,451 · 2026-05-07
Title
NEWS
Label
NEWS
Text content
Text content
NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} tvm 0.4 Add year fraction and compounding arguments to both xnpv and xirr , providing greater flexibility tvm 0.3 Add vignette and NEWS Prevent negative discount factors when calculating them from swap curves Split zero rates in zero nominal and zero effective A functor argument is added to the rate_curve constructor, to allow the user to specify how the interpolation should be performed. Changing the default spline interpolation method from natural to monoH.FC , as to respect monotonicity if present Add new irregular functions, xnpv and xirr
field
README
CRAN · 0.5.2 · Materials · text/html · 2,771 · 2026-05-07
Title
README
Label
README
Text content
Text content
README code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} Package Description The tvm package aims to simplify financial calculations, involving loan payments and rates, and the transformation from discount factors to different rate types. It has two sections. The first one deals with fixed equal payment loans. There you have functions similar to PMT, RATE, etc from Excel. The second one deals with rate curves and different rates for different loan structures (zero coupon, bullet, french, german, etc). Quick Examples library(tvm) # Present values and internal rate of return calculations npv(i = 0.01, cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3)) xnpv(i = 0.01, cf = c(-1, 0.5, 0.9), d = as.Date(c("2015-01-01", "2015-02-15", "2015-04-10"))) irr(cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3)) xirr(cf = c(-1, 1.5), d = Sys.Date() + c(0, 365)) # Typical loan calculations pmt(amt = 100, maturity = 10, rate = 0.05) rate(amt = 100, maturity = 10, pmt = 15) loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet") # Get the cashflow for a loan l <- loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet") cashflow(l) # Build a rate curve from different inputs rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") rate_curve(fun_r = function(x) rep_len(0.1, length(x)), rate_type = "swap", knots = 1:10) rate_curve(fun_d = function(x) 1 / (1 + x), knots = 1:10) # Subset a rate curve, maybe transforming it to another rate type r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") r["zero_eff"] r["swap",c(1.5, 2)] # Plot a rate curve plot(r) plot(r, rate_type = "german") plot(r, rate_type = c("french", "german")) Installation instructions tvm lives on CRAN, so installation is easy with install.packages("tvm"") More Details Please read the introductory vignette
reference_manual_html
Reference manual HTML
CRAN · 0.5.2 · Documentation · text/html · 23,475 · 2026-05-07
Title
Help for package tvm
Label
Reference manual HTML
Text content
Text content
Help for package tvm const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {tvm} Contents tvm-package [.rate_curve adjust_disc cashflow cft disc_cf disc_value find_rate irr loan npv plot.rate_curve pmt rate rate_curve rem xirr xnpv Type: Package Title: Time Value of Money Functions Version: 0.5.2 Author: Juan Manuel Truppia Maintainer: Juan Manuel Truppia <jmtruppia@gmail.com> Description: Functions for managing cashflows and interest rate curves. License: MIT + file LICENSE Depends: R (≥ 3.1.0) Suggests: testthat, knitr, markdown, rmarkdown Imports: ggplot2, reshape2, scales, stats, utils VignetteBuilder: knitr RoxygenNote: 7.2.3 Encoding: UTF-8 URL: https://bitbucket.org/juancentro/tvm NeedsCompilation: no Packaged: 2023-08-30 13:33:41 UTC; Juan Repository: CRAN Date/Publication: 2023-08-30 13:50:02 UTC tvm: Time Value of Money Functions Description Functions for managing cashflows and interest rate curves. See Also Useful links: https://bitbucket.org/juancentro/tvm Returns a particular rate or rates from a curve Description Returns a particular rate or rates from a curve Usage ## S3 method for class 'rate_curve' r[rate_type = "zero_eff", x = NULL] Arguments r The rate_curve object rate_type The rate type x The points in time to return Value If x is NULL , then returns a rate function of rate_type type. Else, it returns the rates of rate_type type and corresponding to time x Examples r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") r["zero_eff"] r["swap",c(1.5, 2)] Adjusts the discount factors by a spread Description Adjusts the discount factors by a spread Usage adjust_disc(fd, spread) Arguments fd vector of discount factors used to discount cashflows in 1:length(fd) periods spread effective spread Examples adjust_disc(fd = c(0.99, 0.98), spread = 0.01) Get the cashflow for a loan Description Returns the cashflow for the loan, excluding the initial inflow for the loan taker Usage cashflow(l) Arguments l The loan Examples l <- loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet") cashflow(l) Calculates the Total Financial Cost (CFT) Description This is the IRR of the loan's cashflow, after adding all the extra costs Usage cft(amt, maturity, rate, up_fee = 0, per_fee = 0) Arguments amt The amount of the loan maturity The maturity of the loan rate The loan rate, in effective rate up_fee The fee that the loan taker pays upfront per_fee The fee that the loan payer pays every period Details It is assumed that the loan has monthly payments The CFT is returned as an effective rate of periodicity equal to that of the maturity and the rate The interest is calculated over amt + fee Examples cft(amt = 100, maturity = 10, rate = 0.05, up_fee = 1, per_fee = 0.1) Value of a discounted cashflow Description Value of a discounted cashflow Usage disc_cf(fd, cf) Arguments fd The discount factor vector cf The cashflow Examples disc_cf(fd = c(1, 0.99, 0.98, 0.97), cf = c(1, -0.3, -0.4, -0.6)) Calculates the present value of a cashflow Description Calculates the present value of a cashflow Usage disc_value(r, cf, d = 1:length(cf)) Arguments r A rate curve cf The vector of values corresponding to the cashflow d The periods on which the cashflow occurs. If missing, it is assumed that cf[i] occurs on period i Value The present value of the cashflow Examples r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") disc_value(r, cf = c(-1, 1.10), d = c(0,1)) disc_value(r, cf = c(-1, 1.15*1.15), d = c(0,2)) Find the rate for a loan given the discount factors Description Thru a root finding process, this function finds the rate that corresponds to a given set of discount factors, as for the loan to have the same present value discounted with the discount factors or with that constant rate Usage find_rate(m, d, loan_type, interval = c(1e-06, 2), tol = 1e-08) Arguments m The maturity of the loan d The discount factor vector loan_type One of the loan types interval The interval for the root finding process tol The tolerance for the root finding process Examples find_rate(m = 3, d = c(0.99, 0.98, 0.97), loan_type = "bullet") The IRR is returned as an effective rate with periodicity equal to that of the cashflow Description Internal Rate of Return of a periodic cashflow (IRR) Usage irr(cf, ts = seq(from = 0, by = 1, along.with = cf), interval = c(-1, 10), ...) Arguments cf The cashflow ts The times on which the cashflow occurs. It is assumed that cf[idx] happens at moment ts[idx] interval A length 2 vector that indicates the root finding algorithm where to search for the irr ... Other arguments to be passed on to uniroot Examples irr(cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3)) Creates an instance of a loan class Description Creates an instance of a loan class Usage loan(rate, maturity, amt, type, grace_int = 0, grace_amort = grace_int) Arguments rate The periodic effective rate of the loan maturity The maturity of the loan, measured in the same units as the periodicity of the rate amt The amount loaned type The type of loan. Available types are c("bullet","french","german") grace_int The number of periods that the loan doesn't pay interest and capitalizes it. Leave in 0 for zero loans grace_amort The number of periods that the loan doesn't amortize Examples loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet") Net Present Value of a periodic cashflow (NPV) Description Net Present Value of a periodic cashflow (NPV) Usage npv(i, cf, ts = seq(from = 0, by = 1, along.with = cf)) Arguments i The rate used to discount the cashflow. It must be effective and with a periodicity that matches that of the cashflow cf The cashflow ts The times on which the cashflow occurs. It is assumed that cf[idx] happens at moment ts[idx] . If empty, assumes that cf[idx] happens at period idx - 1 Value The net present value at Examples npv(i = 0.01, cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3)) Plots a rate curve Description Plots a rate curve Usage ## S3 method for class 'rate_curve' plot(x, rate_type = NULL, y_labs_perc = TRUE, y_labs_acc = NULL, ...) Arguments x The rate curve rate_type The rate types to plot, in c("french", "fut", "german", "zero_eff", "zero_nom", "swap", "zero_cont") y_labs_perc If TRUE, the y axe is labeled with percentages y_labs_acc If y_labs_perc is TRUE, the accuracy for the percentages (i.e., 1 for xx%, 0.1 for xx.x%, 0.01 for xx.xx%, etc) ... Other arguments (unused) Examples r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") plot(r) ## Not run: plot(r, rate_type = "german") plot(r, rate_type = c("french", "german")) ## End(Not run) The value of the payment of a loan with constant payments (french type amortization) Description The value of the payment of a loan with constant payments (french type amortization) Usage pmt(amt, maturity, rate) Arguments amt The amount of the loan maturity The maturity of the loan rate The rate of the loan Details The periodicity of the maturity and the rate must match, and this will be the periodicity of the payments Examples pmt(amt = 100, maturity = 10, rate = 0.05) The rate of a loan with constant payments (french type amortization) Description The rate of a loan with constant payments (french type amortization) Usage rate(amt, maturity, pmt, extrema = c(1e-04, 1e+09), tol = 1e-04) Arguments amt The amount of the loan maturity The maturity of the loan pmt The payments of the loan extrema Vector of length 2 that has the minimum and maximum value to search for the rate tol The tolerance to use in the root finding algorithm Details The periodicity of the maturity and the payment must match, and this will be the periodicity of the rate (which is returned as an effective rate) Examples rate(amt = 100, maturity = 10, pmt = 15) Creates a rate curve instance Description Creates a rate curve instance U
section
tvm.pdf
CRAN · 0.5.2 · Documentation · application/pdf · 99,144 · 2026-05-07
Title
tvm.pdf
Label
tvm.pdf

Reference for tvm (0.5.2)

18개 topic
[.rate_curve
Returns a particular rate or rates from a curve
CRAN · 0.5.2 · tvm/man/sub-.rate_curve.Rd · 2026-05-07

Returns a particular rate or rates from a curve

Aliases
[.rate_curve
Usage
[rate_curve(r, rate_type = "zero_eff", x = NULL)
Arguments
r
The rate_curve object
rate_type
The rate type
x
The points in time to return
Value
If x is NULL, then returns a rate function of rate_type type. Else, it returns the rates of rate_type type and corresponding to time x
Examples
r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") r["zero_eff"] r["swap",c(1.5, 2)]
adjust_disc
Adjusts the discount factors by a spread
CRAN · 0.5.2 · tvm/man/adjust_disc.Rd · 2026-05-07

Adjusts the discount factors by a spread

Aliases
adjust_disc
Usage
adjust_disc(fd, spread)
Arguments
fd
vector of discount factors used to discount cashflows in 1:length(fd) periods
spread
effective spread
Examples
adjust_disc(fd = c(0.99, 0.98), spread = 0.01)
cashflow
Get the cashflow for a loan
CRAN · 0.5.2 · tvm/man/cashflow.Rd · 2026-05-07

Returns the cashflow for the loan, excluding the initial inflow for the loan taker

Aliases
cashflow
Usage
cashflow(l)
Arguments
l
The loan
Examples
l <- loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet") cashflow(l)
cft
Calculates the Total Financial Cost (CFT)
CRAN · 0.5.2 · tvm/man/cft.Rd · 2026-05-07

This is the IRR of the loan's cashflow, after adding all the extra costs

Aliases
cft
Usage
cft(amt, maturity, rate, up_fee = 0, per_fee = 0)
Arguments
amt
The amount of the loan
maturity
The maturity of the loan
rate
The loan rate, in effective rate
up_fee
The fee that the loan taker pays upfront
per_fee
The fee that the loan payer pays every period
Details
It is assumed that the loan has monthly payments The CFT is returned as an effective rate of periodicity equal to that of the maturity and the rate The interest is calculated over amt + fee
Examples
cft(amt = 100, maturity = 10, rate = 0.05, up_fee = 1, per_fee = 0.1)
disc_cf
Value of a discounted cashflow
CRAN · 0.5.2 · tvm/man/disc_cf.Rd · 2026-05-07

Value of a discounted cashflow

Aliases
disc_cf
Usage
disc_cf(fd, cf)
Arguments
fd
The discount factor vector
cf
The cashflow
Examples
disc_cf(fd = c(1, 0.99, 0.98, 0.97), cf = c(1, -0.3, -0.4, -0.6))
disc_value
Calculates the present value of a cashflow
CRAN · 0.5.2 · tvm/man/disc_value.Rd · 2026-05-07

Calculates the present value of a cashflow

Aliases
disc_value
Usage
disc_value(r, cf, d = 1:length(cf))
Arguments
r
A rate curve
cf
The vector of values corresponding to the cashflow
d
The periods on which the cashflow occurs. If missing, it is assumed that cf[i] occurs on period i
Value
The present value of the cashflow
Examples
r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") disc_value(r, cf = c(-1, 1.10), d = c(0,1)) disc_value(r, cf = c(-1, 1.15*1.15), d = c(0,2))
find_rate
Find the rate for a loan given the discount factors
CRAN · 0.5.2 · tvm/man/find_rate.Rd · 2026-05-07

Thru a root finding process, this function finds the rate that corresponds to a given set of discount factors, as for the loan to have the same present value discounted with the discount factors or with that constant rate

Aliases
find_rate
Usage
find_rate(m, d, loan_type, interval = c(1e-06, 2), tol = 1e-08)
Arguments
m
The maturity of the loan
d
The discount factor vector
loan_type
One of the loan types
interval
The interval for the root finding process
tol
The tolerance for the root finding process
Examples
find_rate(m = 3, d = c(0.99, 0.98, 0.97), loan_type = "bullet")
irr
The IRR is returned as an effective rate with periodicity equal to that of the cashflow
CRAN · 0.5.2 · tvm/man/irr.Rd · 2026-05-07

Internal Rate of Return of a periodic cashflow (IRR)

Aliases
irr
Usage
irr(cf, ts = seq(from = 0, by = 1, along.with = cf), interval = c(-1, 10), ...)
Arguments
cf
The cashflow
ts
The times on which the cashflow occurs. It is assumed that cf[idx] happens at moment ts[idx]
interval
A length 2 vector that indicates the root finding algorithm where to search for the irr
...
Other arguments to be passed on to uniroot
Examples
irr(cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3))
loan
Creates an instance of a loan class
CRAN · 0.5.2 · tvm/man/loan.Rd · 2026-05-07

Creates an instance of a loan class

Aliases
loan
Usage
loan(rate, maturity, amt, type, grace_int = 0, grace_amort = grace_int)
Arguments
rate
The periodic effective rate of the loan
maturity
The maturity of the loan, measured in the same units as the periodicity of the rate
amt
The amount loaned
type
The type of loan. Available types are c("bullet","french","german")
grace_int
The number of periods that the loan doesn't pay interest and capitalizes it. Leave in 0 for zero loans
grace_amort
The number of periods that the loan doesn't amortize
Examples
loan(rate = 0.05, maturity = 10, amt = 100, type = "bullet")
npv
Net Present Value of a periodic cashflow (NPV)
CRAN · 0.5.2 · tvm/man/npv.Rd · 2026-05-07

Net Present Value of a periodic cashflow (NPV)

Aliases
npv
Usage
npv(i, cf, ts = seq(from = 0, by = 1, along.with = cf))
Arguments
i
The rate used to discount the cashflow. It must be effective and with a periodicity that matches that of the cashflow
cf
The cashflow
ts
The times on which the cashflow occurs. It is assumed that cf[idx] happens at moment ts[idx]. If empty, assumes that cf[idx] happens at period idx - 1
Value
The net present value at
Examples
npv(i = 0.01, cf = c(-1, 0.5, 0.9), ts = c(0, 1, 3))
plot.rate_curve
Plots a rate curve
CRAN · 0.5.2 · tvm/man/plot.rate_curve.Rd · 2026-05-07

Plots a rate curve

Aliases
plot.rate_curve
Usage
plotrate_curve(x, rate_type = NULL, y_labs_perc = TRUE, y_labs_acc = NULL, ...)
Arguments
x
The rate curve
rate_type
The rate types to plot, in c("french", "fut", "german", "zero_eff", "zero_nom", "swap", "zero_cont")
y_labs_perc
If TRUE, the y axe is labeled with percentages
y_labs_acc
If y_labs_perc is TRUE, the accuracy for the percentages (i.e., 1 for xx%, 0.1 for xx.x%, 0.01 for xx.xx%, etc)
...
Other arguments (unused)
Examples
r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") plot(r) plot(r, rate_type = "german") plot(r, rate_type = c("french", "german"))
pmt
The value of the payment of a loan with constant payments (french type amortization)
CRAN · 0.5.2 · tvm/man/pmt.Rd · 2026-05-07

The value of the payment of a loan with constant payments (french type amortization)

Aliases
pmt
Usage
pmt(amt, maturity, rate)
Arguments
amt
The amount of the loan
maturity
The maturity of the loan
rate
The rate of the loan
Details
The periodicity of the maturity and the rate must match, and this will be the periodicity of the payments
Examples
pmt(amt = 100, maturity = 10, rate = 0.05)
rate
The rate of a loan with constant payments (french type amortization)
CRAN · 0.5.2 · tvm/man/rate.Rd · 2026-05-07

The rate of a loan with constant payments (french type amortization)

Aliases
rate
Usage
rate(amt, maturity, pmt, extrema = c(1e-04, 1e+09), tol = 1e-04)
Arguments
amt
The amount of the loan
maturity
The maturity of the loan
pmt
The payments of the loan
extrema
Vector of length 2 that has the minimum and maximum value to search for the rate
tol
The tolerance to use in the root finding algorithm
Details
The periodicity of the maturity and the payment must match, and this will be the periodicity of the rate (which is returned as an effective rate)
Examples
rate(amt = 100, maturity = 10, pmt = 15)
rate_curve
Creates a rate curve instance
CRAN · 0.5.2 · tvm/man/rate_curve.Rd · 2026-05-07

Creates a rate curve instance

Aliases
rate_curve
Usage
rate_curve( rates = NULL, rate_type = "zero_eff", pers = 1:length(rates), rate_scale = 1, fun_d = NULL, fun_r = NULL, knots = seq.int(from = 1, to = max(pers), by = 1), functor = function(x, y) splinefun(x = x, y = y, method = "monoH.FC") )
Arguments
rates
A rate vector
rate_type
The rate type. Must be on of c("fut", "zero_nom", "zero_eff", "swap", "zero_cont)
pers
The periods the rates correspond to
rate_scale
In how many periods is the rate expressed. For example, when measuring periods in days, and using annual rates, you should use 365. When measuring periods in months, and using annual rates, you should use 12. If no scaling, use 1.
fun_d
A discount factor function. fun_d(x) returns the discount factor for time x, vectorized on x
fun_r
A rate function. fun_r(x) returns the EPR for time x, vectorized on x
knots
The nodes used to bootstrap the rates. This is a mandatory argument if a rate function or discount function is provided
functor
A function with parameters x and y, that returns a function used to interpolate
Examples
rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") rate_curve(fun_r = function(x) rep_len(0.1, length(x)), rate_type = "swap", knots = 1:12) rate_curve(fun_d = function(x) 1 / (1 + x), knots = 1:12)
Note
Currently a rate curve can only be built from one of the following sources A discount factor function A rate function and a rate type from the following types: "fut", "zero_nom", "zero_eff", "swap" or "zero_cont A rate vector, a pers vector and a rate type as before
rem
Remaining capital in a loan
CRAN · 0.5.2 · tvm/man/rem.Rd · 2026-05-07

The amount that has to be repayed at each moment in a loan, at the end of the period

Aliases
rem
Usage
rem(cf, amt, r)
Arguments
cf
The cashflow of the loan, not including the initial inflow for the loan taker
amt
The original amount of the loan
r
The periodic rate of the loan
Examples
rem(cf = rep_len(0.4, 4), amt = 1, r = 0.2)
tvm-package
tvm: Time Value of Money Functions
CRAN · 0.5.2 · package · tvm/man/tvm-package.Rd · 2026-05-07

Functions for managing cashflows and interest rate curves.

Aliases
tvmtvm-package
Keywords
internal
See also
Useful links: https://bitbucket.org/juancentro/tvm
xirr
The IRR is returned as an effective annual rate
CRAN · 0.5.2 · tvm/man/xirr.Rd · 2026-05-07

Internal Rate of Return of an irregular cashflow (IRR)

Aliases
xirr
Usage
xirr(cf, d, tau = NULL, comp_freq = 1, interval = c(-0.99999, 10), ...)
Arguments
cf
The cashflow
d
The dates when each cashflow occurs. Same length as the cashflow. Only used if tau is NULL. Assumes act/365 fractions
tau
The year fractions when each cashflow occurs. Same length as the cashflow
comp_freq
The compounding frequency used. Most relevant cases are 1 for yearly, 2 twice a year, 4 quarterly, 12 monthly, 0 no compounding, Inf continuous
interval
A length 2 vector that indicates the root finding algorithm where to search for the irr
...
Other arguments to be passed on to uniroot
Examples
xirr(cf = c(-1, 1.5), d = Sys.Date() + c(0, 365))
xnpv
Net Present Value of an irregular cashflow (NPV)
CRAN · 0.5.2 · tvm/man/xnpv.Rd · 2026-05-07

Net Present Value of an irregular cashflow (NPV)

Aliases
xnpv
Usage
xnpv(i, cf, d, tau = NULL, comp_freq = 1)
Arguments
i
The rate used to discount the cashflow
cf
The cashflow
d
The dates when each cashflow occurs. Same length as the cashflow. Only used if tau is NULL. Assumes act/365 fractions
tau
The year fractions when each cashflow occurs. Same length as the cashflow
comp_freq
The compounding frequency used. Most relevant cases are 1 for yearly, 2 twice a year, 4 quarterly, 12 monthly, 0 no compounding, Inf continuous
Examples
xnpv(i = 0.01, cf = c(-1, 0.5, 0.9), d = as.Date(c("2015-01-01", "2015-02-15", "2015-04-10")))

버전 이력

RepositoryVersionPublishedFirst seenLast seenDocs
CRAN0.5.22026-05-292026-05-30

보안

표시할 OSV 데이터가 없습니다.

문헌 신호

표시할 OpenAlex 데이터가 없습니다.