Skip to main content
Skip to main reading content
Buy the Average - Money Under the Hood Book 02
Money Under the Hood: Book 0214 min readUnabridged HTML Edition

Buy the Average

Dollar-cost averaging, turned into a simple investing system. Learn how fixed cash flow into variable share prices converts volatility into a volume-weighted discount engine.

PrefaceVolume Baseline

Before We Start: Imagine you have $12,000 ready to invest

Imagine you have $12,000 sitting in your checking account, ready to deploy.

You log into your brokerage account, open an index fund, and pause. The market hit a new all-time high last Thursday. Headlines warn of a coming slowdown. If you buy today, and the market drops 10% tomorrow, you will feel foolish.

So you decide to wait.

Two weeks pass. The market does not drop. It climbs another 2%. Now you feel even worse: if you buy now, you are paying more than you would have two weeks ago. If you wait, it might keep climbing away from you.

A month later, the market finally pulls back 4%. But now you hesitate again: What if this is the start of a much deeper collapse? Maybe I should wait until the dust settles.

Notice the trap: When prices are high, you are afraid of buying at the top. When prices are low, you are afraid of catching a falling knife. When prices are sideways, you are bored.

In every market state, discretionary decision-making produces hesitation. Waiting feels like a cautious, conservative decision. But in systems engineering terms, waiting is not a no-op: it is an unhedged bet on your own ability to predict the future.

This short book introduces a mechanical alternative: a simple rule that takes the prediction problem, disassembles it, and eliminates it entirely.

Chapter 01Execution Bottlenecks

The Timing Problem

Every investor faces the same fundamental reality: market prices are constantly moving. Every second the exchange is open, millions of participants with competing information, differing horizons, and conflicting objectives bid prices up and down.

To profit from market timing, you do not just have to make one good call. You must make a continuous sequence of interrelated predictions:

  • You must predict when a price is abnormally high and should not be bought.
  • You must predict when a price has hit bottom and will not fall further.
  • You must execute before the rest of the market acts on that same conclusion.
  • You must repeat this prediction cycle dozens of times over your career without failing once so severely that it wipes out your gains.

Decades of empirical finance data show that even full-time quantitative fund managers with millisecond data feeds and proprietary machine learning models fail to out-predict simple index averages consistently over 10-year horizons.

Deep Technical Derivation: Predictive Latency and Cognitive Drag▼

In systems engineering, polling an unpredictable external API with high jitter introduces latency and race conditions. Attempting to time market volatility is equivalent: an agent attempts to sample a non-stationary stochastic process (P_t = P_(t-1) + μ dt + σ dW_t) using delayed human cognitive processing.

The cognitive load of timing creates behavioral hysteresis: investors experience panic buying during blow-off tops and capitulation selling during trough drawdowns.

So we reframe the question from an engineering mindset:

“Instead of trying to predict price direction, can we design an execution invariant that produces sound results regardless of what price does next?”
Chapter 02Rule vs. Discretion

Meet Maya and Leo

Maya and Leo work as software engineers at the same company. They earn identical salaries, save identical amounts, and both decide to allocate $1,000 every month to their long-term index portfolios.

They agree on the destination, but their execution mechanisms could not be more different:

diff --git a/strategies/leo_discretionary.sys b/strategies/maya_automated.sys
- Leo: Discretionary Market Timing→+ Maya: Automated Invariant Rule
EXECUTION METRIC:Zero Decision Latency
@@ -1,6 +1,6 @@ Monthly Capital Deployment ($1,000/month) @@
const monthlyAllocation = $1,000; // Fixed monthly capacity
-- trigger: scan news sentiment, P/E multiples & macro forecasts
// 12 high-friction decisions / yr
-- condition: if (market_at_ath || sentiment == "FEAR") delay()
// Frequent unhedged cash drag
-- execution: discretionary order with manual hesitation
// Cognitive overhead & regret loop
++ trigger: automated cron job on 1st of month at 09:30 EST
// 0 decisions after setup
++ invariant: buy index units regardless of market headlines
// Continuous capital deployment
++ execution: volume-weighted harmonic unit accumulation
// Buys more units when price drops
Terminal Outcome Advantage:100% Invariant Compliance

Leo must solve a difficult math and psychology problem every 30 days. He reads macroeconomic forecasts, tracks inflation metrics, and debates whether this week is better than next week. Over 12 months, Leo makes 12 high-friction decisions, and spends hours managing anxiety.

Maya makes exactly one decision: she configures an automated bank transfer and scheduled buy order on the first business day of the month. She never checks whether the market is up or down on purchase day.

