I’ve been using Beancount for over 8 years now, tracking everything from daily expenses to investment portfolios. Recently, I’ve been exploring something that’s completely changed my perspective on what’s possible with plain text accounting: time series forecasting using Python libraries like Prophet and statsmodels.
The Opportunity: Your Beancount Data Is a Gold Mine
Think about it: if you’ve been tracking your finances in Beancount for 2-3+ years, you have a structured, clean, historically accurate dataset that’s perfect for training machine learning models. While most people use Beancount for historical reporting and current balance tracking, the real untapped value is predictive analytics.
Prophet: Forecasting Made Accessible
I started with Prophet (Facebook’s forecasting library, latest version released January 2026). The beauty of Prophet is how it handles the messy realities of financial data:
- Automatic seasonality detection: It understands that your grocery spending follows weekly patterns and utility bills are monthly
- Holiday effects: No need to manually code that December always has higher spending
- Missing data tolerance: Gaps in your transaction history won’t break the model
Here’s the conceptual workflow I use:
- Export 3+ years of Beancount expense data aggregated monthly by category
- Convert to a pandas DataFrame with
ds(datestamp) andy(value) columns - Initialize Prophet model and fit to historical data:
model.fit(df) - Generate future predictions:
forecast = model.predict(future_dates)
The results are eye-opening. I can forecast my annual burn rate for FIRE planning with confidence intervals, predict upcoming irregular expenses (property tax, insurance renewals), and model different lifestyle scenarios.
Statsmodels: When You Need Statistical Rigor
For more stable time series without complex seasonality, I’ve also experimented with statsmodels’ ARIMA/SARIMA implementations. These classical statistical approaches are:
- Better for investment trend analysis: Portfolio value predictions with stable growth assumptions
- More interpretable: You can explain exactly what the model is doing
- Proven track record: Decades of research backing these methods
Some comparative studies show SARIMA can actually outperform Prophet for certain financial datasets, especially when your data exhibits predictable patterns without complex interactions.
Real-World Applications I’m Exploring
- FIRE Planning: Forecasting my annual spending trajectory accounting for lifestyle inflation trends
- Irregular Expense Prediction: Knowing when big expenses are likely (car maintenance, home repairs) even if they’re unpredictable
- Net Worth Trajectory: Modeling different savings rate scenarios to see retirement timeline impact
- Investment Rebalancing: Predicting when asset allocations will drift outside target ranges
The Plain Text Advantage
What makes Beancount special for this work is that the data export is trivial. No fighting with proprietary formats, no API rate limits, no vendor lock-in. Just parse your plain text ledger, aggregate as needed, and you’re ready for analysis.
The fact that smart_importer already uses scikit-learn for transaction categorization proves that Beancount + ML is a natural fit. We’re just scratching the surface of what’s possible.
Questions for the Community
- Who else is using ML forecasting with their Beancount data? What libraries have you tried?
- What forecasting use cases matter most to you? Cash flow prediction? Expense optimization? Investment planning?
- For the accountants here: Are your clients asking for predictive insights, or are they still focused on historical reporting?
I’m convinced this is where plain text accounting is heading. As advisory services become more valuable than compliance work in 2026, being able to provide clients with data-driven forecasts—backed by transparent, version-controlled models—is becoming a competitive differentiator.
Would love to hear your experiences, challenges, or questions about ML forecasting with Beancount data!