Cash Accounting¶
Lumibot supports explicit cash accounting for both:
backtests inside a strategy
live broker cash-event telemetry in the cloud payload
This keeps deposits and withdrawals out of strategy performance while still capturing financing, dividends, fees, interest, and adjustments.
Strategy cash methods¶
Use the account-management methods documented under Account Management when you need framework-managed cashflows in backtests:
adjust_cash(...)deposit_cash(...)withdraw_cash(...)configure_cash_financing(...)set_cash_financing_rates(...)
Backtest artifacts¶
Cash accounting is reflected in the existing backtest outputs:
Important outputs:
trades.csv/trades.parquetkeep discrete cash-event rows alongside trade rowsstats.csv/stats.parquetincludecash_adjusted_portfolio_valueand period cashflow columnstrades.htmloverlays raw portfolio value, cash-adjusted portfolio value, cash, and cash-event markers
Broker cash events¶
Live broker cash-event normalization is documented in:
These normalized events flow into the live cloud payload as top-level
cash_events records, separate from the order lifecycle engine.
Long-form reference¶
For the full implementation guide and rationale, see the repository document:
docs/CASH_ACCOUNTING_AND_CASH_EVENTS.md
Documentation map¶
If you are trying to understand the whole feature, read in this order:
this page