Re: [GNC] QIF format for StkSplit

2023-01-08 Thread Kalpesh Patel
Tim,

Since I still have a working copy of Quicken 2017, I started a new file and
then did a single stock split and this is what it looks like when exported
from Quicken in QIF format:


!Type:Invst
D8/24'22
NBuy
YTesla Inc
I891.29
Q1
U891.29
T891.29
^
D8/25'22
NStkSplit
YTesla Inc
I302.36
Q30
^


This transaction is for Tesla's 3:1 stock split that happened on Aug 25th. 

Essentially I bought a single stock of Tesla on Aug 24th at the closing
price of $891.29. Then stock split 3:1 on Aug 25th with optional opening
price of $302.36. Note that Quantity is listed as thirty - 10x value - on
the split date!

For kick-&-giggles I set the split to 1000:1 (this split size is limited by
Quicken) and this is what it looks like:


!Type:Invst
D8/24'22
NBuy
YTesla Inc
I891.29
Q1
U891.29
T891.29
^
D8/25'22
NStkSplit
YTesla Inc
I302.36
Q10,000
^


So from the looks of it, the stock split needs an extra zero on the quantity
of after the split quantity. And for split of 1000:3 as follows:

!Type:Invst
D8/24'22
NBuy
YTesla Inc
I891.29
Q1
U891.29
T891.29
^
D8/25'22
NStkSplit
YTesla Inc
I302.36
Q3,333.33
^

So Quicken 2017 on Windows is consistent that the final quantity it stores
is 10X of what should be the normal stock split ratio that would be arrived
at using strait math.

When I imported the first and the last stock split QIF configuration above,
GNC v4.11 on Windows imported the QIF (IMHO) as intended.
 




--

Message: 2
Date: Thu, 5 Jan 2023 13:51:28 -0600
From: m...@tgr66.me
To: gnucash-user@gnucash.org
Subject: [GNC] QIF format for StkSplit
Message-ID: <7a1892d0-5538-4140-8fd7-e18904494...@tgr66.me>
Content-Type: text/plain;   charset=utf-8

I?ve searched considerably, but if I missed it, I apologize.

Docs for QIF say the Q field should contain the split ratio. I?ve tried
various options, but I?m not getting the expected results after import.

!Type:Invst
D8/31/2020
NStkSplit
PAPPLE INC
YAAPL
CR
M4 for 1 split; 
Q36 // Have also tried 4:1, 4/1 and simply 48
^

GnuCash 4.13 on macOS. I?ve not tried yet on my Linux box.

Thanks.

--

Message: 3
Date: Thu, 5 Jan 2023 15:02:24 -0500
From: David Reiser 
To: m...@tgr66.me
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] QIF format for StkSplit
Message-ID: 
Content-Type: text/plain;   charset=utf-8

I?ve never used QIF for stock splits, but the obvious question is ?Have you
tried Q4?? After all, 4/1 is numerically equal to 4 (a ratio reduced to a
single number).
--
Dave Reiser
dbrei...@icloud.com





> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
> 
> I?ve searched considerably, but if I missed it, I apologize.
> 
> Docs for QIF say the Q field should contain the split ratio. I?ve tried
various options, but I?m not getting the expected results after import.
> 
> !Type:Invst
> D8/31/2020
> NStkSplit
> PAPPLE INC
> YAAPL
> CR
> M4 for 1 split; 
> Q36 // Have also tried 4:1, 4/1 and simply 48
> ^
> 
> GnuCash 4.13 on macOS. I?ve not tried yet on my Linux box.
> 
> Thanks.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



--

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-06 Thread ml
Yes. In my GnuCash the original shares are removed in one transaction, and the 
newly calculated amount (based on the split) is added in a second transaction.

In my Quicken, when I recorded a split, the additional shares (in this case, a 
4 for 1 of APPL) were recorded. 

But my original question has more to do with what ratio I should put into the 
gif to properly record the split. What I’m getting to work is to multiply the 
ratio by 10 and that is what should be in the QIF.

