Package {pmpm}


Type: Package
Title: Poor Man(agers)'s Portfolio Management Tools (aka pm2)
Version: 0.1.0
Date: 2025-10-02
Maintainer: Enrico Schumann <es@enricoschumann.net>
Description: Poor Man(agers)'s Portfolio Management Tools (aka pmpm or pm2). Tools for portfolio-management tasks, such as reporting.
Imports: PMwR, digest, fastmatch, orgutils, tsdb, zoo
Suggests: crayon
License: GPL-3
NeedsCompilation: no
Packaged: 2026-05-01 17:32:03 UTC; es19
Author: Enrico Schumann ORCID iD [aut, cre]
Built: R 4.7.0; ; 2026-05-01 20:24:28 UTC; unix

Poor Man(agers)'s Portfolio Management Tools (aka pm2)

Description

Poor Man(agers)'s Portfolio Management Tools (aka pmpm or pm2). Tools for portfolio-management tasks, such as reporting.

Details

The DESCRIPTION file:

Package: pmpm
Type: Package
Title: Poor Man(agers)'s Portfolio Management Tools (aka pm2)
Version: 0.1.0
Date: 2025-10-02
Maintainer: Enrico Schumann <es@enricoschumann.net>
Authors@R: person(given = "Enrico", family = "Schumann", role = c("aut", "cre"), email = "es@enricoschumann.net", comment = c(ORCID = "0000-0001-7601-6576"))
Description: Poor Man(agers)'s Portfolio Management Tools (aka pmpm or pm2). Tools for portfolio-management tasks, such as reporting.
Imports: PMwR, digest, fastmatch, orgutils, tsdb, zoo
Suggests: crayon
License: GPL-3
Author: Enrico Schumann [aut, cre] (ORCID: <https://orcid.org/0000-0001-7601-6576>)

Index of help topics:

install_instruments_db
                        Handling Financial Instruments
pmpm-package            Poor Man(agers)'s Portfolio Management Tools
                        (aka pm2)

Author(s)

Enrico Schumann [aut, cre] (ORCID: <https://orcid.org/0000-0001-7601-6576>)

Maintainer: Enrico Schumann <es@enricoschumann.net>

References

ES- PMwR


Handling Financial Instruments

Usage

install_instruments_db(db,
                       add = FALSE,
                       overwrite = FALSE,
                       envir = .pmpm)

rm_instruments_db(envir = .pmpm)

id(pattern, when = Sys.Date(),
   ignore.case = TRUE, fixed = FALSE,
   fields = c("description"),
   ...,
   db = NULL, envir = .pmpm)
description(id, when = Sys.Date(), ...,
            db = NULL, envir = .pmpm)

Arguments

db

an instruments database

add

logical(1). If TRUE, db is added to any existing database. Duplicates are not allowed.

overwrite

logical. If TRUE, implies add.

envir

where to install the db

Details

Not stable yet.

install_instruments_db expects a data.frame db; required column names are "id", "start", "end", and "description". Duplicate ids are not allowed.

This data.frame is stored, per default, in a package environment. The data.frame is, again by default, not overwritten. If add is TRUE, instruments in db but not in the already-stored data.frame are added.

If overwrite is TRUE, instruments are added, and already-existing instrument are updated. (So overwrite implies add.) To completely replace an installed database, first remove the existing one, and then install.

Value

Number of installed instruments. If install_instruments_db is called without a db, it returns TRUE if a database is installed.

Author(s)

Enrico Schumann

References

Schumann, E. (2025) Portfolio Management with R. https://enricoschumann.net/PMwR/

Examples

id()