Officially drop `Position.size`
parent
e9dfd28aac
commit
60751acf85
|
@ -0,0 +1,16 @@
|
|||
.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.
|
|
@ -38,6 +38,7 @@ from pendulum import (
|
|||
datetime,
|
||||
now,
|
||||
)
|
||||
import polars as pl
|
||||
import tomlkit
|
||||
|
||||
from ._ledger import (
|
||||
|
@ -143,6 +144,8 @@ class Position(Struct):
|
|||
# trade was opened.?
|
||||
# def bep() -> float:
|
||||
# ...
|
||||
def clears_df(self) -> pl.DataFrame:
|
||||
...
|
||||
|
||||
def clearsitems(self) -> list[(str, dict)]:
|
||||
return ppu(
|
||||
|
@ -436,11 +439,6 @@ class Position(Struct):
|
|||
ndigits=self.mkt.size_tick_digits,
|
||||
)
|
||||
|
||||
@property
|
||||
def size(self) -> float:
|
||||
log.warning('`Position.size` is deprecated, use `.cumsize`')
|
||||
return self.cumsize
|
||||
|
||||
# TODO: once we have an `.events` table with diff
|
||||
# mkt event types..?
|
||||
# def suggest_split(self) -> float:
|
||||
|
|
Loading…
Reference in New Issue