For example, with Apple’s 4 for 1 split in 2020, the line in the QIF should be 
Q40.

> On Jan 5, 2023, at 19:24, Ken Farley  wrote:
> 
> When I was doing a bunch of Quicken conversions using QIF files, what 
> happened was pretty much what you described here, I think. My original shares 
> were removed in one transaction, while the split amount was added back. For 
> example, 200 shares that needed at 2 for 1 resulted in a 200 share removal 
> with a subsequent 400 share addition. Maybe this is how Quicken handled 
> splits "behind the scenes"?
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-06 Thread ml
I appreciate the analysis of the code, and the confirmation of what I found 
through experimentation. I had tried searching the code for the answer, but I 
do not know C/C++ and I would not have been able to figure it out. 

I’d be happy to write a paragraph documenting how a QIF entry for a StkSplit 
import should be built, but I’m not sure where this should be included?

Tim


> On Jan 5, 2023, at 22:23, john  wrote:
> 
> gnc_numeric_create is a C function implemented in 
> libgnucash/engine/gnc-numeric.cpp and made available to Scheme by SWIG which 
> changes its name to gnc-numeric-create. It takes two int64_t arguments, 
> numerator and denominator.
> 
> There's a general convention that public functions defined in Scheme are 
> named gnc:foo. SWIG-wrapped functions have their same name in Scheme except 
> that underscores are replaced with hyphens. Aside from the original xacc  
> camel-case functions we generally follow the Gnome practice of beginning C 
> and C++ free functions with the gnc namespace followed by the class name, 
> separated by underscores. With only seven exceptions if the name is like 
> gnc-foo-bar then it's a wrapped C function while (with no exceptions) 
> gnc:foo-bar is defined in Scheme.
> 
> Note that n/ is defined in qif-to-gnc.scm: (define (n/ a b) (gnc-numeric-div 
> a b 0 GNC-DENOM-REDUCE)) and n* as (define (n* a b) (gnc-numeric-mul a b 0 
> GNC-DENOM-REDUCE)).
> 
> So in normal arithmetic notation, out_shares = inshares * (split_ratio / 10). 
>  That code was added in 
> https://github.com/Gnucash/gnucash/commit/00972f52311b3641c0bd4474334ff846501a3019#diff-fe1b1f57a35caf6ec4d0916b27f888c9bec88a4264248e4d1687d97cbabcc963
>  
> 
>  with no explanation of why the provided split ratio should be divided by 10.
> 
> Regards,
> John Ralls
> 
> 
> 
>> On Jan 5, 2023, at 6:05 PM, David Reiser via gnucash-user 
>>  wrote:
>> 
>> bug, maybe?
>> 
>> import-export/qif-imp/qif-to-gnc.scm says:
>> 
>> ((stksplit)
>> (let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
>>(in-shares
>> (xaccAccountGetBalance near-acct))
>>(out-shares (n* in-shares splitratio)))
>>   (xaccSplitSetAmount gnc-near-split out-shares)
>>   (xaccSplitSetAmount gnc-far-split (n- in-shares))
>>   (xaccSplitSetValue gnc-near-split (n- split-amt))
>>   (xaccSplitSetValue gnc-far-split split-amt
>> 
>> 
>> num-shares is the value of the qif Q line, so it looks like the entered 
>> split ratio is being divided by 10. But I can’t find a definition of 
>> gnc-numeric-create. And my scheme (well, LISP, in my case) is so rusty it 
>> almost might be worse than not knowing it in the first place...
>> --
>> Dave Reiser
>> dbrei...@icloud.com
>> 
>> 
>> 
>> 
>> 
>>> On Jan 5, 2023, at 6:13 PM, m...@tgr66.me wrote:
>>> 
>>> So, the ratio * 10 does seem to be working. :man_shrugging:
>>> 
>>> For example, if it is a 4 for 1 split, 40
>>> If it is a 1 for 10 split, 1
>>> 
 On Jan 5, 2023, at 14:17, m...@tgr66.me wrote:
 
 Yes. I missed adding that to the list I’ve tried.
 
 In the full work minimal example below, the share balance ends up at 1.2
 
 !Account
 NAssets:Investments:Brokerage Account:Joint Brokerage
 TInvst
 ^
 !Type:Bank
 D01/11/2020
 NPayment/Deposit
 PTrf My Bank
 CX
 T1,000.00
 MDeposit
 LAssets:Current Assets:My Bank
 ^
 !Type:Invst
 D12/2/2021
 NBuy
 PXYZ, INC
 YXYZ
 I150
 T450
 Q3
 CR
 M3 shares @ 150; Nothing to see here
 ^
 !Type:Invst
 D1/1/2022
 NStkSplit
 PXYZ, INC
 YXYZ
 CR
 Q4
 M4 for 1 split
 ^
 
 Then I changed Q to 40 and while I end up with the correct balance 
 (GnuCash creates two transactions, one removing the original three shares, 
 and the second adding 12 shares), I have no idea if that is just luck or 
 if I’ve stumbled on new math :-)
 
 I’ll experiment some more.
 
 
> On Jan 5, 2023, at 14:02, David Reiser  wrote:
> 
> I’ve never used QIF for stock splits, but the obvious question is “Have 
> you tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced 
> to a single number).
> --
> Dave Reiser
> dbrei...@icloud.com
> 
> 
> 
> 
> 
>> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
>> 
>> I’ve searched considerably, but if I missed it, I apologize.
>> 
>> Docs for QIF say the Q field should contain the split ratio. I’ve tried 
>> various options, but I’m not getting the expected results after import.
>> 
>> !Type:Invst
>> D8/31/2020
>> NStkSplit
>> PAPPLE INC
>> YAAPL
>> CR
>> M4 for 1 split; 

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread john
gnc_numeric_create is a C function implemented in 
libgnucash/engine/gnc-numeric.cpp and made available to Scheme by SWIG which 
changes its name to gnc-numeric-create. It takes two int64_t arguments, 
numerator and denominator.