Who achieves a lower average purchase price? The answer lies in how a fixed dollar amount behaves when passed through fluctuating asset prices.

Chapter 03The Machine

The Simple Machine

Let us trace Maya’s machine through a four-month period of high volatility. Suppose Maya invests $500 each month. The index share price starts at $50, drops to $40, troughs at $25, and rebounds back to $50:

Predict Before You See ItIf the share price starts at $50, drops to $40, dips to $25, and rebounds back to $50, did Maya make money or break even?
Execution Schedule (4 Months)
$25
MonthPriceCapital DeployedShares Acquired
Month 1 (Base)$50.00$50010.0 shares
Month 2 (Correction)$40.00$50012.5 shares
Month 3 (Trough)$25.00$50020.0 shares (2x Volume!)
Month 4 (Rebound)$50.00$50010.0 shares
Total Invested$2000
Total Shares52.50
Ending Value (@$50)$2625
Net Gain+$625 (+31.3%)

The simple arithmetic average of the market prices was:

($50 + $40 + $25 + $50) ÷ 4 = $41.25 per share

Yet Maya’s volume-weighted average cost was:

$2000 total capital ÷ 52.50 shares = $38.10 per share

Maya paid $3.15 LESS per share than the average price of the market over that period!

Chapter 04The Fixed-Dollar Effect

The Fixed-Dollar Effect

Why did Maya pay $38.10 per share when the average market price was $41.25?

This is not market magic or luck. It is the direct consequence of the elementary formula that governs every purchase:

Execution Formula: The Fixed-Dollar Acquisition Rule
Mathematical Specification
Shares = Contribution ÷ Price
Contribution = $500 (constant parameter)
Price = $25 to $50 (dynamic market variable)

Click ▶ run to step through the terminal evaluation of this formula.

Because your monthly dollar contribution is held fixed, the number of shares acquired is inversely proportional to the price:

When prices rise, your fixed dollar amount buys fewer shares. When prices fall, your fixed dollar amount automatically buys more shares.

In mathematics, this weighting is known as the Harmonic Mean.

Mathematical Proof: The AM-HM Inequality Invariant▼

Let P = {p_1, p_2, ..., p_n} be the sequence of share prices across n execution periods. The simple arithmetic average of market prices is:

AM = (1/n) × ∑ p_i

Because a constant capital amount C is deployed at each period, the total shares acquired is ∑ (C / p_i). The investor’s volume-weighted average cost per share is:

HM = n × C ÷ ∑ (C / p_i) = n ÷ ∑ (1 / p_i)

By the classical Arithmetic-Harmonic Mean Inequality (a consequence of Jensen’s Inequality for convex functions f(x) = 1/x):

HM ≤ AM, with equality holding if and only if p_1 = p_2 = ... = p_n

As long as market prices experience any non-zero volatility, your effective average purchase price is mathematically guaranteed to be strictly lower than the simple average of market prices.

Chapter 05Drawdown Accumulation

What Happens When the Market Falls?

Most investors view market crashes with dread. When account balances drop by 20% or 30%, panic sets in. Discretionary investors halt their contributions, wait for stability, or sell at the bottom.

To Maya’s systematic accumulator machine, a market correction is something entirely different: it is a high-volume unit accumulation opportunity.

Interactive Unit Accumulator

Drawdown Purchasing Power & Unit Acceleration

Slide market drawdown depth to observe how fixed dollars mechanically acquire accelerated share volume.

Active Inflow$1,000/mo
-25.0% drop ($75.00/share)
0% (Peak: $100)-20% Correction-40% Bear Market-60% Deep Crash
Presets:
Share Price
$75.00
-25.0% below peak
Shares Acquired This Month
13.33 shares
vs. 10.00 shares at peak
Unit Volume Advantage
+33.3% shares
Automatic accumulation bonus
Relative Share Acquisition Volume:1.33× baseline volume

Fixed contribution ($1,000) held constant ÷ lowered price ($75.00) = +33.3% more shares stacked silently before recovery.

When the eventual recovery comes—whether it takes six months, two years, or three years—the portfolio does not merely recover its original value. It rebounds on top of a significantly larger base of accumulated shares.

Engineering Invariant: Asset Quality MattersDollar-cost averaging manages execution risk; it cannot fix solvency risk. If an individual speculative stock drops 95% into bankruptcy, buying more shares will not save you. Dollar-cost averaging is engineered for broad, diversified index funds that reflect the entire productive output of the economy.
Chapter 06Opportunity Drag

The Problem With Waiting

