Enable `get_console_log()` at `.accounting.__init__` import-time to ensure console output is available whenever the subsystem is used by `.clearing` or other code. Deats, - uncomment and complete `get_console_log()` call in `.accounting.__init__` with default `level='warning'` and `name=__name__`. - update comment explaining rationale: better to enable on import since namely used by `.clearing` subsystem. Also, - change `piker.calc` import to relative `.calc` in `.accounting.__init__`. - drop unused `get_console_log` import from `.accounting._pos`. - add `log = get_logger(name=__name__)` to `.accounting.cli`. - change `get_logger(loglevel)` -> `get_console_log()` in `.accounting.cli.sync()` with proper kwargs. - add `get_console_log` import to `.accounting.cli`. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code |
||
|---|---|---|
| .. | ||
| README.rst | ||
| __init__.py | ||
| _allocate.py | ||
| _ledger.py | ||
| _mktinfo.py | ||
| _pos.py | ||
| calc.py | ||
| cli.py | ||
README.rst
.accounting
A subsystem for transaction processing, storage and historical measurement.
.pnl
BEP, the break even price: the price at which liquidating a remaining position results in a zero PnL since the position was "opened" in the destination asset.
PPU: price-per-unit: the "average cost" (in cumulative mean terms) of the "entry" transactions which "make a position larger"; taking a profit relative to this price means that you will "make more profit then made prior" since the position was opened.