tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/7516-net-worth-by-dayweekmonthyearInfinite Kind: Discussion 2022-11-30T20:00:20Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/555748522022-08-30T13:30:52Z2022-08-30T13:30:52ZNet worth by day/week/month/year<div><p>I am trying to obtain a summary report for account balances or net worth for each day last year so I can post process in excel. The data is there to produce the graphs & single date report but without copying the single report down 365 times this is not possible.</p>
<p>Can you help?</p>
<p>Thanks</p>
<p>James</p></div>James Howtttag:infinitekind.tenderapp.com,2009-01-14:Comment/555748522022-08-30T15:46:27Z2022-08-30T15:46:27ZNet worth by day/week/month/year<div><p>Look for Ric Werme‘s Networth Matrix script/extension. It may help. You should find links to it/him in this forum.</p>
<p>Ric? Can you help?</p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/555748522022-08-30T20:10:26Z2022-08-30T20:10:26ZNet worth by day/week/month/year<div><p>Thanks Stuart for keeping my hack in mind.</p>
<p>James, I have something that may be very close to what you want.</p>
<p>Check out all the discussion at <a href="https://infinitekind.tenderapp.com/discussions/general-questions/114244-how-to-export-data-from-net-worth-chart/">https://infinitekind.tenderapp.com/discussions/general-questions/11...</a></p>
<p>The data errors Jerry ran into are a substantial problem, but I can't reproduce them at home, I may have a smaller transaction database. I had to abandon that for a while to catch up on other stuff - I'm still working on other stuff, and will be for months.</p>
<p>It's still working fine for me for the monthly summaries I wanted.</p>
<p>I'd like to get back to it and revamp the code to <em>not</em> use some convenience routines. The result will be much faster and might avoid whatever weird stuff that is producing wrong data.</p>
<p>The program is very safe - it only reads from the database. Even my early code never damaged the database.</p>
<p>Play around with it if you'd like, I'd recommend only dumping a month's worth of daily data at first.</p></div>Ric Wermetag:infinitekind.tenderapp.com,2009-01-14:Comment/555748522022-08-31T19:51:06Z2022-08-31T19:51:06ZNet worth by day/week/month/year<div><p>So for what it's worth, this net worth calc has been on my to-do list for a while, and pretty much all my reporting in moneydance is run headless through python at this point. So I added a net worth calculation for any given set of dates to my existing <a href="https://github.com/dkfurrow/md_python_headless_demo">MD headless repo</a>, specifically a module <code>pyaccountrwapper.py</code> which has a <code>PyAccountrWapper</code> class to hold the data and do the calculations, and a demo using the included test dataset <a href="https://github.com/dkfurrow/md_python_headless_demo/blob/master/testmdheadless_net_worth.py">here.</a> I tested the output against our long-established <a href="https://github.com/dkfurrow/moneydance-investment-reports">investment reports</a> package for investment reports, and then manually tested balances for savings, checking accounts, etc, and it worked correctly. I tried it on my personal data as well, and it checked out. Not really surprising, as all I'm really doing is leveraging existing methods in the moneydance jar to get balances and prices for each account. Please note that in the PyAccountWrapper class, I'm assuming that all accounts to be valued are children of the root account, <em>unless the account is a security, which of course is a child of an investment account</em>. It wouldn't be all that difficult to modify the code to recurse into a more nested account structure, but I've never had that as my use case.</p>
<p>Anyway, that code is out there if you want to check it out--usual caveats, use at your own risk, <em>please back up up your data</em> before using this or any other script. The output looks like below.</p>
<p>Thanks,<br>
Dale</p>
<table>
<tr>
<th>date</th>
<th>parent_account</th>
<th>account</th>
<th>balance</th>
<th>price</th>
<th>total</th>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>Checking</td>
<td>CASH</td>
<td>6074.67</td>
<td>1</td>
<td>6074.67</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage1</td>
<td>CASH</td>
<td>12447.1</td>
<td>1</td>
<td>12447.1</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage1</td>
<td>Dell</td>
<td>800</td>
<td>14.69</td>
<td>11752</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage1</td>
<td>Vanguard S&P 500 Fund</td>
<td>172.214</td>
<td>94.84</td>
<td>16332.8</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage2</td>
<td>CASH</td>
<td>6822.86</td>
<td>1</td>
<td>6822.86</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage2</td>
<td>Financial Select Sector SPDR</td>
<td>217</td>
<td>14.44</td>
<td>3133.48</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage6</td>
<td>CASH</td>
<td>31305.2</td>
<td>1</td>
<td>31305.2</td>
</tr>
<tr>
<td>2009-08-24 00:00:00</td>
<td>StockBrokerage6</td>
<td>Dell</td>
<td>-472</td>
<td>14.69</td>
<td>-6933.68</td>
</tr>
</table></div>dalefurrow (Fellow User)