investment report extension displays cash balance
I've been playing around with the investment report extension and have run into an issue that might be a bug?
I have numerous accounts that are displayed with a ticker/security = CASH with a non-zero cash balance. The actual investment accounts have a zero cash balance.
I tracked this down to a transaction in the account that are marked as Xfr to another investment account. The other side of the transaction is a BuyXfr. If I change the transaction into two separate transactions, then this fixes the problem. What is interesting is that there are other Xfr/BuyXfr transactions that do not affect the cash balance. I've looked to see if there is something different between the transactions and don't see any difference.
Any ideas on what might be happening?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by peter on 12 Jun, 2016 03:23 PM
I think this is a bug with the extension skipping over a split transaction for one of the investment accounts. I spent a little bit of time digging into the source and I suspect matching logic for the transaction isn't quite right. This issue is probably somewhere in void com.moneydance.modules.features.invextension.SecurityAccountWrapper.generateTransValues() and com.moneydance.modules.features.invextension.BulkSecInfo.getAssociatedAccount(AbstractTxn thisTxn). I still don't fully understand the object model used by Moneydance (I only started looking at this yesterday), so the issue might be obvious to someone who knows how this works better.
I disabled use of cash accounts to solve the problem. This works for me, since what I'm less concerned about cash balances and instead want an aggregate number of shares per investment spanning multiple accounts, which this extension does. I'm probably going to work on my own extension that displays investments based on asset allocation. I currently do this in a spreadsheet, but it would be nice to have equivalent functionality in Moneydance.
For this issue, the problem is if there's an Xfr transaction from one investment account to another investment account does not appear in the source investment account list of transactions.
This is easy to reproduce. Create two investment accounts, Account #1 and Account #2. I added an initial cash balance of $5000 in Account #1 and $0 in Account #2. Create a test security in Account #2. Then add a BuyXfr transaction for that security and transfer the funds from the Account #1 account. At this point, both accounts have a cash account balance of $0.
When I dump the transactions for both of the accounts in the extension, I see a BUY_XFER transaction type for Account #2 and no transactions for Account #1. Here's the ParentTxn log output for the transaction:
ParentTxn(bc3420cb-5385-495d-ba9c-683e4514c4ea): val=0; date=20160611; chk=; desc=; stat= ; acct=Investment #2;
SplitTxn: val=500000; amt=-500000; desc=; stat= ; cat=Investment #2:Test Security; tags=[(samt:500000)(acctid:f34350e8-03c9-46e7-8bce-b34380d44274)(invest.splittype:sec)(obj_type:)(id:71527100-f963-443b-88f8-0b652126b694)(pamt:-500000)(acct:5920620)(desc:)]; ]
SplitTxn: val=-500000; amt=500000; desc=; stat= ; cat=Investment #1; tags=[(samt:-500000)(acctid:93441a07-901f-4f9a-9f72-f932b66287df)(obj_type:)(invest.splittype:xfr)(id:1feccf26-4a45-45e5-a960-debc1dd68009)(pamt:500000)(acct:1912777)(desc:)]; ]
Here's the transaction details for this transaction:
0.acct: 5920620
0.acctid: f34350e8-03c9-46e7-8bce-b34380d44274
0.desc:
0.id: 71527100-f963-443b-88f8-0b652126b694
0.invest.splittype: sec
0.obj_type:
0.pamt: -500000
0.samt: 500000
1.acct: 1912777
1.acctid: 93441a07-901f-4f9a-9f72-f932b66287df
1.desc:
1.id: 1feccf26-4a45-45e5-a960-debc1dd68009
1.invest.splittype: xfr
1.obj_type:
1.pamt: 500000
1.samt: -500000
acct: 5573650
acctid: 1e1f605f-25af-46f1-8584-f620c24ae3fc
chk:
desc:
dt: 20160611
dtentered: 1465689163023
id: bc3420cb-5385-495d-ba9c-683e4514c4ea
memo:
obj_type: txn
oldid: -1
td: 20160611
ts: 1465689173892
xfer_type: xfrtp_buysellxfr
2 Posted by peter on 12 Jun, 2016 06:33 PM
I found the answer in the following thread, post #13: http://help.infinitekind.com/discussions/moneydance-development/1310-investment-portfolio-extensions
Looks like it's a known issue. Unfortunately this is the way the transactions are downloaded, so I'm not inclined to break them into two separate transactions.
System closed this discussion on 02 Oct, 2016 02:37 AM.