styles_equity_cashflows: Extract leveraged equity cash flows by style

View source: R/utils.R

styles_equity_cashflowsR Documentation

Extract leveraged equity cash flows by style

Description

This helper loads a set of preset styles from YAML, runs each configuration through [run_case()] under the leveraged (debt) scenario, and extracts the yearly equity cash flows. It is primarily used in vignettes and tests to document the time profile of equity outflows and inflows by style.

Usage

styles_equity_cashflows(
  styles,
  config_dir = system.file("extdata", package = "cre.dcf")
)

Arguments

styles

Character vector of style identifiers, e.g. c("core", "core_plus", "value_added", "opportunistic").

config_dir

Directory from which preset YAML files are loaded. Defaults to the package inst/extdata folder.

Details

For each style, the function:

  1. reads preset_<style>.yml from config_dir;

  2. calls [run_case()] and accesses out$leveraged$cashflows;

  3. returns the pair (year, equity_cf) with a style label.

The sign convention follows [compute_leveraged_metrics()]: the initial equity outlay at t = 0 is negative, subsequent net equity distributions are positive when cash is returned to equity.

Value

A tibble with columns:

  • style (character),

  • year (integer),

  • equity_cf (numeric), the leveraged equity cash flow in year year.


cre.dcf documentation built on April 10, 2026, 5:08 p.m.