Repository navigation
ledgr 0.2.1.0 models equity corporate actions from sealed point-in-time facts, gives strategies one helper pipeline that behaves the same in dense and availability-aware runs, prints results on one screen, and reads CSV files through one path.
Highlights
- Corporate-action facts (dividends, acquisitions, spin-offs) are sealed into the snapshot with their dates, completeness and provenance. Gross cash distributions post as
CASHFLOWevents, and positions ended by a corporate action close through a newDISPOSITIONevent. A declared policy (ledgr_corporate_actions()) governs the treatment, andledgr_corporate_action_summary()reports what was modeled. - Snapshots declare their price basis (
"split_adjusted"or"distribution_adjusted"), which is part of experiment identity. - The strategy helper pipeline (signal, selection, target) scores the full universe and carries eligibility explicitly. Trusted strategy recovery (
ledgr_run_strategy(trust = TRUE)) can rerun strategies that use ledgr's helpers. print(bt)fits on one screen, with the corporate-action and price-basis lines;summary(bt)shows the metrics first.ledgr_run_completion()reports whether a run completed and, if not, why.ledgr_snapshot_from_csv()is the single CSV path, read by DuckDB.
Upgrading
- Requires R 4.6.0 or later and duckdb 1.5.6 or later.
- Breaking renames and removals:
ctx$vec$positionsbecomesctx$vec$position;ledgr_select_argmax()/argmin()becomeledgr_rule_argmax()/argmin();ledgr_pulse_snapshot(initial_cash = )becomescash; the CSV importers are replaced byledgr_snapshot_from_csv(). New experiments record a corporate-action policy, so config hashes differ from 0.2.0.1. See NEWS.md for the full list.
Not claimed
Corporate actions are not complete in this release. It does not claim corporate-action completeness, broker-exact settlement, net cash, tax correctness or exact recipient exposure. Exact quantity settlement, such as new shares from a split or a spin-off, is not modeled, and bars declared distribution-adjusted are refused as execution bars.
Windows and Ubuntu checks, coverage and pkgdown passed on the release branch, on main and on the release tag. Full details are in NEWS.md.