Hello, I am very new to Beancount as I want to keep track of my trading activities and generate reports with FIFO settings. I love the tool so far and the community around it.
1)
To get started, I want to better understand how Lots are handled and therefore want to report active Lots. In the docs (how inventories work > cost basis) there is a very good example of what I am looking for
```units ccy cost cost-ccy lot-date label
25 HOOL {23.00 USD, 2015-04-01, "first-lot"} 35 HOOL {27.00 USD, 2015-05-01, None}```
I tried `bean-report books.beancount holdings` but only get a total of the account, not the active Lots within. what else could I try?
2)
As a bonus, I would like to ask how it could be possible to track my trades so that I can analyse the outcome. I am thinking of categories like timeframe or setup. The query for example could be: show me the outcome of all trades based on the 1H chart (this way I could see where my profits come from, interesting to know). problem I see is that I would have to book it in order to have it available to query, but I would make an entry for PnL instead, right?
looking forward to what you have in mind about it.
thanks
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/b028cb55-2900-40e7-a473-c1330c5ce2dbn%40googlegroups.com.
thanks a lot for taking time to answer. I am very new to beancount and I am not a programmer, so this will take a little longer to implement.
I will try to get started by running scripts like the one you provided, and hope to be able to can access it via CLI (like having the script available similar to a `bean-report` action. gonna read the docs and start step by step.
it is my goal to have an overview of my current positions and from what I have seen so far, beancount is just perfect for that purpose. even without programming skills the advantage of having the tool to report my action exactly the way I want is promising and worth to get into this field.
I am not trading futures or options, but sometimes using leverage.
but my first task is to get my current positions into my main file (some are from 2018/2019 and I have to figure out how to handle the cost basis), some are cryptocurrencies and others are stocks.
I do have a lot more of trading related questions, do you prefer to have them available as separate conversations or should I put them into here?
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/71ecf0a8-a4c3-4d97-94e0-346bc4b3afbfn%40googlegroups.com.
update:
in the meantime I just found a way to implement the script "SELECT …" into my file.bean and run it via the query prompt. this works great after I removed the WHERE line.Now I am wondering if there is a way to run this script but with a specific stock selected only? this works when I run the script directly from CLI by replacing the ^[01] with the stock I want to query. but when running it via query prompt, this isn't possible.
can I run the script with flags/filters in order to pick a specific stock only? this could sound likebean-query myfile.beanrun myScript -filter "specificStock"thanks
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/9f766285-680f-452c-b940-9b65fddf035dn%40googlegroups.com.