Re: newbie question around getting going on smart_importer

2021-04-28 Thread 'Patrick Ruckstuhl' via Beancount

Hi Jonathan,

Yes the way you describe makes a lot of sense. That way it limits the 
amount of config you have to manually train.



Regards,

Patrick


On 28.04.2021 08:27, jrgo...@gmail.com wrote:

Hi,

I've finally gotten (a) account structure I want for now (b) importers 
working for my 3 core accounts. I now want to get smart_importer 
working and want to understand the best strategy to bring this into 
the process.


My understanding from the smart_importer data is that I can covert all 
my importers to be "smart importers" using the hooks that 
smart_importer provides as noted in the readme file. I think that is 
straightforward. I can use this on any importer type bank, cc, etc.


*So my core question *then, is it best to only manually label 1-2 
months of data and then use that labelled data to train the 
smart_importer and then run the smart_importer version on the rest of 
my data? For example, I have 1.5 years of OFX data from my bank in one 
OFX file. I can run the current non-smart importer on the entire file 
but then I have to manually label the entire thing. There isn't a 
totally different way to dynamically do this as I edit in emacs or use 
smart_importer in a different way? If I understand I should split into 
1.3 years and 0.2 years for example. Manually label the 0.2 years and 
then take the remaining 1.3 years and run through the smart_importer 
version of the importer? Or is there some other way I should go about 
this?


Also want to say, I really appreciate the beancount tool, so many 
amazing contributions (e.g. Reds importers), and the new 
smart_importer tool  and everyone helping answer questions.


thanks,
Jonathan
--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/f21fac7a-5119-4ada-a1ae-01244768b2a6n%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/0dbd7de1-e544-3177-0b79-2c91f686110f%40ch.tario.org.


A pre-commit hook for formatting beancount files

2021-04-28 Thread Haotian Wu

Hi all,

I'm using git to manage my beancount ledgers and I love auto formatting. So 
I made a pre-commit  hook for formatting beancount 
files: https://github.com/whtsky/pre-commit-beancount-format . 

I hope that's helpful to you.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/f28581ec-5288-4b81-a90a-6900036e41bdn%40googlegroups.com.


emacs beancount mode and multiple files for accounts

2021-04-28 Thread jrgo...@gmail.com
Hi everyone,

I have emacs beancount mode working well. I really like it when I first 
tried to use beancount 1 year ago. I'm restarting everything now and want 
to modify to not put everything in one file.

Does beancount mode only look within the current document to create an 
index of accounts for possible autocomplete? Is there anyway to modify this 
to point to another file with all the accounts I have? I have a file called 
"accounts.beancount" that contains all the beancount accounts I want to use 
to populate and I'm trying to organize my beancount files a bit to more 
easily rollback changes. 

thanks,
Jonathan

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/3a4c760f-60db-4c5e-a4ba-22154329fba0n%40googlegroups.com.


Re: emacs beancount mode and multiple files for accounts

2021-04-28 Thread john.a.r...@gmail.com
Hi, Jonathan --


> Does beancount mode only look within the current document to create an 
> index of accounts for possible autocomplete? Is there anyway to modify this 
> to point to another file with all the accounts I have? I have a file called 
> "accounts.beancount" that contains all the beancount accounts I want to use 
> to populate and I'm trying to organize my beancount files a bit to more 
> easily rollback changes. 
>

You can include the file -- put this on a separate line in your ledger --

include /path/to/accounts.beancount

--John

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/7f9b684c-775d-4d41-b655-58c689f370fdn%40googlegroups.com.


Re: emacs beancount mode and multiple files for accounts

2021-04-28 Thread Jonathan Goldman
Isn’t this include directive you reference for the Beancount loader?

(https://beancount.github.io/docs/beancount_language_syntax.html#includes)

I’m asking how to have emacs Beancount mode be aware of all accounts even
if the currently active file doesn’t list them all? Is there also and
include method I add to the emacs “.el” file?

On Thu, 29 Apr 2021 at 4:02 AM john.a.r...@gmail.com <
john.a.rakest...@gmail.com> wrote:

> Hi, Jonathan --
>
>
>> Does beancount mode only look within the current document to create an
>> index of accounts for possible autocomplete? Is there anyway to modify this
>> to point to another file with all the accounts I have? I have a file called
>> "accounts.beancount" that contains all the beancount accounts I want to use
>> to populate and I'm trying to organize my beancount files a bit to more
>> easily rollback changes.
>>
>
> You can include the file -- put this on a separate line in your ledger --
>
> include /path/to/accounts.beancount
>
> --John
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Beancount" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beancount/mNUrYeOsOqE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/7f9b684c-775d-4d41-b655-58c689f370fdn%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CANUAcYf6bmLZxHxXpO-GrXEiVC9ReqwnNAbW9X3dRLOyP8aPGA%40mail.gmail.com.


Difficulty accounting for stock sales in foreign currency

2021-04-28 Thread Caesar Schinas
I've been using beancount for a while for my everyday transactions, but am
only recently getting around to trying to import my trading activity to my
ledger as it seems much more complex.

I'm having trouble with accounting for profit/loss on shares which are
priced in a currency different to the main currency of my trading account.

My trading account is in GBP, but I often buy shares priced in USD. My
broker handles the conversion, and charges me an FX fee as a percentage of
the value of the trade.

Here is an example:

2020-03-31 * "Buy 11 shares of Square"
  Assets:GB:Freetrade:GIA:Cash   -482.60 GBP @ 1.23390 USD
  Assets:GB:Freetrade:GIA:SQ  11 S_SQ {54.13456 USD}

; ...

2020-11-16 * "Sell 11 shares of Square"
  Assets:GB:Freetrade:GIA:Cash   1467.08 GBP @ 1.31820 USD
  Assets:GB:Freetrade:GIA:SQ -11 S_SQ {54.13456 USD} @ 175.81000 USD
  Assets:GB:Freetrade:GIA:Cash -6.60 GBP
  Expenses:Financial:Fees   6.60 GBP
  Income:Investments:PnL -977.88 GBP @ 1.31820 USD

All the figures are from my broker's reports, except for the profit
calculation.
For the profit I have simply subtracted the GBP purchase price from the GBP
sale price, as this is the actual amount of profit I made (the actual net
change in my account balance).

However, the second transaction does not balance:
Transaction does not balance: (49.3832800 USD)

I am struggling to understand where the extra 49.3832800 USD  came from (or
went?), or how I can balance this transaction.

I'm quite new to this. Can anyone give me any tips?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAMfsOg__vph_CmnF55dmUGrFAHOT-bM%2BKCKnXTdYF%3D%2BbFw6H2w%40mail.gmail.com.