TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How you can track your personal finances using Python

140 pointsby siddhantalmost 4 years ago

18 comments

Waterluvianalmost 4 years ago
There’s so many ways to do personal finances but I found most of them to either be too tedious or require doing stupid things like letting third parties log into your bank account.<p>For me I simply had a spreadsheet with rows for each month and columns for each account: chequing, mortgage, RRSP, RESP, etc. I’d spend 10 mins a month logging in and typing out each balance. I’d chart the over-time trend and that’s all I needed to detect any changes in habit or ugly trajectories. 90% of what signal I needed with 10% of the effort.<p>If you don’t need to micromanage all your flavours of spending or other details, consider keeping it dead simple.
评论 #28420795 未加载
评论 #28420780 未加载
评论 #28421557 未加载
djhworldalmost 4 years ago
I&#x27;m not really sure about the python aspect in this article however I&#x27;ve been using beancount and Fava for nearly 3 years now and it&#x27;s one of my favourite pieces of software. Outside of installing it I&#x27;ve never had to really think about python.<p>All of my financial history is contained in a text file processed by beancount and long may it continue!<p>One thing I do wonder though is how well it scales, I&#x27;m a single man so tracking everything isn&#x27;t too much effort but if I had a partner it suddenly becomes at least 50% more things to track
评论 #28419993 未加载
darcys22almost 4 years ago
Shameless plug of my open source finance system. <a href="https:&#x2F;&#x2F;github.com&#x2F;darcys22&#x2F;godbledger" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;darcys22&#x2F;godbledger</a><p>I love these command line self hosted accounting software packages. But double entry bookkeeping was invented using ledgerbooks with ruled tables. I feel the plain text dataformats are a regression compared to a sql database. A general ledger just works so well with columns that you can sum.<p>It also saves you from needing a custom tool like bean-query to replicate sqlite-ish queries because it could have been in a database from the start
sockfishalmost 4 years ago
I struggled with the accounting concepts until I stumbled on this blogpost from Martin Kleppmann: <a href="https:&#x2F;&#x2F;martin.kleppmann.com&#x2F;2011&#x2F;03&#x2F;07&#x2F;accounting-for-computer-scientists.html" rel="nofollow">https:&#x2F;&#x2F;martin.kleppmann.com&#x2F;2011&#x2F;03&#x2F;07&#x2F;accounting-for-compu...</a>. After that I finally &#x27;got&#x27; the accounting graph, and I don&#x27;t care too much about the medium or the software anymore (its a google sheet in my case).
评论 #28422267 未加载
xupybdalmost 4 years ago
I used HLedger for years it was great. I thought I could do better with a paid solution. YNAB was awful and slow. So I switched to Lunch Money. It&#x27;s amazing fast and intuitive. Only it&#x27;s not a good fit for me. I&#x27;m trying to shoe horn my budgeting style into and it&#x27;s not working.<p>I use the envelope style. Every dollar is assigned a bucket when it comes in. All spending is done from a bucket and balances always persist. I don&#x27;t like monthly budget targets. I prefer to put money in a bucket when the money comes in.<p>I might move back to plain text accounting as it is so flexible. I will miss the amazing interface to Lunch Money. I also like supporting a small business like Lunch Money.
评论 #28420713 未加载
评论 #28420661 未加载
评论 #28421408 未加载
评论 #28420826 未加载
westurneralmost 4 years ago
&gt; <i>We take the output of the previous step, pipe everything over to our .beancount file, and &quot;balance&quot; transactions.</i><p>&gt; <i>Recall that the flow of money in double-entry accounting is represented using transactions involving at least two accounts. When you download CSVs from your bank, each line in that CSV represents money that&#x27;s either incoming or outgoing. That&#x27;s only one leg of a transaction (credit or debit). It&#x27;s up to us to provide the other leg.</i><p>&gt; <i>This act is called &quot;balancing&quot;.</i><p>Balance (accounting) <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Balance_(accounting)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Balance_(accounting)</a><p>Are unique record IDs necessary for this [financial] application? FWICS, <a href="https:&#x2F;&#x2F;plaintextaccounting.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;plaintextaccounting.org&#x2F;</a> just throws away the (probably per-institution) transaction IDs; like a non-reflexive logic that eschews Law of identity? Just grep and wc?<p>&gt; <i>What does the ledger look like?</i><p>&gt; <i>I wrote earlier that one of the main things that Beancount provides is a language specification for defining financial transactions in a plain-text format.</i><p>&gt; <i>What does this format look like? Here&#x27;s a quick example:</i><p><pre><code> option &quot;title&quot; &quot;Alice&quot; option &quot;operating_currency&quot; &quot;EUR&quot; ; Accounts 2021-01-01 open Assets:MyBank:Checking 2021-01-01 open Expenses:Rent 2021-01-01 * &quot;Landlord&quot; &quot;Thanks for the rent&quot; Assets:MyBank:Checking -1000.00 EUR Expenses:Rent 1000.00 EUR </code></pre> What does the `*` do?
评论 #28420779 未加载
SavantIdiotalmost 4 years ago
It&#x27;s funny that a register application is basically a trivial database, but it requires so much subtle UI&#x2F;UX that it is really hard to make something usable. I&#x27;ve been using Quicken for 30+ years and I&#x27;ve tried other software, including my own and open source, and nothing really comes close the the ease of what they&#x27;ve built.
trepannealmost 4 years ago
&lt;shameless plug&gt; If you&#x27;re using Python, and you want to import transaction&#x2F;balance data without handing over your passwords to some third party, you can try<p><a href="https:&#x2F;&#x2F;github.com&#x2F;csingley&#x2F;ofxtools" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;csingley&#x2F;ofxtools</a><p>&lt;&#x2F;shameless plug&gt;
评论 #28422319 未加载
mattbillensteinalmost 4 years ago
I find Google Sheets pretty hard to beat - you can get stock pricing data via the GOOGLEFINANCE function, and I have a simple script that does imap -&gt; sheets for bank and credit card balances. I&#x27;m able to keep an up to date view of my net worth without resorting to Mint&#x2F;Plaid et al. And you can generate whatever charts and graphs you like fairly easily - have access on your phone, etc.<p>For budgeting, I import csv from my bank&#x2F;credit cards into google sheets and tag transactions with ~20 different categories - I do this every month or two and it doesn&#x27;t take that long. It gives me a backwards view of my spending that I can use to influence future spending. I don&#x27;t run a hard budget really.
diibvalmost 4 years ago
hledger is another open-source CLI tool for accounting that works amazingly well for me. You can add transactions editing in plain text too and there is a basic web UI on top of it.
评论 #28420464 未加载
rmestersalmost 4 years ago
Regarding &quot;1. Download transactions from your bank&quot; - to avoid having to deal with PDFs, it&#x27;s possible to use account aggregators to fetch your own bank data in Python-friendly formats like JSON.<p>We have this feature at Nordigen (I&#x27;m the cofounder), where we allow developers to download their bank statements in JSON format from 1,000+ European banks (free): <a href="https:&#x2F;&#x2F;nordigen.com&#x2F;en&#x2F;blog&#x2F;download-your-bank-statement-json-format&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nordigen.com&#x2F;en&#x2F;blog&#x2F;download-your-bank-statement-js...</a>
评论 #28424839 未加载
评论 #28421047 未加载
candiddevmikealmost 4 years ago
If you want an open source self hosted budgeting solution, firefly is the most commonly recommended (<a href="https:&#x2F;&#x2F;www.firefly-iii.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.firefly-iii.org&#x2F;</a>). If you are looking for something supported&#x2F;less DIY and with features beyond budgeting, checkout Homechart (<a href="https:&#x2F;&#x2F;about.homechart.app" rel="nofollow">https:&#x2F;&#x2F;about.homechart.app</a>).
评论 #28422299 未加载
emrahalmost 4 years ago
I&#x27;m thinking about a PF app concept where you enter your own transactions manually, but you don&#x27;t have to keep track of everything down to the cent.<p>At the end of every month, banks send out statements so importing all transactions aren&#x27;t necessary to keep track of one&#x27;s overall financial standing.<p>Banks do make mistakes but extremely rarely that it&#x27;s not worth wanting to import all transactions in the off chance that you&#x27;ll catch a mistake. Retailers can make mistakes like double charge you but again those are rare and you can take a quick look at your statements to find them usually.<p>Keeping track of individual transactions are important to be able to figure out where the money is going in general but this doesn&#x27;t require keeping track of &#x27;every&#x27; transaction. Just the ones that make up the biggest percentage of the total money spent. They are usually easy to spot on the bank&#x2F;creditcard statements.<p>One doesn&#x27;t even have to be perfectly accurate to gain from inspecting statements either. You spent $834.56 for new tires? You can enter that as $850 and it&#x27;s fine.<p>Sure, there might be cases where the total is split more or less evenly across several small transactions and that can be handled similarly to the above.<p>Knowing where the money is going isn&#x27;t terribly useful actually unless there are a lot of frivolous spendings. It usually comes down to &quot;you are not making enough money&quot; or &quot;the lifestyle you desire is too expensive for your current income&quot;. No app can fix either of these, other than point out the obvious problem. Most personal finance blogs end up leaning towards &quot;how to earn more&quot; because that&#x27;s more important than keeping track of your transactions or budgeting.
评论 #28421187 未加载
vymaguealmost 4 years ago
I don&#x27;t think double-entry bookkeeping is such a common knowledge. Anyways, there are discussions and links trying to teach &quot;accounting for developers&quot; on <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23964513" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23964513</a><p>I personally find the topic difficult and comes with a lot of nonsensical jargons.
jmschlmrsalmost 4 years ago
I built <a href="https:&#x2F;&#x2F;mygraph.ca" rel="nofollow">https:&#x2F;&#x2F;mygraph.ca</a> as I was tired of Mint failing to sync with Canadian banks (and later dropped Mint anyway because of the security&#x2F;privacy concerns).<p>It’s not targeting technical users but it would be cool to add a SQL integration like Stripe Sigma, etc at some point.
评论 #28420748 未加载
carlivaralmost 4 years ago
This is really cool but I feel like it glosses over married accounting, which is a longer session of yelling things like &quot;Honey! What&#x27;s this PayPal for $117 3 weeks ago?!&quot;
aeoleonnalmost 4 years ago
a REST API such as: <a href="https:&#x2F;&#x2F;plaid.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;plaid.com&#x2F;</a>
评论 #28420400 未加载
partymoniousalmost 4 years ago
Sounds interesting, but it’s still a long way to beat the best finances tracking system, good ol’ Excel sheets.