Time Series Forecasting with Beancount Data: Using Prophet and Statsmodels for Financial Predictions

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:

  1. Export 3+ years of Beancount expense data aggregated monthly by category
  2. Convert to a pandas DataFrame with ds (datestamp) and y (value) columns
  3. Initialize Prophet model and fit to historical data: model.fit(df)
  4. 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

  1. FIRE Planning: Forecasting my annual spending trajectory accounting for lifestyle inflation trends
  2. Irregular Expense Prediction: Knowing when big expenses are likely (car maintenance, home repairs) even if they’re unpredictable
  3. Net Worth Trajectory: Modeling different savings rate scenarios to see retirement timeline impact
  4. 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

  1. Who else is using ML forecasting with their Beancount data? What libraries have you tried?
  2. What forecasting use cases matter most to you? Cash flow prediction? Expense optimization? Investment planning?
  3. 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!

This is a fascinating topic, and I’ve been thinking about it a lot from my CPA practice perspective. The demand for predictive insights from clients has absolutely skyrocketed in 2026—everyone wants to know what’s coming, not just what happened last quarter.

I explored Prophet about six months ago specifically for small business cash flow forecasting. The results were promising, but I want to share some real-world challenges I encountered that other accountants should know about:

The Data Quality Problem

Most of my clients simply don’t have enough historical data. Prophet and ARIMA work best with 2-3+ years of consistent data, but:

  • Many small businesses didn’t track finances rigorously until they started working with me
  • COVID-19 (2020-2021) created such dramatic disruptions that including that data actually hurts model accuracy
  • The 2023 inflation spike similarly breaks historical patterns

For clients with clean, multi-year Beancount data, the forecasting works beautifully. But that’s not most small businesses.

Seasonality Is Harder Than It Looks

You mentioned Prophet handles seasonality automatically, which is true—but seasonal businesses are still tricky. I have a client who does 60% of annual revenue in Q4 (holiday retail). Prophet correctly identifies the pattern, but small year-over-year variations in timing (like when Thanksgiving falls) can throw off predictions significantly.

The Conservative Forecasting Principle

As a CPA, I have to be extremely careful about how forecasts are presented. There’s a big difference between:

  • “Based on historical trends, we expect revenue of $X”
  • “Historical data suggests a range of $X-Y with Z% confidence”

We must under-promise. If I forecast aggressive growth and advise a client to hire based on those numbers, and then reality disappoints, that’s a liability issue. So while the models are exciting, I always emphasize the uncertainty and present conservative scenarios.

Regulatory Disclaimers Matter

Any CPA providing forecasting services needs proper engagement letters with clear disclaimers. The forecast isn’t a guarantee, and clients need to understand that. Some state boards have specific guidance on predictive services that accountants should review.

My Question for You

How do you handle outliers and economic shocks in your training data? Do you exclude COVID years? Do you manually adjust for known anomalies (like a one-time large expense)? Or do you let the model see everything and trust it to find the underlying patterns?

I’m genuinely excited about this direction for the profession—advisory work is where the future is—but we need to implement it responsibly. Would love to hear how others are navigating the technical and professional considerations.

I’m so excited to see this discussion! ML forecasting is exactly where I think plain text accounting shines, especially for small business advisory work. Let me share a recent client story that convinced me this is the future.

Case Study: Nonprofit Cash Flow Forecasting

I work with a mid-size nonprofit that depends on a mix of federal grants, foundation funding, and individual donations. Their cash flow is incredibly variable—big grant disbursements followed by months of modest donation trickle. The board was nervous about runway and kept asking: “When will we run out of cash if grant renewals are delayed?”

Traditional approaches weren’t cutting it:

  • Historical averages smoothed away the volatility they needed to understand
  • Excel scenario modeling was manual and time-consuming to update
  • Their previous accountant just said “you should maintain 6 months of reserves” without showing why

What I did: Exported 4 years of Beancount transaction data, used Prophet to forecast monthly cash inflows by funding source, and generated three scenarios (optimistic, baseline, conservative) with confidence intervals.

The result: We could show the board exactly when cash gaps were likely to occur under different funding scenarios. This wasn’t fear-mongering—it was data-driven planning. The board used the analysis to:

  1. Apply for a line of credit before they needed it (better terms)
  2. Adjust their reserve policy to be more sophisticated than a flat “6 months”
  3. Time their fundraising campaigns to fill predicted gaps

The model gave them agency instead of anxiety.

Why Plain Text + Python Matters for Consultants

Here’s what I love about combining Beancount with Python forecasting libraries:

Full Transparency: I can show clients the Python script. They can see exactly how the forecast is generated. No black box, no “trust the software.” For mission-driven nonprofits, this transparency builds confidence.

Version Control: The forecasting script lives in Git alongside their Beancount ledger. We can track how predictions change over time, audit our assumptions, and learn from forecast errors.

Client Ownership: They own their data and the model. If they stop working with me, they’re not locked into proprietary software. They can hire another consultant who understands Python, or even learn to run it themselves.

The Learning Curve (And Why It’s Worth It)

I’ll be honest: learning Python was intimidating. I’m a CPA, not a software engineer. But:

  • Prophet’s documentation is excellent for beginners. Their quickstart literally took me 30 minutes to adapt to real client data.
  • Statsmodels was harder, but for ARIMA I just focused on the basic use cases first. You don’t need to understand every statistical detail to provide value.
  • Jupyter notebooks are magic for consultants. I can write the analysis once, update the data each month, and regenerate forecasts in seconds. Then export to PDF for client reports.

My Question for the Group

What’s a good “starter project” for accountants who want to learn ML forecasting but feel overwhelmed? Should they:

  • Start with their own personal finances (lower stakes)?
  • Pick a single client with clean data?
  • Focus on one specific use case (like predicting quarterly tax payments)?

The Competitive Reality

I genuinely believe this: CPAs and consultants who can’t provide predictive insights are going to lose clients. The advisory market in 2026 is moving beyond “tell me what happened” to “help me prepare for what’s coming.”

Plain text accounting + Python forecasting gives us that capability while maintaining the transparency and ethics our profession demands. This is the future, and I’m grateful to learn from folks like finance_fred who are pioneering these approaches.

Looking forward to hearing more experiences and maybe even collaborating on some open-source forecasting tools for the Beancount community!