There's a general convention that public functions defined in Scheme are named 
gnc:foo. SWIG-wrapped functions have their same name in Scheme except that 
underscores are replaced with hyphens. Aside from the original xacc  camel-case 
functions we generally follow the Gnome practice of beginning C and C++ free 
functions with the gnc namespace followed by the class name, separated by 
underscores. With only seven exceptions if the name is like gnc-foo-bar then 
it's a wrapped C function while (with no exceptions) gnc:foo-bar is defined in 
Scheme.

Note that n/ is defined in qif-to-gnc.scm: (define (n/ a b) (gnc-numeric-div a 
b 0 GNC-DENOM-REDUCE)) and n* as (define (n* a b) (gnc-numeric-mul a b 0 
GNC-DENOM-REDUCE)).

So in normal arithmetic notation, out_shares = inshares * (split_ratio / 10).  
That code was added in 
https://github.com/Gnucash/gnucash/commit/00972f52311b3641c0bd4474334ff846501a3019#diff-fe1b1f57a35caf6ec4d0916b27f888c9bec88a4264248e4d1687d97cbabcc963
 with no explanation of why the provided split ratio should be divided by 10.

Regards,
John Ralls



> On Jan 5, 2023, at 6:05 PM, David Reiser via gnucash-user 
>  wrote:
> 
> bug, maybe?
> 
> import-export/qif-imp/qif-to-gnc.scm says:
> 
> ((stksplit)
> (let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
>(in-shares
> (xaccAccountGetBalance near-acct))
>(out-shares (n* in-shares splitratio)))
>   (xaccSplitSetAmount gnc-near-split out-shares)
>   (xaccSplitSetAmount gnc-far-split (n- in-shares))
>   (xaccSplitSetValue gnc-near-split (n- split-amt))
>   (xaccSplitSetValue gnc-far-split split-amt
> 
> 
> num-shares is the value of the qif Q line, so it looks like the entered split 
> ratio is being divided by 10. But I can’t find a definition of 
> gnc-numeric-create. And my scheme (well, LISP, in my case) is so rusty it 
> almost might be worse than not knowing it in the first place...
> --
> Dave Reiser
> dbrei...@icloud.com
> 
> 
> 
> 
> 
>> On Jan 5, 2023, at 6:13 PM, m...@tgr66.me wrote:
>> 
>> So, the ratio * 10 does seem to be working. :man_shrugging:
>> 
>> For example, if it is a 4 for 1 split, 40
>> If it is a 1 for 10 split, 1
>> 
>>> On Jan 5, 2023, at 14:17, m...@tgr66.me wrote:
>>> 
>>> Yes. I missed adding that to the list I’ve tried.
>>> 
>>> In the full work minimal example below, the share balance ends up at 1.2
>>> 
>>> !Account
>>> NAssets:Investments:Brokerage Account:Joint Brokerage
>>> TInvst
>>> ^
>>> !Type:Bank
>>> D01/11/2020
>>> NPayment/Deposit
>>> PTrf My Bank
>>> CX
>>> T1,000.00
>>> MDeposit
>>> LAssets:Current Assets:My Bank
>>> ^
>>> !Type:Invst
>>> D12/2/2021
>>> NBuy
>>> PXYZ, INC
>>> YXYZ
>>> I150
>>> T450
>>> Q3
>>> CR
>>> M3 shares @ 150; Nothing to see here
>>> ^
>>> !Type:Invst
>>> D1/1/2022
>>> NStkSplit
>>> PXYZ, INC
>>> YXYZ
>>> CR
>>> Q4
>>> M4 for 1 split
>>> ^
>>> 
>>> Then I changed Q to 40 and while I end up with the correct balance (GnuCash 
>>> creates two transactions, one removing the original three shares, and the 
>>> second adding 12 shares), I have no idea if that is just luck or if I’ve 
>>> stumbled on new math :-)
>>> 
>>> I’ll experiment some more.
>>> 
>>> 
 On Jan 5, 2023, at 14:02, David Reiser  wrote:
 
 I’ve never used QIF for stock splits, but the obvious question is “Have 
 you tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced 
 to a single number).
 --
 Dave Reiser
 dbrei...@icloud.com
 
 
 
 
 
> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
> 
> I’ve searched considerably, but if I missed it, I apologize.
> 
> Docs for QIF say the Q field should contain the split ratio. I’ve tried 
> various options, but I’m not getting the expected results after import.
> 
> !Type:Invst
> D8/31/2020
> NStkSplit
> PAPPLE INC
> YAAPL
> CR
> M4 for 1 split; 
> Q36 // Have also tried 4:1, 4/1 and simply 48
> ^
> 
> GnuCash 4.13 on macOS. I’ve not tried yet on my Linux box.
> 
> Thanks.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
 
>>> 
>>> ___
>>> gnucash-user mailing list
>>> gnucash-user@gnucash.org
>>> To update your subscription preferences or to unsubscribe:
>>> 

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread David Reiser via gnucash-user
bug, maybe?

import-export/qif-imp/qif-to-gnc.scm says:

((stksplit)
 (let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
(in-shares
 (xaccAccountGetBalance near-acct))
(out-shares (n* in-shares splitratio)))
   (xaccSplitSetAmount gnc-near-split out-shares)
   (xaccSplitSetAmount gnc-far-split (n- in-shares))
   (xaccSplitSetValue gnc-near-split (n- split-amt))
   (xaccSplitSetValue gnc-far-split split-amt


num-shares is the value of the qif Q line, so it looks like the entered split 
ratio is being divided by 10. But I can’t find a definition of 
gnc-numeric-create. And my scheme (well, LISP, in my case) is so rusty it 
almost might be worse than not knowing it in the first place...
--
Dave Reiser
dbrei...@icloud.com





> On Jan 5, 2023, at 6:13 PM, m...@tgr66.me wrote:
> 
> So, the ratio * 10 does seem to be working. :man_shrugging:
> 
> For example, if it is a 4 for 1 split, 40
> If it is a 1 for 10 split, 1
> 
>> On Jan 5, 2023, at 14:17, m...@tgr66.me wrote:
>> 
>> Yes. I missed adding that to the list I’ve tried.
>> 
>> In the full work minimal example below, the share balance ends up at 1.2
>> 
>> !Account
>> NAssets:Investments:Brokerage Account:Joint Brokerage
>> TInvst
>> ^
>> !Type:Bank
>> D01/11/2020
>> NPayment/Deposit
>> PTrf My Bank
>> CX
>> T1,000.00
>> MDeposit
>> LAssets:Current Assets:My Bank
>> ^
>> !Type:Invst
>> D12/2/2021
>> NBuy
>> PXYZ, INC
>> YXYZ
>> I150
>> T450
>> Q3
>> CR
>> M3 shares @ 150; Nothing to see here
>> ^
>> !Type:Invst
>> D1/1/2022
>> NStkSplit
>> PXYZ, INC
>> YXYZ
>> CR
>> Q4
>> M4 for 1 split
>> ^
>> 
>> Then I changed Q to 40 and while I end up with the correct balance (GnuCash 
>> creates two transactions, one removing the original three shares, and the 
>> second adding 12 shares), I have no idea if that is just luck or if I’ve 
>> stumbled on new math :-)
>> 
>> I’ll experiment some more.
>> 
>> 
>>> On Jan 5, 2023, at 14:02, David Reiser  wrote:
>>> 
>>> I’ve never used QIF for stock splits, but the obvious question is “Have you 
>>> tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced to a 
>>> single number).
>>> --
>>> Dave Reiser
>>> dbrei...@icloud.com
>>> 
>>> 
>>> 
>>> 
>>> 
 On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
 
 I’ve searched considerably, but if I missed it, I apologize.
 
 Docs for QIF say the Q field should contain the split ratio. I’ve tried 
 various options, but I’m not getting the expected results after import.
 
 !Type:Invst
 D8/31/2020
 NStkSplit
 PAPPLE INC
 YAAPL
 CR
 M4 for 1 split; 
 Q36 // Have also tried 4:1, 4/1 and simply 48
 ^
 
 GnuCash 4.13 on macOS. I’ve not tried yet on my Linux box.
 
 Thanks.
 ___
 gnucash-user mailing list
 gnucash-user@gnucash.org
 To update your subscription preferences or to unsubscribe:
 https://lists.gnucash.org/mailman/listinfo/gnucash-user
 -
 Please remember to CC this list on all your replies.
 You can do this by using Reply-To-List or Reply-All.