Leo believes that by waiting on the sidelines in cash, he is playing defense. He tells himself: “I will wait until there is a clear bottom, and then I will buy.”

Here is the paradox: bottoms are only visible in hindsight. When the market is at an actual cyclical bottom, the news is at its absolute worst. Corporate layoffs dominate headlines, earnings reports look dismal, and sentiment is universally bleak.

At the bottom, Leo does not feel brave. He feels terrified. He waits for “confirmation.” By the time confirmation arrives—six months later, after positive GDP data and upbeat analyst reports—the market has already rallied 25% off its lows.

Leo missed the entire rebound. Now prices are higher than when he started, and he is right back in the original trap: waiting for another pullback that might take years to materialize.

Chapter 07Behavioral Pipeline

DCA Is Part Mathematics, Part Behavior

It is tempting to analyze investing solely through differential equations, portfolio variance, and Sharpe ratios. But investing is conducted by human beings who experience fear, greed, regret, and peer pressure.

The true power of dollar-cost averaging is that it is a behavioral firewall:

HUMAN EMOTIONAL LOOPTHE SYSTEMATIC AUTOMATION OVERRIDE

The Discretionary Loop:

1. Fear of buying at high valuations

2. Fear of catching falling knives during drops

3. FOMO as prices rally without you

4. Regret, capitulation, and buying the next top

The Dollar-Cost Averaging Loop:

1. Paycheck arrives on scheduled day

2. Automated scheduled transfer executes

3. Index units purchased at market clearing price

4. Investor continues daily life without anxiety

By turning an active, emotionally draining decision into a scheduled cron job, you replace an unpredictable human feedback loop with a stable, predictable system.

Chapter 08Series Bridge

The Connection to Compounding

In Book 01, The Money Loop, we explored how compounding works:

Money → Return → Larger Balance → More Return

Compounding is the engine. But an engine cannot run without fuel. If you start your career with $1,000, waiting for compounding to turn that single $1,000 into financial independence will take half a century.

Dollar-cost averaging is the pipeline that continuously feeds fuel into the compounding engine. Every month, earned income from your career is converted into capital, injected into the working base, and put to work generating its own returns.

At first, your monthly contributions will dwarf your investment returns. If you have $10,000 invested and make 8% this year, your gains are $800. If you contribute $1,000 each month, you added $12,000 in new cash—far more than the market provided.

But this balance does not remain constant. Over time, something extraordinary happens.

Chapter 09System Milestone

The Compounding Crossover

As your recurring contributions stack up and compound, your working balance grows. Eventually, you cross a critical mathematical threshold:

The Compounding Crossover is the exact point where your annual investment returns equal or exceed your entire annual savings contribution.
Predict Before You See ItAt an annual rate of 8.0%, at what portfolio balance will investment growth generate exactly $12,000/year (matching your entire active annual savings of $1,000/month)?
Terminal Execution: Compounding Crossover Threshold
Mathematical Specification
V* = C_annual ÷ r
C_annual = $12,000/yr ($1,000/mo)
r = 8.0% annual rate (0.0800)

Click ▶ run to step through the terminal evaluation of this formula.

Consider what this means: At a balance of $150,000, an 8.0% return yields $12,000 in a single year. Your invested money is now working just as hard as you are saving.

Past this point, market returns become the primary driver of wealth growth, and your active contributions become secondary. The money loop has taken over.

Chapter 10Trade-off Analysis

DCA Isn’t Magic: Lump Sum vs. DCA

An honest engineering document must analyze trade-offs, not just sell benefits. Dollar-cost averaging is not a magic wand that guarantees outperformance in all environments.

Suppose you receive an unexpected windfall of $100,000 today from a bonus, an inheritance, or a stock grant. Should you dollar-cost average it over 12 months, or invest it all immediately as a lump sum?

diff --git a/capital/lump_sum.sys b/capital/dollar_cost_averaging.sys
- Strategy A: Lump Sum Deployment→+ Strategy B: Dollar-Cost Averaging
TRADE-OFF PROFILE:Drift Capture vs. Regret Minimization
@@ -1,6 +1,6 @@ Windfall Deployment Architecture ($100,000) @@
const allocationPool = $100000; // Windfall or capital lump
-- deployment: 100% deployed on Day 1 into target index
// Captures upward drift immediately (~68% historical win rate)
-- riskProfile: catastrophic regret if market crashes on Day 2
// High psychological vulnerability to panic selling
++ deployment: 1/12th deployed monthly across 12-month window
// Smooth ramp across price fluctuations
++ riskProfile: downside regret insurance via systematic discount engine
// Behavioral protection against market drawdowns
Terminal Outcome Advantage:Execution Resilience

