Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positioning system refinements: paper engine, file writing, toml style and perf #345

Closed
4 tasks done
goodboy opened this issue Jun 29, 2022 · 1 comment
Closed
4 tasks done
Assignees
Labels
accounting prolly positioning: the accounting of "what/when (is) owned" clearing auction and mm tech: EMS, OMS, algo-trading config data-layer real-time and historical data processing and storage factoring less codez dawg ledger trade, accounts and other user focal event history tracking, management and storage

Comments

@goodboy
Copy link
Contributor

goodboy commented Jun 29, 2022

After #336 lands we'll have a first draft of a completely
broker-agnostic position tracking system that doesn't use the classic
FIFO style
and further allows to offer custom dynamic pricing models
depending on user desire.


As a recap #336 introduces:

  • APIs for writing trades ledgers per backend broker
    • the initial idea is to allow writing "native" schema-ed/formatted trade entries to a .toml file and then expect the respective backend to provide (a) routine(s) to normalize to a common format for later piker processing into,
  • a new config-ledger file: pps.toml which is an incrementally updated data file containing the minimal set of information to allow a trader to immediately be able to reproduce any position for an instrument they are trading:
[ib.algopaper."mnq.globex.20220916"]
size = 58.0
be_price = 11703.458965517251
bsuid = 497954580
expiry = "2022-09-16T00:00:00+00:00"
clears = [
 { tid = "0000e1a7.629f3c2d.01.01", cost = 0.57 },
 { tid = "0000e1a7.629fa5c0.01.01", cost = 0.57 },
 { tid = "0000e1a7.62a0a898.01.01", cost = 0.57 },
 { tid = "0000e1a7.62a0fb24.01.01", cost = 0.57 },
]

Desired outstanding features: (some of these might get broken into new issues)

|-> most ledger content moved to #510 B)


paper engine support (more or less complete)

  • support for the paper engine such that users can forward test
    strats and keep progress in git and have a detailed clear-by-clear
    record of algo behaviour
    • we need to figure out a minimal trades ledger schema probably
      based on an amalgamation of the best parts of other backends
      (prolly landed in Paper trade improvements #462 but who
      knows
      )
      => more or less determined by Transaction type

CLI tools:

make a new issue for this and stuff from #489


novel UI ideas:

make new issue for this and stuff from #489

  • historical position line graphics on charts which show breakeven
    price changes overlayed with actual underlyings, aka pp liftetime
    "lines"
    more or less as super simple FSP style graphics that show the
    beginning, changes, and end to a given pp such that users can easily
    see past trades and their state changes on top of historical data
    **=> see Position accounting refinements, bug fixes, src-asset-pnls, ledgerd daemon #515

Docs for it all:

new issue for this ..
also see #512

@goodboy goodboy added data-layer real-time and historical data processing and storage factoring less codez dawg clearing auction and mm tech: EMS, OMS, algo-trading config ledger trade, accounts and other user focal event history tracking, management and storage labels Jun 29, 2022
@goodboy goodboy mentioned this issue Jun 29, 2022
18 tasks
@algorandpa algorandpa self-assigned this Dec 22, 2022
goodboy added a commit that referenced this issue Jan 13, 2023
Likely pertains to helping with stuff in issues #345 and #373 and just
generally is handy to have when processing ledgers / clearing event
tables.

Adds the following helper methods:
- `iter_by_dt()` to iter-sort an arbitrary `Transaction`-like table of
  clear entries.
- `Position.iter_clears()` as a convenience wrapper for the above.
goodboy added a commit that referenced this issue Jan 13, 2023
Likely pertains to helping with stuff in issues #345 and #373 and just
generally is handy to have when processing ledgers / clearing event
tables.

Adds the following helper methods:
- `iter_by_dt()` to iter-sort an arbitrary `Transaction`-like table of
  clear entries.
- `Position.iter_clears()` as a convenience wrapper for the above.
goodboy added a commit that referenced this issue Jan 13, 2023
Likely pertains to helping with stuff in issues #345 and #373 and just
generally is handy to have when processing ledgers / clearing event
tables.

Adds the following helper methods:
- `iter_by_dt()` to iter-sort an arbitrary `Transaction`-like table of
  clear entries.
- `Position.iter_clears()` as a convenience wrapper for the above.
goodboy added a commit that referenced this issue Jan 30, 2023
Likely pertains to helping with stuff in issues #345 and #373 and just
generally is handy to have when processing ledgers / clearing event
tables.

Adds the following helper methods:
- `iter_by_dt()` to iter-sort an arbitrary `Transaction`-like table of
  clear entries.
- `Position.iter_clears()` as a convenience wrapper for the above.
goodboy added a commit that referenced this issue Jan 31, 2023
Likely pertains to helping with stuff in issues #345 and #373 and just
generally is handy to have when processing ledgers / clearing event
tables.

Adds the following helper methods:
- `iter_by_dt()` to iter-sort an arbitrary `Transaction`-like table of
  clear entries.
- `Position.iter_clears()` as a convenience wrapper for the above.
@goodboy goodboy added the accounting prolly positioning: the accounting of "what/when (is) owned" label Mar 2, 2023
@goodboy goodboy assigned goodboy and unassigned algorandpa Apr 2, 2023
@goodboy
Copy link
Contributor Author

goodboy commented May 24, 2023

Closing since #510, #512 and #515 replace this as more specific subystem breakdowns

@goodboy goodboy closed this as completed May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accounting prolly positioning: the accounting of "what/when (is) owned" clearing auction and mm tech: EMS, OMS, algo-trading config data-layer real-time and historical data processing and storage factoring less codez dawg ledger trade, accounts and other user focal event history tracking, management and storage
Projects
None yet
Development

No branches or pull requests

2 participants