>>> 
>> 
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-05 Thread Ken Farley
When I was doing a bunch of Quicken conversions using QIF files, what 
happened was pretty much what you described here, I think. My original 
shares were removed in one transaction, while the split amount was added 
back. For example, 200 shares that needed at 2 for 1 resulted in a 200 
share removal with a subsequent 400 share addition. Maybe this is how 
Quicken handled splits "behind the scenes"?

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-05 Thread ml
So, the ratio * 10 does seem to be working. :man_shrugging:

For example, if it is a 4 for 1 split, 40
If it is a 1 for 10 split, 1

> On Jan 5, 2023, at 14:17, m...@tgr66.me wrote:
> 
> Yes. I missed adding that to the list I’ve tried.
> 
> In the full work minimal example below, the share balance ends up at 1.2
> 
> !Account
> NAssets:Investments:Brokerage Account:Joint Brokerage
> TInvst
> ^
> !Type:Bank
> D01/11/2020
> NPayment/Deposit
> PTrf My Bank
> CX
> T1,000.00
> MDeposit
> LAssets:Current Assets:My Bank
> ^
> !Type:Invst
> D12/2/2021
> NBuy
> PXYZ, INC
> YXYZ
> I150
> T450
> Q3
> CR
> M3 shares @ 150; Nothing to see here
> ^
> !Type:Invst
> D1/1/2022
> NStkSplit
> PXYZ, INC
> YXYZ
> CR
> Q4
> M4 for 1 split
> ^
> 
> Then I changed Q to 40 and while I end up with the correct balance (GnuCash 
> creates two transactions, one removing the original three shares, and the 
> second adding 12 shares), I have no idea if that is just luck or if I’ve 
> stumbled on new math :-)
> 
> I’ll experiment some more.
> 
> 
>> On Jan 5, 2023, at 14:02, David Reiser  wrote:
>> 
>> I’ve never used QIF for stock splits, but the obvious question is “Have you 
>> tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced to a 
>> single number).
>> --
>> Dave Reiser
>> dbrei...@icloud.com
>> 
>> 
>> 
>> 
>> 
>>> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
>>> 
>>> I’ve searched considerably, but if I missed it, I apologize.
>>> 
>>> Docs for QIF say the Q field should contain the split ratio. I’ve tried 
>>> various options, but I’m not getting the expected results after import.
>>> 
>>> !Type:Invst
>>> D8/31/2020
>>> NStkSplit
>>> PAPPLE INC
>>> YAAPL
>>> CR
>>> M4 for 1 split; 
>>> Q36 // Have also tried 4:1, 4/1 and simply 48
>>> ^
>>> 
>>> GnuCash 4.13 on macOS. I’ve not tried yet on my Linux box.
>>> 
>>> Thanks.
>>> ___
>>> gnucash-user mailing list
>>> gnucash-user@gnucash.org
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> -
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>> 
> 
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-05 Thread ml
Yes. I missed adding that to the list I’ve tried.

