Sitemap
Kryptera

Kryptera

Quant Research Systems Builder Pine Script → Python/vectorbt Backtesting • Optimization • Research Dashboards

Member-only story

The Cash That Never Worked

Over 33 years and 2,000 alternate histories, spreading out the investment never once beat putting it all in on day one.

9 min read5 days ago

--

Press enter or click to view image in full size

Imagine two investors who start on the same day in January 1993, each holding 100,000.

The first investor does something that feels reckless. She puts every dollar into SPY on day one and then does nothing.

The second investor does something that feels wise. He splits his money into 406 equal pieces of 246.31 and buys one piece on the first trading day of each month. That takes him 33 years. He tells himself that this way he can never buy at the top.

Both of them are holding the same fund through the same history: the 1990s boom, the dot-com crash, the financial crisis, the COVID drop, and the recoveries after each. Only the timing of their purchases differs.

Python Full Code

import numpy as np
import pandas as pd
import yfinance as yf
import plotly.graph_objects as go
from plotly.subplots import make_subplots

# -------------------------
# Parameters
# -------------------------
SYMBOL = "SPY"
START_DATE = "1900-01-01" # Yahoo returns data from the first available day
END_DATE = None # None = up to the latest available day
TOTAL_CAPITAL =…

--

--

Kryptera
Kryptera

Written by Kryptera

Quant Research Systems Builder Pine Script → Python/vectorbt Backtesting • Optimization • Research Dashboards