More or less starting the final push to get piker.accounting and friends to a place where we can never get wrong position calcs, implement said calcs using polars.DataFrames, do offline ledger processing for all accounts, and be in a place to start implementing position metrics curves display in the chart UI as mentioned in https://github.com/pikers/piker/issues/515.
Tasks:
[ ] implement Client.get_assets() and .get_mkt_pairs() for
all backends to support the new .data._symcache stuff:
[x] binance
[x] full symcache support
[ ] reorg pair types into a .symbols mod (rn it's called venues)
[x] kraken (4c550730)
[x] put sym stuff in .symbols.py
[x] ib (ALSO, figure out how the cache is going to work here
since pulling all contracts is a bit infeasible..)
[x] disable SymbologyCache loading via _no_symcache = True attr.
[ ] make issue for attempting a soln for ib symcaching:
[ ] at least get data feeds workin again.. requires paper engine patch?
[ ] re-org into submods including new symbols.py..
[ ] add Client.get_assets() and .get_mkt_pairs() since
support should be easy to add.
[ ] make follow up issue for backends not yet supporting broker
mode / order ctl?
[ ] deribit? (is anyone maintaining this any more tho @guilledk?)
[ ] questrade.. lol gotta get back to this
[ ] re-implement open_account() as async ctx mngr and do ledger
loading implicitly as well as provide public interface for
updates via probably a .ledger attr?
[ ] expose public API to access account-state
polars.DataFrames as well as the ledger df as loaded by
.accounting.calc.open_ledger_dfs()
[ ] implement and document pl.DataFrame based .bep and .ppu
TURNS OUT, the old dict impl was kinda buggy anyway due to
our dt-sorting which seems to not be always iterating out
correctly?
[ ] definitely document all this in an .accounting/README.rst
Test list:
[ ] "offline" ledger test set:
[ ] binance.paper input ledgers (of various sorts) where we
verify Account.pps: dict[str Position properties outputs
[ ] long to zero
[ ] short to zero
[ ] long to short (via single clear) and back to zero
[ ] use an ib.algopaper actual flex and API ledger and verify
at least a (subset) of pps.
[ ] symcache tests which verify creation for all backends and
reloads when requested?
More or less starting the final push to get
piker.accounting
and friends to a place where we can never get wrong position calcs, implement said calcs usingpolars.DataFrame
s, do offline ledger processing for all accounts, and be in a place to start implementing position metrics curves display in the chart UI as mentioned in https://github.com/pikers/piker/issues/515.Tasks:
[ ] implement
Client.get_assets()
and.get_mkt_pairs()
for all backends to support the new.data._symcache
stuff:[x] binance
[x] full symcache support
[ ] reorg pair types into a
.symbols
mod (rn it's calledvenues
)[x] kraken (4c550730)
[x] put sym stuff in
.symbols.py
[x] ib (ALSO, figure out how the cache is going to work here since pulling all contracts is a bit infeasible..)
[x] disable
SymbologyCache
loading via_no_symcache = True
attr.[ ] make issue for attempting a soln for
ib
symcaching:[ ] kucoin
symbols.py
..Client.get_assets()
and.get_mkt_pairs()
since support should be easy to add.[ ] make follow up issue for backends not yet supporting broker mode / order ctl?
[ ] deribit? (is anyone maintaining this any more tho @guilledk?)
[ ] questrade.. lol gotta get back to this
[ ] re-implement
open_account()
as async ctx mngr and do ledger loading implicitly as well as provide public interface for updates via probably a.ledger
attr?[ ] expose public API to access account-state
polars.DataFrame
s as well as the ledger df as loaded by.accounting.calc.open_ledger_dfs()
[ ] implement and document
pl.DataFrame
based.bep
and.ppu
TURNS OUT, the old
dict
impl was kinda buggy anyway due to our dt-sorting which seems to not be always iterating out correctly?[ ] definitely document all this in an
.accounting/README.rst
Test list:
[ ] "offline" ledger test set:
binance.paper
input ledgers (of various sorts) where we verifyAccount.pps: dict[str Position
properties outputsib.algopaper
actual flex and API ledger and verify at least a (subset) of pps.[ ] symcache tests which verify creation for all backends and reloads when requested?