In the full work minimal example below, the share balance ends up at 1.2

!Account
NAssets:Investments:Brokerage Account:Joint Brokerage
TInvst
^
!Type:Bank
D01/11/2020
NPayment/Deposit
PTrf My Bank
CX
T1,000.00
MDeposit
LAssets:Current Assets:My Bank
^
!Type:Invst
D12/2/2021
NBuy
PXYZ, INC
YXYZ
I150
T450
Q3
CR
M3 shares @ 150; Nothing to see here
^
!Type:Invst
D1/1/2022
NStkSplit
PXYZ, INC
YXYZ
CR
Q4
M4 for 1 split
^

Then I changed Q to 40 and while I end up with the correct balance (GnuCash 
creates two transactions, one removing the original three shares, and the 
second adding 12 shares), I have no idea if that is just luck or if I’ve 
stumbled on new math :-)

I’ll experiment some more.


> On Jan 5, 2023, at 14:02, David Reiser  wrote:
> 
> I’ve never used QIF for stock splits, but the obvious question is “Have you 
> tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced to a 
> single number).
> --
> Dave Reiser
> dbrei...@icloud.com
> 
> 
> 
> 
> 
>> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
>> 
>> I’ve searched considerably, but if I missed it, I apologize.
>> 
>> Docs for QIF say the Q field should contain the split ratio. I’ve tried 
>> various options, but I’m not getting the expected results after import.
>> 
>> !Type:Invst
>> D8/31/2020
>> NStkSplit
>> PAPPLE INC
>> YAAPL
>> CR
>> M4 for 1 split; 
>> Q36 // Have also tried 4:1, 4/1 and simply 48
>> ^
>> 
>> GnuCash 4.13 on macOS. I’ve not tried yet on my Linux box.
>> 
>> Thanks.
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] QIF format for StkSplit

2023-01-05 Thread David Reiser via gnucash-user
I’ve never used QIF for stock splits, but the obvious question is “Have you 
tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced to a 
single number).
--
Dave Reiser
dbrei...@icloud.com





> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
> 
> I’ve searched considerably, but if I missed it, I apologize.
> 
> Docs for QIF say the Q field should contain the split ratio. I’ve tried 
> various options, but I’m not getting the expected results after import.
> 
> !Type:Invst
> D8/31/2020
> NStkSplit
> PAPPLE INC
> YAAPL
> CR
> M4 for 1 split; 
> Q36 // Have also tried 4:1, 4/1 and simply 48
> ^
> 
> GnuCash 4.13 on macOS. I’ve not tried yet on my Linux box.
> 
> Thanks.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.