Use Beancount to track your tradings

Trading Stocks using Beancount

Introduction Tracking your investments can easily become a mess of PDFs, spreadsheets, and inconsistent brokerage exports. If you’re already using Beancount to manage your personal finances, why not bring that same clarity and precision to your stock portfolio? Beancount isn’t just for daily finances—it’s a powerful tool for investment tracking. With its plain-text syntax and double-entry model, it gives you full control over cost basis, dividends, capital gains, and multi-currency holdings—without relying on a brokerage interface. It can easily become a central management tool for your investments. ...

Published: 2025-06-11 · Last updated: 2025-06-11 · 11 min · 2290 words · Yichu Zhou
Tracking U.S. Health Expenses with Beancount

Tracking U.S. Health Expenses with Beancount

Accounting for health-related expenses in the U.S. is slightly different from typical expense tracking because it usually involves insurance. In this post, we’ll walk through how to use Beancount to track your healthcare expenses in the U.S. How Healthcare System Work in US How healthcare system works In its simplest form, the healthcare system typically works as follows: You visit a healthcare provider who delivers medical services to you. The provider submits claims to your insurance company. The insurance company verifies the claims and pays a portion (or all, depending on your coverage). Once the claims are processed, the healthcare provider sends you a bill for the remaining amount. The insurance company also sends you an Explanation of Benefits (EOB), detailing how your medical claims were processed based on your plan. As a patient, there are two important documents you should pay attention to: ...

Published: 2025-05-13 · Last updated: 2025-05-13 · 3 min · 595 words · Yichu Zhou
Principles of Building Chart of Accounts in Beancount

Principles of Building Chart of Accounts in Beancount

One of the first steps to mastering Beancount is designing a clean, flexible, and future-proof Chart of Accounts (CoA). This structure defines how you categorize your financial life—and ultimately, how useful and insightful your reports will be. In this post, I’ll walk through the principles, pitfalls, and patterns I’ve learned while building my own CoA in Beancount. Principles I have been using Beancount for a few years. Over these years, I changed the CoA many times. I found that the following three high level principles can be a good starting point for designing your accounts structure: ...

Published: 2025-05-05 · Last updated: 2025-05-08 · 6 min · 1145 words · Yichu Zhou
Recording Retirement Accounts in Beancount

Tracking Retirement Accounts in Beancount

Introduction In the United States, retirement accounts are specialized investment vehicles designed to support long-term financial security during post-employment years. These accounts—primarily Individual Retirement Accounts (IRAs) and employer-sponsored plans such as 401(k)s—offer significant tax advantages to incentivize consistent saving. The Internal Revenue Service (IRS) sets and periodically adjusts contribution limits for these accounts to account for inflation. Given their unique regulatory and tax characteristics, retirement accounts differ from standard brokerage or investment accounts. When documenting them in Beancount, a plain-text double-entry accounting system, a structured approach is necessary to track both contributions and IRS-imposed limits. ...

Published: 2025-04-30 · Last updated: 2025-05-01 · 6 min · 1191 words · Yichu Zhou
Recording Real Estate In Beancount

Recording Real Estate in Beancount

Managing real estate investments involves tracking numerous financial activities, including property purchases, rental income, and eventual sales. This guide illustrates how to leverage Beancount, a plain-text double-entry accounting system, to accurately model real estate transactions. By structuring appropriate accounts for assets, liabilities, income, and expenses, readers will learn to document key financial events such as down payments, mortgage servicing, rent collection, and asset appreciation. Whether you’re an experienced investor or just beginning your property journey, this article offers a clear framework for maintaining transparent and comprehensive financial records. ...

Published: 2025-04-07 · Last updated: 2025-05-01 · 10 min · 2028 words · Yichu Zhou
Beancount Concepts

Beancount Concepts

Understanding the foundational principles of Beancount is essential for effective personal finance management. This post delves into the core concepts that underpin Beancount’s plain-text double-entry accounting system. You’ll explore how every transaction must be balanced, the five fundamental account types (Assets, Liabilities, Equity, Income, Expenses), and the role of commodities in tracking various assets. Additionally, the article introduces key financial statements like the balance sheet and income statement, illustrating how Beancount provides a clear and structured view of your financial health. Whether you’re new to Beancount or seeking to solidify your understanding, this guide offers a comprehensive overview of its conceptual framework. ...

Published: 2025-04-03 · Last updated: 2025-04-29 · 5 min · 983 words · Yichu Zhou
Beancount File Organization

Beancount File Organization

As your financial records grow, maintaining clarity and efficiency becomes paramount. This guide presents a structured approach to organizing your Beancount files, moving beyond a single, monolithic ledger. By categorizing accounts by type and segmenting transactions based on their nature and time frame, you can enhance readability, simplify maintenance, and facilitate future adjustments. Whether you’re dealing with daily expenses, income streams, or investment activities, this methodology offers a scalable framework to keep your financial data organized and accessible. ...

Published: 2025-04-02 · Last updated: 2025-04-29 · 8 min · 1553 words · Yichu Zhou
Beancount Syntax

Beancount Basics

In an age of overly complex personal finance tools, Beancount offers a refreshing alternative: a simple, transparent, and programmable plain-text accounting system. This post introduces the foundational concepts of Beancount, guiding you through setting up your first ledger, understanding its double-entry system, and visualizing your finances with Fava and advanced plugins. Whether you’re new to plaintext accounting or looking to deepen your understanding, this guide will help you get started with a modern, flexible approach to tracking your money. ...

Published: 2025-01-20 · Last updated: 2025-04-29 · 7 min · 1310 words · Yichu Zhou
Why Beancount

Why Beancount

In a landscape dominated by opaque financial tools and cloud-dependent apps, Beancount emerges as a refreshing alternative—a plain-text, open-source accounting system that prioritizes transparency, control, and extensibility. This post explores why Beancount stands out as a powerful solution for managing personal finances. You’ll discover how Beancount’s double-entry bookkeeping ensures accuracy, its plain-text format allows for version control and auditability, and its extensibility through Python scripting caters to complex financial scenarios. Whether you’re tracking daily expenses, investments, or rental income, this guide illustrates how Beancount can serve as the backbone of a robust, privacy-respecting financial system. ...

Published: 2025-01-01 · Last updated: 2025-04-29 · 3 min · 583 words · Yichu Zhou