From 0cb1183904054dbe715e65d8988df5a7e2bbc728 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 13 Feb 2025 11:14:41 -0500 Subject: [PATCH] `.accounting` add synopsis section to readme --- piker/accounting/README.rst | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/piker/accounting/README.rst b/piker/accounting/README.rst index 5214d7a2..d85c412d 100644 --- a/piker/accounting/README.rst +++ b/piker/accounting/README.rst @@ -1,8 +1,40 @@ -.accounting ------------ +piker.accounting +________________ A subsystem for transaction processing, storage and historical measurement. +synopsis +-------- +The big question for any trader is this: + +*what is the price that determines whether i take a loss or a gain on my +trade?* + +In other words, at any given state of accounting your current assets, +what is the price between any 2 assets you've transacted that determines +at which price you can conduct **the next** transaction and know if you +are making or losing more (or less) of the *source* asset versus the +*destination* asset? + +Let's do a very simple example: + +> Joe wants to buy some tacos bc they're super hungo. +> Joe has a friend who also likes tacos but doesn't mind if they're fresh; he doesn't mind having day old tacos. +> Inflation is rampant and taco prices are trending up for no good reason besides everyone thinks prices are going up. +> Joe goes to the taco stand and buys 4 tacos at 25 mxn. +> This makes Joe's net cost `4 * 25 = 200` mxn. +> Joe eats 3 tacos and realizes that he can't finish the last, so he puts it in the fridge to save for the next day (since he owns a comal). +> The next day the price of tacos goes up to 30 mxn (for no good reason > besides the taco stand noticing Joe is a tourist and that > "inflation" is some thing that's used as an excuse for price changes). +> Joe's friend from before got lit up (like he does every morning) and msgs Joe to buy him 2 tacos for when he shows up in the late morning. +> Joe says "sure, but i also have a leftover if you want it, and I'm fasting today so you can have my sobras and i'll buy you a new one". +> The friend coughs a couple times, and says "yee no problem man, just make sure you get them" +> + + +Prior *suit* definitions: + +- the canucks equiv of the IRS call this idea ["Adjusted cost base"](https://www.canada.ca/en/revenue-agency/services/tax/individuals/topics/about-your-tax-return/tax-return/completing-a-tax-return/personal-income/line-12700-capital-gains/definitions-capital-gains.html#Adjustedcostbase) + .pnl ----