2020-11-12 GnuCash IRC logs

00:03:20 *** chris has quit IRC
00:03:35 *** chris has joined #gnucash
00:03:35 *** gncbot sets mode: +o chris
00:03:35 *** ChanServ sets mode: +v chris
00:24:01 *** angel has quit IRC
00:46:34 *** chris has quit IRC
01:15:29 *** sbluhm has joined #gnucash
01:15:29 *** ChanServ sets mode: +v sbluhm
01:44:43 <CDB-PHONE> @tell Chris yes, negative units for sell. it's both more obvious and easier to problem (I assume)
01:44:43 <gncbot> CDB-PHONE: The operation succeeded.
01:45:46 <CDB-PHONE> @tell Chris agreed it's probably best not to show the confusing cap gain split in the dialog
01:45:46 <gncbot> CDB-PHONE: The operation succeeded.
01:51:03 *** fell has quit IRC
01:52:22 *** fell has joined #gnucash
01:52:22 *** ChanServ sets mode: +o fell
02:23:59 *** gnomey has quit IRC
02:37:22 *** Aussie_matt has quit IRC
02:47:25 *** Mechtilde has joined #gnucash
02:55:21 *** gjanssens has joined #gnucash
02:55:21 *** ChanServ sets mode: +o gjanssens
03:06:34 *** Mechtilde has quit IRC
03:06:53 *** rickl has joined #gnucash
03:07:14 *** bertbob has quit IRC
03:12:22 *** bertbob has joined #gnucash
03:12:22 *** ChanServ sets mode: +v bertbob
03:22:32 *** bertbob has quit IRC
03:23:47 *** bertbob has joined #gnucash
03:23:48 *** ChanServ sets mode: +v bertbob
03:35:00 *** gnomey has joined #gnucash
03:41:51 <gjanssens> .
03:54:57 *** rickl has quit IRC
04:13:16 *** bertbob has quit IRC
04:29:33 *** bertbob has joined #gnucash
04:29:34 *** ChanServ sets mode: +v bertbob
04:36:15 *** Aussie_matt has joined #gnucash
05:06:37 *** User has joined #gnucash
05:25:36 *** Aussie_matt has quit IRC
05:47:51 *** ramontjunior has joined #gnucash
06:06:08 *** Herbert has joined #gnucash
06:08:45 *** Herbert has quit IRC
06:33:14 *** User has quit IRC
06:50:42 *** chris has joined #gnucash
06:50:42 *** gncbot sets mode: +o chris
06:50:42 *** ChanServ sets mode: +v chris
08:04:23 *** gjanssens has quit IRC
08:10:46 *** KaiForce has joined #gnucash
08:11:39 *** gjanssens has joined #gnucash
08:11:39 *** ChanServ sets mode: +o gjanssens
08:39:47 <chris> .
08:45:07 *** Jimraehl1 has joined #gnucash
08:46:15 *** Jimraehl1 has quit IRC
09:06:04 <chris> CDB-Man_ SELL being -ve is intuitive to you but not to the average user.
09:06:31 <chris> it's not difficult to fix; i'll just need some sign rules for ND/ROC/Div.
09:36:29 <chris> I'll presume in your datafile signs MUST be as per your datafile eg. for regular ROC cash+ve, stock_val-ve.
10:02:23 *** fell has quit IRC
10:02:43 *** fell has joined #gnucash
10:02:43 *** ChanServ sets mode: +o fell
10:31:45 *** fell has quit IRC
10:36:33 *** ArtGravity has joined #gnucash
10:36:33 *** ChanServ sets mode: +v ArtGravity
10:44:33 <chris> ND is interesting - zero cash, but has income. weird.
10:44:56 <chris> jralls CDB-Man_ https://github.com/christopherlam/gnucash/blob/maint-stock-editor/gnucash/gnome/dialog-stock-editor.c#L386 mask is now a bitfield to show allowed signs ;-)
10:46:32 <chris> e.g. stock-split *must* have a non-zero units number. SELL's fees May be zero or positive expense.
10:55:20 *** User has joined #gnucash
10:58:24 *** User has quit IRC
11:19:14 *** sbluhm has quit IRC
11:23:05 *** jcarl43 has joined #gnucash
11:23:05 *** ChanServ sets mode: +v jcarl43
11:43:44 *** guak has joined #gnucash
11:44:32 *** Mechtilde has joined #gnucash
11:47:42 *** Mechtilde has quit IRC
11:50:34 *** fell has joined #gnucash
11:50:35 *** ChanServ sets mode: +o fell
11:51:32 *** storyjesse has quit IRC
11:56:58 *** jw4 has quit IRC
12:00:14 *** jw4 has joined #gnucash
12:00:14 *** ChanServ sets mode: +v jw4
12:00:39 *** sbluhm has joined #gnucash
12:02:27 *** Mechtilde has joined #gnucash
12:06:39 *** sbluhm has quit IRC
12:33:34 *** bertbob has quit IRC
12:38:41 *** bertbob has joined #gnucash
12:38:41 *** ChanServ sets mode: +v bertbob
12:53:07 *** CDB-Work has joined #gnucash
12:53:07 *** ChanServ sets mode: +v CDB-Work
12:53:48 <CDB-PHONE> [09:36] (@chris) I'll presume in your datafile signs MUST be as per your datafile eg. for regular ROC cash+ve, stock_val-ve.
12:54:02 <CDB-PHONE> correct, the signs must be as recorded
12:54:50 <CDB-Work> notional distributions are called as such because it is non-cash
12:55:03 <CDB-Work> you have "notionally" received a distribution, rather than actually receiving one
12:55:26 <CDB-Work> typically this happens when a fund is required to give the investor a mark-to-market income/gain for tax purposes
12:55:38 <CDB-Work> forcing a taxable paper gain amount, even though there is no cash in hand
13:08:27 <jralls> chris, That looks even less like a bitfield than it did before.
13:10:05 *** ozmac has quit IRC
13:16:00 <jralls> chris, more of a string of octals. You'll have substantial overhead converting that to and from the unsigned int that you need for masking or even more overhead for splitting the string unto substrings and doing char-compares to extract the values.
13:20:37 *** hfxpaul has joined #gnucash
13:20:44 <jralls> chris, it also reeks of magic numbers (https://en.wikipedia.org/wiki/Magic_number_(programming)).
13:21:52 *** halipaul has quit IRC
13:35:47 <jralls> chris Does it really make sense to map 12 choices into 256K possibilities?
13:38:42 *** tonysoar has joined #gnucash
13:41:38 <jralls> chris, shouldn't 1, 2, and 4 be "must" since they have no alternatives? What's the point of enabling something when its only legal value is 0 ('2')? ISTM there are only 3 reasonable constraints: Unconstrained, <1, >-1.
13:43:29 <jralls> chris, ISTM you want asset_amount and asset_basis instead of trans_units and trans_value.
13:46:08 <jralls> CDB-Man_/CDB-PHONE/CDB-Work (sheesn, we need CDB-*!) I'd think most brokers would extract fees for passing through dividends and since dividends are ordinary income those fees would be possibly deductible investment expenses rather than changing the basis, but I've never done any shorting.
13:48:37 *** Hamaryns has joined #gnucash
13:48:37 *** ChanServ sets mode: +v Hamaryns
13:53:04 *** sbluhm has joined #gnucash
13:53:04 *** ChanServ sets mode: +v sbluhm
13:54:09 *** AdrienM has quit IRC
13:56:07 *** tonysoar has quit IRC
13:56:20 <jralls> CDB-Man_ the compensatory notional distribution strikes me as unlikely. IIUC notional distributions are possible only for open-ended mutual funds where one holds the fund in account with the fund operator. Since there's no outside market for those the only way to short them would be to deal directly with a fund share holder.
13:57:00 <CDB-Work> in Canada, ETFs distribute notional gains for underlying FX hedges held by the fund
13:57:06 <CDB-Work> and you can short the ETF units
13:58:07 <CDB-Work> I don't know if brokers charge handling fees for deducting compensatory dividends, I 've never held anything short over the ex-dividend date. but i would agree such fees would likely be deductible
13:58:53 <CDB-Work> in canada, they are only deductible to the extent that you have positive gross dividend income
13:59:42 <CDB-Work> regarding highlighting, CDB-Work is the only one you need to highlight if it's online, the other accounts alias check for "CDB" as s substring (case insensitive)
14:00:05 <jralls> In the US investment expenses IIRC have a 7% of AGI threshhold, pretty hard to meet unless you have a lot of margin interest.
14:00:21 <CDB-Work> CDB-Man_: test
14:01:04 <CDB-Work> CDB-Man_: test 2
14:01:28 <CDB-Work> CDB-Man_: test 3
14:01:58 <CDB-Work> CDB-Man_: test 4's the charm....
14:02:13 <jralls> Lose your phone?
14:02:38 <CDB-Work> i guess the phone can't do substring
14:02:44 <CDB-Work> CDB-Man
14:02:51 <CDB-Work> oh well, disappointing
14:02:53 <jralls> For those FX ETFs I suppose that reinvesting the dividends is mandatory.
14:02:57 <CDB-Work> CDB-PHONE:
14:03:24 <jralls> Want me to call it for you?
14:04:22 <CDB-Work> in canada the strict rule is 1) you can only deduct certain expenses if you have non-CG income
14:04:37 <CDB-Work> 2) certain other expenses can only be netted against income from the same category
14:04:57 <CDB-Work> example: 1) you can only deduct interest expense if you earn dividend or interest income
14:05:10 <CDB-Work> 2) you can only net compensatory dividends against otehr dividend income
14:05:52 *** CDB-PHONE has quit IRC
14:05:56 *** CDB-PHONE has joined #gnucash
14:05:56 *** ChanServ sets mode: +v CDB-PHONE
14:06:01 <jralls> You're telling me this in case I have to apply for asylum, right?
14:06:04 <jralls> ; _0
14:06:10 <jralls> ;-)
14:08:03 *** sbluhm has quit IRC
14:08:23 <CDB-Work> CDB-PHONE:
14:08:28 <CDB-Work> CDB-Man_
14:08:34 <CDB-Work> CDB-Man_
14:08:40 <CDB-Work> okay I give up
14:09:01 <CDB-Work> the desktop can sub string highlight, the phone apparently not
14:09:33 <CDB-Work> cdb
14:12:26 <CDB-Work> @jralls> For those FX ETFs I suppose that reinvesting the dividends is mandatory. <-- yes, well, more like the mark to market gains from FX hedges are part of the fund's routine operations, and there's no distributions to be had from them, and they are automatically reinvested and re--unitized by the fund manager
14:12:26 <gncbot> CDB-Work: Error: "jralls>" is not a valid command.
14:14:42 *** AdrienM has joined #gnucash
14:14:42 *** ChanServ sets mode: +v AdrienM
14:14:55 <jralls> And that gets passed on to the shareholder as a phony dividend that doesn't really affect the short seller?
14:17:12 <jralls> chris, dividends can incur fees too at least in the case of derivatives of foreign stocks called American Depository Receipts. My broker charges a $10 per dividend ADR passthrough fee on every dividend.
14:18:03 *** sbluhm has joined #gnucash
14:18:18 <CDB-Work> I definitely do not get charged by my canadian broker for dividends received on ADRs
14:18:33 <CDB-Work> I hold Nintendo ADRs and no such broker fee on receiving the Nintendo dividend
14:18:52 <CDB-Work> And that gets passed on to the shareholder as a phony dividend <-- yes
14:20:04 <CDB-Work> that doesn't really affect the short seller? <-- not sure, since i've never held anything short for that long before. but regardless of whether it affects the short seller, it's still a technical possibility that a transaction template structure can be built for, should anyone need it, given that it's just a sign reversal of the normal case
14:20:06 <jralls> The ADR passtrhoug is a recent development with Schwab. Started about the same time they reduced the commission from $10 to $8 (it's now 0).
14:21:39 <jralls> How is a compensatory notional a sign reversal on a regular notional? It doesn't affect the short's basis.
14:26:41 <jralls> Hmm, in fact it's a benefit to the lender because the person who bought the shorted shares incurs the tax hit as the owner-of-record. When the short closes the position and returns the shares the notional basis change is already paid for.
14:28:34 <jralls> gjanssens, I got the github action tests to work on ubuntu18.04. The problem was that ICU updated from 60 to 65 but boost_regex wasn't rebuilt so there was a mangling difference.
14:28:53 <jralls> gjanssens, I fixed it by removing the update step.
14:33:07 <CDB-Work> in a normal scenario, the receiver of a notional distribution in a long hold position incurs the tax impact now as a dividend, hence they get a step-up in basis to reduce future CG to offset the current dividend income. in the short seller's scenario, the cost to repay the borrowed shares would go up, given that everyone has picked up on a notiona
14:33:07 <CDB-Work> l distrubtion, and that would be reflected in the tax basis (and perhaps even the market value), so the short seller incurs an expense now, but has a stepped down basis to increase future CG to offset the current period expense deduction
14:33:16 *** halipaul has joined #gnucash
14:33:52 *** hfxpaul has quit IRC
14:34:54 <CDB-Work> but again, i've never had a personal experience to confirm this
14:35:07 <CDB-Work> and i dont think this has made it into tax court case law (in canada anyways)
14:35:11 <CDB-Work> let alone other jurisdictions
14:36:10 <CDB-Work> TL;DR: at least in canada, based on how I understand our ETF trust unit structures to be setup, yes it would affect the tax basis in canada for a short seller
14:39:46 <jralls> OK. That led me to thinking about MLPs, the primary source of returns-of-capital (in the US anyway). Those are market traded too and therefor shortable, but since doing taxes for an MLP is tedious for a normal long position I'd think you'd have to be a masochist to want to short one.
14:42:50 <jralls> Oh! I think chris's modeling of compensatory dividends and RoCs is wrong: He's got them as proceeds but they're expenses to the short, who must pay the share's lenders the dividends.
14:42:52 <CDB-Work> xactly!
14:43:23 <CDB-Work> compensatory divs would go into the dividend income account, yes
14:43:29 <CDB-Work> RoC though affects basis
14:43:40 <CDB-Work> so ROC being proceeds is fine
14:44:21 <jralls> Right, but negative, not positive. And the broker will extract it from the short's cash account.
14:48:02 <jralls> Hmm, he's got negative values in the dividend column for dividends and notionals on a long position and positive in the short equivalents. That seems backwards, but income is Equity so it's sign reversed... Hmm.
14:51:22 <CDB-Work> indeed, RoC on short would increase your basis
14:54:08 <jralls> chris, a short sale should be 441000 and a short buy 114071. A regular buy should be 441071. Negative fees are very unlikely. ;-)
15:02:31 *** ramontjunior has quit IRC
15:12:06 <jralls> chris, never mind about 3 being negative. Really all of the 1s should be 3s.
15:17:26 <jralls> chris, but an open short is the same as a short sell, 441000.
15:18:11 <jralls> chris, There's an extra memo field in the notional distribution entries.
15:29:34 *** Hamaryns has quit IRC
15:37:45 *** jw4 has quit IRC
15:38:03 *** jw4 has joined #gnucash
15:38:03 *** ChanServ sets mode: +v jw4
16:11:35 <gjanssens> jralls: I haven't looked at the github actions yet. But good you got it fixed.
16:12:00 <jralls> Do you have any thoughts about rolling it out?
16:12:24 <gjanssens> Not really, if it works I'd say just do it.
16:12:31 <jralls> OK.
16:12:45 <gjanssens> You can probably have it in parallel with the travis tests until travis-ci.org shuts down
16:13:21 <gjanssens> That gives us some time to compare results and perhaps pick up things we missed.
16:13:50 <gjanssens> How's the performance compared with Travis ?
16:14:17 <jralls> Right. Plus I still need to figure out how to set up Docker for a bleeding-edge build. The newest native is ubuntu-20
16:14:39 <jralls> Seems a bit faster, about 18 minutes.
16:15:00 <gjanssens> I have some docker experience. Give me a few days, I'll try to look at that.
16:15:31 <gjanssens> 18mins seems a bit better than Travis indeed.
16:16:16 <gjanssens> I'll be off to bed now.
16:16:20 <gjanssens> See you later!
16:16:31 <jralls> Goodnight!
16:16:36 *** gjanssens has quit IRC
16:43:12 *** Mechtilde has quit IRC
16:45:02 *** alecostabr has joined #gnucash
16:50:12 *** alecosta_ has joined #gnucash
16:52:02 *** alecostabr has quit IRC
16:56:53 *** jw4 has quit IRC
16:57:03 *** jw4 has joined #gnucash
16:57:03 *** ChanServ sets mode: +v jw4
17:02:56 *** alecosta_ has quit IRC
17:03:19 *** alecostabr has joined #gnucash
17:06:20 *** alecostabr has quit IRC
17:15:29 <chris> The octalfield string is what I came up with so far. Not sure what's the best data structure
17:15:52 <chris> account_amount vs account_basis... or; stock_amount vs stock_basis is better?
17:16:11 <chris> I hadn't completed the Shorting bitfields.
17:16:45 <chris> oops asset_amount vs asset_basis. ok. either.
17:18:24 *** sbluhm has quit IRC
17:18:51 <chris> the '2' is enabled only to serve its purpose as a bitfield. it'll be ORed with 1 or 4.
17:20:41 *** fell has quit IRC
17:21:59 *** fell has joined #gnucash
17:21:59 *** ChanServ sets mode: +o fell
17:22:10 <jralls> chris, the best data structure for masks is an unsigned int upon which you use the bitwise operators &, |, and ^.
17:22:25 <chris> hopefully CDB-etc will be able to fuzz test it manually :)
17:22:52 <chris> I don't have that skill yet --> unsigned it masks
17:23:04 <chris> especially querying the mask afterwards
17:23:45 <chris> anyway it's still buggy for now
17:23:45 <jralls> Time to break out your C book! ;-)
17:24:40 * chris has no book
17:24:46 <jralls> AFAICT it's not even buggy yet, I didn't find an implementation, just the strings for setting up the combo box.
17:25:12 <chris> buggy in my implementation somewhere
17:26:36 <chris> ok see latest commit. it's crashing on refresh_all between the two printfs.
17:27:22 <chris> but crash occurs on the *second* call ie when I've modified account_amount field.
17:27:43 <jralls> ISTM it's not the right design, tho. Better to just have an enum for the 12 types you want and call the appropriate model actions based on that in the controller.
17:27:55 *** iduno8912 has joined #gnucash
17:27:55 *** ChanServ sets mode: +v iduno8912
17:28:42 <chris> ^ agree - this is obv wip as a string for conciseness only.
17:29:31 <jralls> the two printfs in refresh_all?
17:29:34 <chris> yes
17:29:58 <chris> gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
17:38:42 <chris> I'll push to github if you wish to comment.
17:39:57 *** Aussie_matt has joined #gnucash
17:46:39 <jralls> You need to initialize action_iter to a particular item in the tree model before you can use gtk_tree_model_get. The iter tells the model which item you want.
17:48:39 <jralls> https://developer.gnome.org/gtk3/stable/GtkComboBox.html#gtk-combo-box-get-active-iter
17:52:36 <iduno8912> When doing split transactions with multiple expense accounts, sometimes I'm left with sales tax that I assign to Expense:Taxes:State/Province which is was default gnucash cash account when I set it up. Is that the correct account? Do I need to be tracking sales tax even for transactions with only one expense account? It sounds tedious to do that.
17:52:36 <gncbot> iduno8912: Sent 4 weeks, 6 days, 16 hours, and 27 minutes ago: <fell> That depends on the purpose: some use cryptos for daily payment (cuurent asset), others as a long term investment (fixed asset). Yes you will need at least one account per currency.
17:53:44 <chris> ooh yes
17:54:52 <chris> gtg walk
17:55:02 <jralls> iduno8912, Business or personal book? If business, what kind?
17:55:25 <iduno8912> jralls Business, mobile food service in CA
17:56:28 <iduno8912> im the owner doing my own books
18:01:29 <jralls> Do you have an accountant to advise you? If not you should get one. If you want to (or are required to) track sales tax separately from the stuff it's taxed on then the account name would seem as good to me as any, though you probably don't need to a State/Province subaccount, there's only the one.
18:02:20 <jralls> The accounting question might hinge on whether you're required to track sales taxes paid and only a California-licensed accountant can tell you that.
18:19:23 <iduno8912> I have a tax guy that does accounting also. Ill ask thanks
18:19:46 <jralls> You're welcome
18:24:46 <CDB-PHONE> [17:22] (@chris) hopefully CDB-etc will be able to fuzz test it manually :) <-- yeah, I don't want to go poke holes now until you've ironed out the kinks you already know about. that and this month is exceptionally busy for me at work
19:39:25 *** jcarl43 has quit IRC
19:44:06 *** iduno8912 has quit IRC
20:31:07 *** guak has quit IRC
20:44:31 <chris> jralls: let me know thoughts how to save/retrieve account links stock -> capgains/dividends/fees/proceeds. I'd use account kvp to encode resulting account guids
20:45:36 <chris> capgains/dividend/proceeds/expenses are nice keys - they are all 8 chars wide
20:48:40 <jralls> chris, you should probably coordinate with mta on that one, and in particular you'll need to work on capgains.cpp and the lots dialog, they currently use a hardcoded account name "Orphaned Gains". This is also related to the kvp work in https://github.com/Gnucash/gnucash/pull/762.
20:49:32 <jralls> So consistency with that would be A Good Thing™.
20:51:33 <chris> :sad-face:
20:52:01 <jralls> Because?
20:52:40 <chris> there's dead cap-gains.c and I had no inclination to reuse old code
20:53:05 <chris> don't know where they link to
20:53:11 <jralls> It's not dead. It's integral to the lots scrubber.
20:53:27 *** ArtGravity has quit IRC
20:53:59 <chris> ok. still, I had no inclination to understand the lot scrubber
20:54:36 <jralls> I don't blame you, it's pretty convoluted. But users do use it so you mustn't break it.
20:55:59 <chris> ok. the cap-gains.c seems to tag split as cap-gains whereas I'd want to tag income-account as capgains-account.
20:56:25 <chris> rather, tag stock-account with a kvp 'capgains' => 'income-account guid'
20:57:20 <jralls> Right. In the US there's be a choice of a short term, a long term, and in some years at the whim of Congress, a medium-term.
20:58:18 <chris> Yes; CDB-*'s capgains would only be taggable because they live in an income account and have a corresponding zero-amount stock split.
21:00:23 <jralls> That's the apr hack. With KVP tags you could replace the zero stock-account split with a KVP tag tying the dividend to the stock account.
21:04:30 <jralls> Hmm, maybe I'm thinking backwards about both PR762 and the lot scrubber: Both are about replacing hard-coded account names with tags to make the appropriate accounts findable. Your dialog would tag transactions with account GUIDs for connecting the pieces.
21:05:22 <chris> xaccAccountSetKVP (stock, "capgains-account", "income:SPY:capgains")
21:05:44 <jralls> But aside from connecting basis-but-not-amount-changing transactions back to the assets whose basis they change don't the splits take care of that?
21:06:41 <jralls> I don't think anyone would have a separate capgains account for each security.
21:06:56 <chris> it
21:06:59 <jralls> GTG, I'm summoned to dinner.
21:07:23 <chris> it's still useful for the dialog to find a way store&retrieve the accounts associated for that stock. the accounts do not have to be unique per stock.
21:07:44 <chris> hence, saving into account kvp is the most appropriate unhackish hack.
21:08:40 <chris> later on we can decide to tag splits with appropriate kvp to link whereever they want to
21:09:31 <chris> it's still useful for the dialog to find a way store&retrieve the accounts associated for that stock. --> otherwise every time anyone wishes to add new stock activity they'll need to choose 'Income:Capgains' 'Expense:Broker:Fees' etc
21:43:47 <chris> jralls: there's xaccAccountGainsAccount but ties to currency rather than account
21:44:03 <chris> actually ties to account *and* currency
21:44:09 <chris> a different purpose
21:53:41 *** David has quit IRC
21:53:51 *** David has joined #gnucash
22:05:22 <chris> see latest commit on https://github.com/christopherlam/gnucash/blob/maint-stock-editor/gnucash/gnome/dialog-stock-editor.c how I'd store/retrieve linked accounts
22:06:14 <chris> gtg
22:08:42 *** CDB-PHONE has quit IRC
22:43:49 *** CDB-PHONE has joined #gnucash
22:43:49 *** ChanServ sets mode: +v CDB-PHONE
23:11:36 *** ghost has joined #gnucash
23:17:24 <ghost> Just upgraded from 2.6 to 4.2 on Linux. At some point, the default behavior for opening a register or report changed from opening on the far right to opening after the current register. Is there a way to switch back to the old behavior?