Extensive research by Vanguard and academic finance shows that because markets rise more often than they fall, lump-sum investing outperforms dollar-cost averaging roughly 68% of the time over historical rolling 12-month periods.

Why, then, do we recommend dollar-cost averaging?

  1. Cash Flow Reality: Most people do not receive massive six-figure windfalls. They earn a salary paid bi-weekly or monthly. Investing your paycheck as it arrives is technically lump-sum investing of available cash flow—the optimal strategy!
  2. Regret Insurance: For someone holding a large lump sum, the mathematical premium of lump sum is small, but the behavioral penalty of buying right before a 40% crash is catastrophic: many panic and sell at the trough. DCA acts as behavioral insurance against worst-case regret.
Chapter 11System Invariants

What Should You Remember?

Before closing this volume, here are the five core operating principles of systematic investing:

01

A Rule Beats an Opinion

An automated execution rule eliminates the continuous cognitive load of asking "Is now a good time?" It removes prediction from the critical path.

02

Fixed Dollars Exploit Volatility

Because Shares = Contribution ÷ Price, fixed dollar amounts mechanically acquire fewer units when assets are expensive and more units when assets are on sale.

03

The Harmonic Mean Lowers Average Cost

Whenever prices fluctuate, your volume-weighted cost per share is strictly lower than the simple arithmetic average of market prices.

04

DCA Fuels the Compounding Engine

Compounding needs capital to work on. Scheduled payroll allocations provide the steady stream of fuel that accelerates the money loop.

05

The Crossover Changes Everything

At V* = C_annual / r (around $150,000 for a $1,000/mo contribution), investment growth matches your annual savings rate.

ConclusionClosing Reflection

One Last Thought

Investing is often portrayed as a high-stakes arena where the smartest person in the room wins by deciphering secret signals and predicting the next quarterly earnings report.

In reality, the most reliable investing systems are remarkably quiet. They look less like day-trading screens with flashing charts, and more like reliable plumbing or a well-architected background service.

You do not need to predict tomorrow when your system is engineered to work across every market condition.

Interactive ModelLive Simulation

Want to See the System in Action?

Adjust the parameters below to test your monthly savings capacity, simulate DCA vs. Lump Sum deployment across volatile market cycles, and calculate your exact compounding crossover horizon.

INTERACTIVE SYSTEM SIMULATOR

DCA Machine & Compounding Crossover Simulator

Simulate dollar-cost averaging through fluctuating market prices and observe when returns eclipse ongoing contributions.

$12,000
$0$60,000
$1,000/mo
$100$5,000
8.0% p.a.
2.0%15.0%
10 Years
3 yrs30 yrs
±15%
±5% (Low)±35% (High)
Systematic DCA Portfolio
$208,457

Deployed systematically across 120 monthly executions.

Lump Sum Baseline (Initial Cash)
$25,907

Full initial capital deployed on Day 1 at 8.0% annual return.

Total Capital Injected
$132,000

$12,000 cash + $12,000/yr ongoing fuel.

Compounding Crossover Point
$150,000

Reached around Year 8

HorizonTotal InjectedDCA PortfolioAnnual Return YieldStatus vs. Inflow
Year 1$24,000$24,899$1,992/yr (8.0%)Fuel dominant (17% of inflow)
Year 3$48,000$55,136$4,411/yr (8.0%)Fuel dominant (37% of inflow)
Year 5$72,000$90,601$7,248/yr (8.0%)Fuel dominant (60% of inflow)
Year 7$96,000$132,198$10,576/yr (8.0%)Fuel dominant (88% of inflow)
Year 9$120,000$180,986$14,479/yr (8.0%)Growth > Inflow
Year 10$132,000$208,457$16,677/yr (8.0%)Growth > Inflow

Mechanical takeaway: Dollar-cost averaging removes the requirement to guess market peaks or bottoms. Lower prices during volatile periods mechanically lower your average cost per share, building the working capital base until annual compounding gains exceed your active payroll contributions.

Series RoadmapBook 03

What’s Next?

In Book 01, you learned how returns generate returns (The Money Loop).

In Book 02, you learned how to systematically feed that loop using automated dollar-cost averaging without needing to time the market (Buy the Average).

In Book 03, we explore the protective architecture that keeps your portfolio alive through major economic shocks:

Money Under the Hood: Book 03Available Now

Fault Tolerant: How diversification protects your portfolio from a single point of failure.

How diversification protects your portfolio from a single point of failure. Explore the Zero Test, position-size scaling, damage containment, and the 30-stocks correlation trap.