Learn R Programming

PMwR (version 0.10-1)

NAVseries: Net-Asset-Value (NAV) Series

Description

Create a net-asset-value (NAV) series.

Usage

NAVseries(NAV, timestamp,
          instrument = NULL, title = NULL, description = NULL)

as.NAVseries(x, ...)

# S3 method for NAVseries print(x, … )

# S3 method for NAVseries summary(object, …, monthly.vol = TRUE, na.rm = FALSE, assume.daily = FALSE)

# S3 method for NAVseries plot(x, y, …, xlab = "", ylab = "", type = "l") # S3 method for NAVseries window(x, start = NULL, end = NULL, …)

Arguments

NAV

numeric

timestamp

time stamp (typically Date or POSIXct)

instrument

character

title

character

description

character

x

an NAVseries or an object to be coerced to NAVseries

object

an NAVseries

further arguments

monthly.vol

if TRUE (default), volatility computations are done on monthly returns

assume.daily

logical

na.rm

logical

y

a second NAVseries to be plotted. Not supported yet.

xlab

character

ylab

character

type

character. See plot.

start

same class as timestamp; NULL means the first timestamp

end

same class as timestamp; NULL means the last timestamp

Value

an NAVseries: see Details.

an NAVseries summary: a list

Details

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 summary method returns a list of the original NAVseries plus various statistics, such as return per year and volatility.

References

Schumann, E. (2018) Portfolio Management with R. http://enricoschumann.net/PMwR/

See Also

btest, journal

Examples

Run this code
# NOT RUN {
summary(NAVseries(DAX[[1]], as.Date(row.names(DAX)), title = "DAX"))
# }

Run the code above in your browser using DataLab