| NAVseries {PMwR} | R Documentation |
Net-Asset-Value (NAV) Series
Description
Create a net-asset-value (NAV) series.
Usage
NAVseries(NAV, timestamp,
instrument = NULL, title = NULL, description = NULL,
drop.NA = NULL)
as.NAVseries(x, ...)
## S3 method for class 'NAVseries'
print(x, ... )
## S3 method for class 'NAVseries'
summary(object, ..., monthly.vol = TRUE,
bm = NULL, monthly.te = TRUE,
na.rm = FALSE, assume.daily = FALSE)
## S3 method for class 'NAVseries'
plot(x, y, ..., xlab = "", ylab = "", type = "l")
## S3 method for class 'NAVseries'
window(x, start = NULL, end = NULL, ...)
Arguments
NAV |
numeric |
timestamp |
|
instrument |
character |
title |
character |
description |
character |
x |
an |
object |
an |
... |
further arguments. For |
drop.NA |
logical |
bm |
an optional NAVseries. If |
monthly.vol |
if |
monthly.te |
if |
assume.daily |
logical |
na.rm |
logical |
y |
a second NAVseries to be plotted. Not supported yet. |
xlab |
character |
ylab |
character |
type |
character. See |
start |
same class as timestamp; |
end |
same class as timestamp; |
Details
NAV series
An NAVseries is a numeric vector (the actual series) and
additional information, attached as attributes: timestamp,
instrument, title, description. Of these attributes,
timestamp is the most useful, as it is used for several
computations (e.g. when calling summary) or
for plotting.
The ‘instrument’ is typically an internal label used to identify the series, such as a ticker; ‘title’ is a label, too, but is intended to be human-readable; ‘description’ finally should be human-readable as well but may be longer.
Summaries
The summary method returns a list of the original
NAVseries plus various statistics, such as return per year
and volatility. The method may receive several NAV series
as input
Value
an NAVseries: see Details.
an NAVseries summary: a list of lists. If a
benchmark series is present, the summary has an
attribute bm: an integer, specifying the
position of the benchmark.
Note
The semantics of handling NAVseries are not stable
yet. Currently, objects of class NAVseries are
univariate: you create a single NAVseries, summarise
it, plot it, and so one. In the future, at least some
of the methods will support the multi-variate case,
i.e. be able to handle several series at once.
Author(s)
Enrico Schumann <es@enricoschumann.net>
References
Schumann, E. (2023) Portfolio Management with R.
https://enricoschumann.net/PMwR/; in particular, see
https://enricoschumann.net/R/packages/PMwR/manual/PMwR.html#NAVseries
See Also
For handling external cashflows, see unit_prices,
split_adjust and div_adjust.
Examples
summary(NAVseries(DAX[[1]], as.Date(row.names(DAX)), title = "DAX"))