Re: Price importer for RealTokens

2021-12-31 Thread Martin Blais
[image: image.png] Hmm... [image: image.png] On Fri, Dec 31, 2021 at 1:42 AM Timothée GROS wrote: > Hi guys, > > If there are some REALT investors here, i am please to share a simple > price fetcher for Realtokens : > https://github.com/grostim/Beancount-myTools/blob/master/price/realt.py

Re: A quick word about CSV importers

2021-12-24 Thread Martin Blais
mports for those). >> >> >> >> >>> >>> Alan >>> On Sunday, December 5, 2021 at 9:40:57 PM UTC b...@bben.us wrote: >>> >>>> Sounds great, and aligned with the ethos of v3 splitting and >>>> generalizing. >>>&

Re: bql subtract Amounts?

2021-12-17 Thread Martin Blais
Sorry just catching up on that thread. I've been meaning to delete the beanquery from beancount/master and start using the beanquery repo. To be fair, I haven't been able to switch over yet; I just added it to my environment, it works. I should probably delete beancount/beancount/query Not sure

Re: Simple Budgeting Tool for Beancount Ledgers

2021-12-17 Thread Martin Blais
Thank you Suleman, I added a link to the contributions file. On Fri, Dec 17, 2021 at 9:15 PM Suleman Khalid wrote: > Hi all, > > I have created a very simple command-line budget tracking tool for > beancount ledger files, called "budget-report", based on the way I like to > track my budget and

Re: beancount gmail importer

2021-12-17 Thread Martin Blais
Thanks Kuba Added to the contributions file. On Fri, Dec 17, 2021 at 6:01 PM kuba jamro wrote: > Hi all, > > After what has been several years of development and about three different > incarnations, I am finally happy to release my importer into the wild. > > The importer

Re: Does beancount expect entries to be sorted by date?

