ledgr_opening() creates the explicit starting state used by the v0.1.7
experiment-first workflow. It records starting cash and, optionally, existing
long positions and cost basis.
Examples
ledgr_opening(cash = 100000)
#> ledgr_opening
#> ==============
#> Cash: 100000
#> Date: <auto>
#> Positions: 0
ledgr_opening(
cash = 25000,
positions = c(AAA = 10, BBB = 5),
cost_basis = c(AAA = 101.25, BBB = 98.50)
)
#> ledgr_opening
#> ==============
#> Cash: 25000
#> Date: <auto>
#> Positions: 2
#> Instruments: AAA, BBB