2021-12-13 Thread Martin Blais
A lot of the internal API functions do assume sorted inputs throughout (which is done by the parser, didn't really plan for a lot of API users TBH). Not sure about this one, I'd have to review the source. You can call beancount.core.data.sorted(entries) to do the same Beancount does internally.

Re: bql subtract Amounts?

2021-12-13 Thread Martin Blais
I don't think it's supported; you can try adding it (in branch master), should be easy, just check the currencies match On Mon, Dec 13, 2021 at 9:13 PM Ben L wrote: > Is there a way to subtract Amounts (same currency) in bql? > > select cost(position) - value(position); > > I get: > >

Re: Question about @ vs. {}

2021-12-12 Thread Martin Blais
For currencies (@), the cost basis is forgotten in the lot that's inserted or matched to the account's inventory. For investments ({}), the cost basis is attached to the lot inserted or matched to the account's inventory. If you were a currency trader, you wouldn't buy/sell currencies and track it

Re: A quick word about CSV importers

2021-12-07 Thread Martin Blais
update the importers in there that intersect with Johnny (which has much more sophisticated imports for those). > > Alan > On Sunday, December 5, 2021 at 9:40:57 PM UTC b...@bben.us wrote: > >> Sounds great, and aligned with the ethos of v3 splitting and generalizing. >> >>

A quick word about CSV importers

2021-12-05 Thread Martin Blais
Hi! It's been a while since I've done much, but a few weekends ago I rewrote all my CSV importers. I had new changes to update my code for, and I was also behind on updating from changes from updates in beangulp. Some nice experience came out of it. I had been unhappy with the object-oriented

Re: How to effeciently use Documents in beancount.

2021-12-04 Thread Martin Blais
You may have to prefix your documents with a date in order for them to be found. OptGroup(""" A list of directory roots, relative to the CWD, which should be searched for document files. For the document files to be automatically found they must have the following filename

Re: CSV export with both accounts of a transactions

2021-11-30 Thread Martin Blais
Well you have everything except the assets account: bean-query test.beancount 'select date, number, account where account ~ "Expenses:" ' Just write a bit of Python. On Tue, Nov 30, 2021 at 4:07 PM Daniele Nicolodi wrote: > On 30/11/2021 19:41, Varac wrote: > > For tax consultency I need to

Re: scripting: Is there a function to get value of an account on a given date?

2021-11-27 Thread Martin Blais
Here, just for you: https://github.com/beancount/beanlabs/blob/master/beanlabs/scripts/scan.py#L38 On Sat, Nov 27, 2021 at 10:35 AM Martin Blais wrote: > Check out what I do in this script: > > https://github.com/beancount/beanlabs/blob/master/beanlabs/compensation/net-worth-over-tim

Re: scripting: Is there a function to get value of an account on a given date?

2021-11-27 Thread Martin Blais
. On Sat, Nov 27, 2021 at 5:10 AM Stefano Zacchiroli wrote: > On Fri, Nov 26, 2021 at 09:08:18AM -0500, Martin Blais wrote: > > > https://github.com/beancount/beancount/blob/master/beancount/ops/summarize.py#L589 > > Thanks a lot Martin, I didn't know about > beancount.ops.summariz

Re: scripting: Is there a function to get value of an account on a given date?

2021-11-26 Thread Martin Blais
https://github.com/beancount/beancount/blob/master/beancount/core/realization.py#L53 https://github.com/beancount/beancount/blob/master/beancount/ops/summarize.py#L589 On Fri, Nov 26, 2021 at 2:15 AM vijayvithal jahagirdar < jahagirdar...@gmail.com> wrote: > I am writing a bunch of python

Re: Google groups spam

2021-11-13 Thread Martin Blais
I marked 10 as spam, seems to have started 6 months ago. I'll try to keep an eye out for those On Sat, Nov 13, 2021 at 6:19 PM Martin Blais wrote: > I can probably just go through the archives regularly and clean that up, > it's not a big deal. > Let me have a look now > > &

Re: Google groups spam

2021-11-13 Thread Martin Blais
I can probably just go through the archives regularly and clean that up, it's not a big deal. Let me have a look now On Sat, Nov 13, 2021 at 3:06 PM redst...@gmail.com wrote: > Hmm, nice idea, but it might be a bit unfriendly to new users IMHO. > Personally, my annoyance comes from scrolling

Re: importer with data.Posting and implicit prices

2021-11-13 Thread Martin Blais
I had a quick look, that's a nice project (pricehist). However, this is mentioned and inaccurate: Beancount's bean-price tool fetches prices and addresses other workflow concerns in a Beancount-specific manner, generally requiring a Beancount file as

Re: Google groups spam

2021-11-12 Thread Martin Blais
I don't mind but IMHO it hasn't been too bad There's a lot that gets caught... Everyday On Fri, Nov 12, 2021, 13:29 Jason Chu wrote: > I wouldn't mind being a moderator, this list is pretty low traffic. I > wonder if Martin would be open to having additional moderators. > > I also wonder if

Re: The Five-Minute Ledger Update

2021-11-11 Thread Martin Blais
re. ROI: it's really a question of frequency IMO. I automate as much of the accounts that I update frequently. The other ones I just do a bit more manual work. Be pragmatic; the goal is not to fully automate everything, the goal is to keep your books in order and minimize the total time (manual +

Re: Questions on solo 401k accounts structure / set up

2021-11-11 Thread Martin Blais
On Thu, Nov 11, 2021 at 7:06 PM Bman Q wrote: > guys hi, thank you for all replies! > > i got everything except the "cost issue" part: > > "cost basis in an IRA is usually AVERAGE cost basis. Vanguard for example > uses average basis exclusively in IRAs last I checked." > > AND > > "One problem

Re: importer with data.Posting and implicit prices

2021-11-09 Thread Martin Blais
This is not going to work. Don't do that. If you're trying to build something that will serialize out, use the Posting's price. Unfortunately you can't build a Posting that will output a total amount at the moment, since that field gets converted on parsing. You could always just use good old

Re: importer with data.Posting and implicit prices

2021-11-09 Thread Martin Blais
units has to be of type 'Amount()' when you create the posting. It looks like you might have set it to a str. (Python doesn't offer much help, there's a type validation function somewhere in beancount.core.data.) On Tue, Nov 9, 2021 at 8:05 AM Joost Brok wrote: > Hello everyone, I'm really

Re: Beancount v3: Is there a install step after bazel build

2021-11-08 Thread Martin Blais
I haven't figured out the install story of v3 yet. On Mon, Nov 8, 2021 at 5:08 PM Milind Kamble wrote: > Being still a very new user of bazel, I am unclear what, if any, is the > "install" step after bazel build completes. I am using python virtual env. > I expect that the install step will

Re: Transactions split across multiple input files (importers).

2021-10-31 Thread Martin Blais
On Fri, Oct 22, 2021 at 4:06 AM Alan H wrote: > Hey folks; > > Delurk comment: I've been using beancount more and more seriously over the > last year and the final convincing moment for me was how quickly I could do > my Canadian taxes with a few custom plugins to split expenses based on meta >

Re: Questions on solo 401k accounts structure / set up

2021-10-28 Thread Martin Blais
On Thu, Oct 28, 2021 at 6:45 PM Bman Q wrote: > Hello everyone, > > As always i want to thank Martin and all community for beancount, > i am so glad that 3.5 years ago i've chosen beancount over other free > (gnucash, etc) or paid (quickbooks, etc) alternatives. Extendability and > flexibility

Re: Where is the latest documentation (for v2)?

2021-10-24 Thread Martin Blais
On Thu, Oct 21, 2021 at 11:16 PM Martin Blais wrote: > [...] > > furius.ca is probably dead for good, it went down a few weeks ago (I > wrecked the python3 upgrade on an ancient debian and it won't reboot), I > need to setup a replacement, more urgent things to do (like find

Re: Where is the latest documentation (for v2)?

2021-10-21 Thread Martin Blais
The google docs is for v2. beancount.github.io is automatically generated from it, contents should be identical. There are some google docs for design docs for prospective v3 things. v2 lives in branch "v2" on github v3 lives in branch "master" on github furius.ca is probably dead for good, it

Re: Using Fava with encrypted Beancount data

2021-10-20 Thread Martin Blais
Thanks PB, Added to contrib links. On Wed, Oct 20, 2021 at 10:08 AM Phractured Blue wrote: > I am aware that beancount has builtin support for GPG-encrypted files, and > that Fava supports using those files. > > However for me there are a few issues with this implementation: > 1) I would need

Re: Surprise loans, how to retroactively book them?

2021-10-14 Thread Martin Blais
+1 thanks Patrick I would add that a peculiarity is that this is one of those cases where one posts a negative amount to reduce an expense. On Thu, Oct 14, 2021, 06:13 'Patrick Ruckstuhl' via Beancount < beancount@googlegroups.com> wrote: > Hi Casey, > > I would book it like this > > 2019-11-30

Re: Query to get transactions involving some account?

2021-10-10 Thread Martin Blais
Look for the HAS_ACCOUNT() function if I recall correctly On Sun, Oct 10, 2021, 04:49 Juan Antonio Navarro Pérez < juannavarrope...@gmail.com> wrote: > I would like to write a query that matches all postings from transactions > that involve a particular account. For example something like: > >

Re: minimum length of symbols?

2021-09-25 Thread Martin Blais
Precisely Thanks Daniele On Sat, Sep 25, 2021, 05:44 Daniele Nicolodi wrote: > On 25/09/2021 08:26, Jim Robinson wrote: > > Oh, I was not suggesting you change v2. I can do that easily enough > > myself and install a patched version. What I was wondering was whether > > or not doing so might

Re: minimum length of symbols?

2021-09-25 Thread Martin Blais
Sorry mate v2 is frozen. Not enough cycles to work on two versions. On Sat, Sep 25, 2021 at 2:21 AM Jim Robinson wrote: > Thank you for the confirmation. I've never worked with flex, but I was > wondering what it is that prevents adding a single-character token as an > option? > > E.g., in

Re: minimum length of symbols?

2021-09-24 Thread Martin Blais
I was going to send a link to that section; you found it. The C++ parser is in branch "master" but it's not hooked up yet, it won't be running. I'm still working on finishing it (actually, these days). My plan is to finish it, then to translate the booking code to C++ (with improvements in the

Re: Does anybody use (number, currency) amounts in metadata?

2021-09-24 Thread Martin Blais
Got it, I've managed to make it work and will keep it. On Fri, Sep 24, 2021 at 4:55 AM Martin Michlmayr wrote: > * Martin Blais [2021-09-23 16:54]: > > Does anyone use an Amount type as a metadata value? > > I use that feature for a non-profit. Our books are in USD but

Re: Does anybody use (number, currency) amounts in metadata?

2021-09-23 Thread Martin Blais
On Thu, Sep 23, 2021 at 8:48 PM Daniele Nicolodi wrote: > On 23/09/2021 22:54, Martin Blais wrote: > > e.g. > > > > 2021-01-02 * "Some transaction" > > real_value: 123.45 USD > > ... > > > > Does anyone use an Amount type as a met

Does anybody use (number, currency) amounts in metadata?

2021-09-23 Thread Martin Blais
e.g. 2021-01-02 * "Some transaction" real_value: 123.45 USD ... Does anyone use an Amount type as a metadata value? (If I can remove it in the new version it'll simplify grammar.) -- You received this message because you are subscribed to the Google Groups "Beancount" group. To

Re: Error when creating a balance entry in an importer - Bug to report?

2021-09-23 Thread Martin Blais
Units needed to be an instance of Amount On Thu, Sep 23, 2021, 07:48 Álvaro Aguilar wrote: > I am writing an importer and I get an error when I try to create a balance > entry. I am not sure if it is a bug or an issue with what I am doing. > > I have tested the code to create the balance entry

Re: Help - Error when using version 2.3.4 after switching machines

2021-09-19 Thread Martin Blais
On Sun, Sep 19, 2021 at 5:08 AM Daniele Nicolodi wrote: > On 19/09/2021 03:50, soubra wrote: > > Thanks for the reply Martin. How are folks collapsing/expanding sections > > of their large .beancount files? That was the main reason I was using > > indented directives in the previous versions. >

Re: Help - Error when using version 2.3.4 after switching machines

2021-09-18 Thread Martin Blais
I'm using outline-mode. No indentation. fill-column 400 (don't want any filling). Just a few includes. On Sat, Sep 18, 2021 at 9:50 PM soubra wrote: > Thanks for the reply Martin. How are folks collapsing/expanding sections > of their large .beancount files? That was the main reason I was

Re: Help - Error when using version 2.3.4 after switching machines

2021-09-18 Thread Martin Blais
Indented directives was never supported AFAIK. If it happened to work back in the day, that was in error. On Sat, Sep 18, 2021 at 8:40 PM soubra wrote: > Update - notice the emacs org-mode impact between versions > > *this works on v 2.2.3:* > * Initialize journal > option "title" "My

Re: Calculating Portfolio Returns

2021-09-13 Thread Martin Blais
On Mon, Sep 13, 2021 at 8:12 PM Bman Q wrote: > thank you for your reply, > > i understand that beangrow is experimental, and i really appreciate what > it can do even in this form, hopefully we (i see some users on github) will > contribute to work too. Your work is really helpful to lots of

Re: Calculating Portfolio Returns

2021-09-12 Thread Martin Blais
On Sun, Sep 12, 2021 at 8:40 PM Bman Q wrote: > Guys hi > > First of all i want to thank Martin for superb work! I have been using > beancount for 2 years and flexibility / functionality beancount provides > are simply amazing. I always recommend beancount on plain text accounting > sub and now

Re: transferring inventory from one account to another

2021-09-11 Thread Martin Blais
Thank you Justus, Added to contrib doc. On Fri, Sep 10, 2021 at 9:47 AM Justus Pendleton wrote: > Here's a plugin I quickly threw together to do this. There are a few > things in the code I'm not 100% sure about, so consider this a beta and let > me know if it seems like it is doing the right

Re: Siddhant Goel's eBook features Beancount

2021-09-07 Thread Martin Blais
Thank you Matt! It looks like I had included it on the contrib page. https://docs.google.com/document/d/1Z37bQ45wDtjTPaMQ_x-f33p1trH9fNosEAUgbQXwp30/edit#heading=h.6ue23s6nj0ht On Tue, Sep 7, 2021 at 9:48 PM Matt Payne wrote: > I'm excited to read https://personalfinancespython.com/ (13

Re: transferring inventory from one account to another

2021-09-02 Thread Martin Blais
You can do groups in beangrow and if the accounts are used exclusively for the same group I think you can specify them both and compute the returns over the joint set. I'd have to look at it again it's been forever. I do something like irr, it's just a little newton search or something. Check out

Re: transferring inventory from one account to another

2021-09-02 Thread Martin Blais
+1 re. Ben's answer. How many of these do you really do? On Thu, Sep 2, 2021 at 2:30 AM Ben Blount wrote: > Yeah this is high on my wishlist too. This came up a bunch for crypto > users as well - you should find some examples if you search for crypto on > the mailing list. > > The workaround

Re: pricehist: an alternative price fetcher

2021-08-21 Thread Martin Blais
This is great! Thanks for sharing. I've added a link to the contributions doc. On Fri, Aug 20, 2021 at 1:13 PM Chris Berkhout wrote: > Hi Beancount people, > > I've released a command-line tool that can fetch daily historical prices > from multiple sources and output them in several formats,

Re: Suggested documentation update

2021-08-16 Thread Martin Blais
Sure! On Mon, Aug 16, 2021 at 9:50 AM Suyash Agrawal wrote: > Hi Martin, > > Thanks for creating such an awesome software! > As for updating the documentation, I'm not sure on the scope and > limitations of the arithmetic parser, so I don't think I'd be able to write > any comprehensive

Re: Suggested documentation update

2021-08-16 Thread Martin Blais
Yes, re. arithmetic it should be documented. Commenting is disabled because I was getting too many fatfinger edits. If you want to edit, send a request through Docs On Mon, Aug 16, 2021 at 9:22 AM Suyash Agrawal wrote: > Hi, > > I recently stumbled upon beancount and I'm loving it! > I

Re: Reporting USD Trans in CAD for CRA

2021-07-19 Thread Martin Blais
I just left Canada it was much easier to deal with. On Mon, Jul 19, 2021 at 12:40 PM Ben Blount wrote: > There are some other Canadians on the list who have posted previously and > developed some plugins to help with a variant of solution 2. > > See

Re: v3 happiness

2021-07-14 Thread Martin Blais
On Wed, Jul 14, 2021 at 1:43 PM Chary Chary wrote: > I agree, > > Documentation is really impressive. > > Makes me also ask myself: if Martin writes these kind of documentation for > a hobby project, what does it look then for his work? > Thanks Chary. Work is completely different. Work

Re: v3 happiness

2021-07-13 Thread Martin Blais
Thanks John! On Tue, Jul 13, 2021 at 4:45 AM John Lee wrote: > Prompted by noticing Martin replying on another thread to say he thought > he'd be working a little on this soon: > > Just wanted to pop in to say I'm eagerly looking forward to the point when > the v3 work gets closer to usability

Re: State of v3

2021-07-08 Thread Martin Blais
Nothing new. I've been trying to get promoted, worked like an animal. Then I got promoted. Then I've been working to finish something to go on vacay (which usually translates to Beancount progress because, well, COVID, so vacay is at home). I'm about to go in a week. Hoping to get back on the

Re: Currency conversions - Equity:Opening-Balances or Equity:Conversions?

2021-07-06 Thread Martin Blais
@@ vs @ doesn't change anything but the multiplier. @@ will automatically calculate the rate based on the total amount, it doesn't change the opening balances or conversions. On Mon, Jul 5, 2021 at 10:41 PM Oon-Ee Ng wrote: > I have a few transactions (listed below) converting from SGD to

Re: Importer for Degiro trading account

2021-06-16 Thread Martin Blais
Thanks! Added a link to the contrib doc. On Wed, Jun 16, 2021 at 3:59 PM Szabó Tibor wrote: > Dear Beancount Users & Developers, > > I have recently published an importer for the trading accounts of the > Dutch broker Degiro. > > https://gitlab.com/szabootibor/beancount-degiro >

Re: autobean.sorted: find out misplaced / misdated transactions

2021-06-15 Thread Martin Blais
Added to contrib doc. Thank you! On Tue, Jun 15, 2021 at 7:58 PM Archimedes Smith wrote: > Very often I make mistakes on dates. For example: > >- After copy-pasting transactions, I forgot to update their dates. >- When a new year starts, I keep typing date in the previous year. > >

Re: Moving from GnuCash

2021-06-11 Thread Martin Blais
On Fri, Jun 11, 2021 at 3:18 PM Daniele Nicolodi wrote: > On 10/06/2021 19:08, Brandon Anderson wrote: > >>The use of bean-web is discouraged. It has already been removed from > >>what will become the next major version of Beancount. If you like a web > >>interface, use fava. > > > > Good to

Re: holdings

2021-06-11 Thread Martin Blais
- Don't use bean-report, it's obsolete; do all your work with bean-query - For holdings positions, use https://github.com/beancount/beancount/blob/master/beancount/projects/export.py On Fri, Jun 11, 2021 at 11:24 AM david e wrote: > Hello, I am new to beancount and still making small steps. >

Re: Moving from GnuCash

2021-06-08 Thread Martin Blais
For check numbers and per-postings description use metadata. ISO8601 dates sort naturally. Part of the design aesthetic in this project is to keep things simple, e.g. minimal number of options and variants. Cheers, On Tue, Jun 8, 2021 at 4:41 PM Brandon Anderson wrote: > Hey, so I have been

Re: FIFO validation with STRICT booking

2021-06-05 Thread Martin Blais
gt; >> What about keeping that single plugin directive but allow the plugin code >> to implement different interfaces depending on what plugin type it is? >> >> On Fri, Jun 4, 2021 at 10:16 PM Martin Blais wrote: >> >>> Extra directives look ugly to me. Tryin

Re: FIFO validation with STRICT booking

2021-06-04 Thread Martin Blais
Extra directives look ugly to me. Trying to keep the language lean. I'd just have a Python-level feature and you'd have to write your own main with load_file(). It's pretty exotic anyway. On Sat, Jun 5, 2021 at 12:53 AM Ben Blount wrote: > Custom booking methods would be fantastic. > > Does

Re: FIFO validation with STRICT booking

2021-06-04 Thread Martin Blais
Sure why not. But you could also write your own booking method that does just this instead? I would call it "CHECK_FIFO". (Problem is it's orthogonal to all the methods, e.g. CHECK_LIFO, etc.. Whatever.) Right now I don't have a registration mechanism so you'd have to either - patch the code -

Re: bean-doctor context upgrades (now works with invalid transaction!)

2021-06-04 Thread Martin Blais
No worries! Glad it had made impact. Thanks for the note, On Fri, Jun 4, 2021 at 11:32 PM sm...@davethehappysinger.com < sm...@davethehappysinger.com> wrote: > Hi Martin, > > Just popping in to let you know what a fantastic fix this has been for me. > I use a FIFO methodology but with STRICT

Re: autobean.narration: per-posting narration, in comment

2021-05-30 Thread Martin Blais
Thanks! Added to contrib doc On Sat, May 8, 2021 at 7:04 AM Archimedes Smith wrote: > Hi all, > > I'm sharing the plugin `autobean.narration` which I've personally been > using a lot for shopping transactions. It allows me to annotate each > posting in a concise way by populating per-posting

Re: Why is lineno required when creating Transactions in an importer?

2021-05-08 Thread Martin Blais
Just a consequence of using namedtuples. The next version won't require it On Sat, May 8, 2021 at 9:40 AM Oon-Ee Ng wrote: > So creating a new Transaction looks something like the below:- > > meta = data.new_metadata(file.name, lineno) > txn = data.Transaction( >

Re: Roth Contributions

2021-04-24 Thread Martin Blais
Oh I see. That makes sense. (And it's probably pro-rata as well, e.g. if you have 100k in contribs on an account worth 120k and you take out $1200, $200 would be taxable? That's what I'd expect the govt would do) I'd probably write a script to compute the contribution amount instead of tracking it

Re: Roth Contributions

2021-04-24 Thread Martin Blais
I still fail to understand. This would make sense for an After-Tax 401k, but for a Roth account, it's 100% non-taxable. The penalty is a constraint based on your age IIRC, there's nothing to track. On Sat, Apr 24, 2021 at 7:49 PM William Bean wrote: > Agreed. The actual investments and

Re: Roth Contributions

2021-04-24 Thread Martin Blais
I treat this as a regular account. Why would you track this? The whole point is to keep the account around for old age. On Sat, Apr 24, 2021 at 5:32 PM William Bean wrote: > Does anyone have a specific way they track Roth contributions in > Beancount, so you know how much you can withdraw

Re: Downsides of not tracking the cost for investments

2021-04-22 Thread Martin Blais
Thread is a bit long, will respond here On Thu, Apr 22, 2021 at 9:49 PM Max Katsev wrote: > > Really? A realized gain is not income? > > Yesterday I had 10 MSFT (that I've bought a year ago at $170) in my > Vanguard IRA account and $2500 in my Fidelity 401k. Today I've sold my 10 > MSFT for

Re: BQL PRINT command in a script

2021-04-16 Thread Martin Blais
On Sat, Apr 17, 2021 at 12:40 AM Daniele Nicolodi wrote: > On 16/04/2021 00:51, Ben Blount wrote: > > Why not write small python scripts whenever you want to do a query? > > Because writing single-use Python scripts does not fit my definition of > fun. There are much better solutions. > > > You

Re: BQL PRINT command in a script

2021-04-15 Thread Martin Blais
rote: > >> On 15/04/2021 23:27, Martin Blais wrote: >> > >> > entries, _, __ = loader.load_file(filename) >> > for entry in data.filter_txns(entries): >> > if : >> > continue >> > printer.print_entry(entry) >> > &g

Re: BQL PRINT command in a script

2021-04-15 Thread Martin Blais
entries, _, __ = loader.load_file(filename) for entry in data.filter_txns(entries): if : continue printer.print_entry(entry) On Thu, Apr 15, 2021 at 2:55 PM Daniele Nicolodi wrote: > On 15/04/2021 20:27, Martin Blais wrote: > > I would just write a loop against the API. &g

Re: BQL PRINT command in a script

2021-04-15 Thread Martin Blais
I would just write a loop against the API. shorter and more powerful.; On Thu, Apr 15, 2021 at 12:32 PM Daniele Nicolodi wrote: > On 15/04/2021 15:31, Daniele Nicolodi wrote: > > Hello, > > > > I am writing a tool that should operate on a selection of entries from a > > Benacount ledger. I

Re: Beancount Balance Assertion for Sum of accounts

2021-04-13 Thread Martin Blais
It's in the index: https://docs.google.com/document/d/1RaondTJCS_IUPBHFNdT8oqFKJjVJDsfsn6JEjBG04eA/edit#heading=h.hzs9xa5699ul It's fairly recent, so you might have missed it. I'm planning another one on trading derivatives with Beancount. On Tue, Apr 13, 2021 at 9:45 AM david e wrote: > that's

Re: OT: What development environments are people using?

2021-04-12 Thread Martin Blais
I mainly use three computer programs. Bash, Emacs (inside tmux) and a web browser. I rarely use anything else. (I could work in the Linux console if needed, without loss of productivity, thanks to tmux.) On Mon, Apr 12, 2021, 08:04 kuba jamro wrote: > Hi all, > > As we all know, the right tools

Re: beangulp loader is confused by csv module name

2021-04-11 Thread Martin Blais
We *could* just rename csv.py to csvimp.py On Sun, Apr 11, 2021 at 6:19 PM Daniele Nicolodi wrote: > On 12/04/2021 00:00, Daniele Nicolodi wrote: > > On 11/04/2021 23:55, kuba@gmail.com wrote: > >> Hi Dan, > >> > >> Yes, I am able to reproduce the same problem using the command line if I

Re: Add optional base ccy argument to beanprice contract?

2021-04-11 Thread Martin Blais
e but there is also the first part of the > base specified on the source string. > > On April 11, 2021 9:23:43 PM GMT+02:00, Martin Blais > wrote: >> >> I don't think so. >> Conversions is something you should be doing from the caller side. >> Price sources should alwa

Re: petl (Was: Re: Visidata)

2021-04-11 Thread Martin Blais
Using it a ton but not with Beancount yet On Sun, Apr 11, 2021 at 5:37 PM Ben Blount wrote: > Did either of you end up making some end to end flows with this that you'd > be willing to share? > I'm looking to make a pivot-table of account rollup balances over time and > something like PETL

Re: Add optional base ccy argument to beanprice contract?

2021-04-11 Thread Martin Blais
I don't think so. Conversions is something you should be doing from the caller side. Price sources should always return numbers in original quote currencies On Sun, Apr 11, 2021, 14:52 'Patrick Ruckstuhl' via Beancount < beancount@googlegroups.com> wrote: > Hi, > > I started looking into moving

Re: Beanprice custom source

2021-04-11 Thread Martin Blais
You can reference them by the name of their Python module if they're outside the library. You can use the short name if they're in the library, here: https://github.com/beancount/beanprice/tree/master/beanprice/sources New ones are welcome. Minimal requirement for inclusion in the library is a

Beancount - Symbology - Invitation to comment

2021-04-10 Thread Martin Blais (via Google Docs)
I've shared an item with you: Beancount - Symbology https://docs.google.com/document/d/1_52VhapAuR-ej4yB8rFovA8MyMmF8IOcqO44apsdtKU/edit?usp=sharing=6071c917 It's not an attachment -- it's stored online. To open this item, just click the link above. A quick note on the symbol conventions I

Re: transaction costs:

2021-04-10 Thread Martin Blais
No I though the two separate {} could not be booked. I don't remember. I don't remember what I did, look at file booking_full.py for details. On Sat, Apr 10, 2021 at 10:19 AM david e wrote: > but it doesn't return an error and compared to my manual calculation the > amount for PnL seems

Re: how to transfer Lots/cost basis from wallet to wallet

2021-04-10 Thread Martin Blais
It doesn't do that for you. It can book against the existing lots (e.g. with FIFO) but on the opening side (WalletB) it won't know to fill in the corresponding average cost basis. If you do this a lot, you'll have to automate with a script. I think eventually some features need to be built for

Re: transaction costs:

2021-04-10 Thread Martin Blais
Beancount won't be able to work out the booking automatically this way, too many unknown numbers to fill in. On Sat, Apr 10, 2021 at 10:08 AM david e wrote: > wouldn't it be correct to add the transaction costs in its own account > into the transaction, and thereby beancount is able to list

Re: OT: Cryptocurrencies exchange recommendation

2021-04-07 Thread Martin Blais
I've also heard of DeriBit. Binance not available to US residents unfortunately. CME has futures, which are available through TD and Tastyworks. Tasty is a fair bit more hip about it actually - they have a dedicated UI for trading them (long only, no options). They're also introducing NFT tokens

Re: Marking stock options with beancount

2021-04-06 Thread Martin Blais
Search on the mailing-list I'm pretty sure this came up before. I'd have recognized call options using a unique symbol at zero cost and 6.19 is the strike. Then on exercise reducing them while simultaneously opening a position in the company at the current value, reducing the cash account by the

Re: transaction costs:

2021-04-06 Thread Martin Blais
There's no facility to do this. You can write a script to handle the separation by processing the stream of transactions yourself. On Tue, Apr 6, 2021 at 3:16 PM david e wrote: > I am wondering about how to book transaction costs correctly. as I am > doing ethereum tx, I have to track cost

Re: decimal

2021-04-06 Thread Martin Blais
ot;EUR:0.01", it balance > well. with option "inferred_tolerance_default" "EUR:0.0005" , it does not > balance anymore ... > > 2019-09-30 * "Achat" "" > Assets:Titre:PEE0.7996 PEEB {125.055 EUR, 2019-09-30} > Assets:Titre:PEE2.4955 PE

Re: decimal

2021-04-05 Thread Martin Blais
Precision selected for BQL is a bit of a mess. Just another reason why it needs a rewrite. This is really gnawing at me, but I just don't have the cycles to rewrite it Try this in the meantime: option "inferred_tolerance_default" "EUR:0.0005" On Mon, Apr 5, 2021 at 4:08 PM francois PEGORY

Re: Marking stock options with beancount

2021-04-04 Thread Martin Blais
Hi Tuomas, I don't understand your terminology. "Marking" is the process of valuing active positions for the purpose of calculation unrealized P/L. I think you mean "exercise." On Sun, Apr 4, 2021 at 6:49 AM Tuomas Salmi wrote: > > Recently my employer let me to mark some stock options I had

Re: Investments and beanbuff

2021-04-04 Thread Martin Blais
On Sun, Apr 4, 2021, 01:34 redst...@gmail.com wrote: > A number of things. >> >> The slowness is one thing, but like you said, won't be an issue with the >> C++ version. >> The other thing is, for this type of import, usually you need multiple >> steps of import.You have the intra-day or nightly

Re: transaction-level metadata

2021-04-03 Thread Martin Blais
No you're right, the docs on the query tool is insufficient. That tool needs to be generalized and rewritten from scratch. I'm always amazed how much usage this, well, basically what is a prototype, has gotten. On Sat, Mar 27, 2021 at 5:11 PM wrote: > Re, > > On Sat, Mar 27, 2021 at 10:01:39PM

Re: Beanborg

2021-04-02 Thread Martin Blais
Consider doing it integrated well with beangulp. I won't have time to work on it, but I think it's worth making this easy and now common On Fri, Apr 2, 2021, 07:01 Martin Michlmayr wrote: > * redst...@gmail.com [2021-04-02 01:27]: > > Unrelated to the above: have you considered releasing your

Re: Booking date vs Value/Purchase/Trade date

2021-04-02 Thread Martin Blais
This is a known issue, see the settlement dates proposal, is being handled in the c++ rewrite, see v3 design doc. Also lots of history on the mailing list. Currently you either fudge the dates or skip the occasional balance assertion that doesn't want to cooperate. It's unsatisfying but I've been

Re: Beanborg

2021-04-01 Thread Martin Blais
On Thu, Apr 1, 2021 at 6:09 AM Luciano Fiandesio wrote: > Hi, try to answer some of the questions: > > > I'm wondering if your import scripts can be used for building investment > transactions? > I'm not sure, I don't track my investments using beancount. I wish I could > give a better answer.

Re: Investments and beanbuff

2021-04-01 Thread Martin Blais
On Thu, Apr 1, 2021 at 1:27 AM redst...@gmail.com wrote: > *Apologies, meant to start a new thread:* > Awesome, thanks for sharing beanbuff. March seems to be the #ingest month > :). > It's due to Daniele's active involvement in basically taking it over and giving it a good solid revamping.

Re: Beanborg

2021-03-31 Thread Martin Blais
Great stuff Luciano, thank you for sharing, I'll definitely have a good look at it when I find a bit of time. Red: Related to investments, I'm in the process of cleaning up and building common data structures specifically for trading accounts, in a new repo called "beanbuff". Find related codes

Re: Duplicate detection during import

2021-03-30 Thread Martin Blais
Dedup detection is definitely far from perfect and was just something I tried at the time. In the new version - beangulp, which Daniele is driving - dedup can be done by importer. I think that per-importer custom dedup is best. For example, any importer that has a unique ID per transaction should

v3 Booking Redesign

2021-03-26 Thread Martin Blais
Hi, Lately I've been giving thoughts on redesigning the interpretation of reducing postings syntax in Beancount. Here's a new doc: http://furius.ca/beancount/doc/v3-booking https://docs.google.com/document/d/1H0UDD1cKenraIMe40PbdMgnqJdeqI6yKv0og51mXk-0/view Comments and feedback welcome, --

<    1   2   3   4   5   6   7   8   9   10   >