What a steady buy would have done
simulate_dcaReplays a steady bitcoin buy on the real price history (daily closes — blockchain.info through Oct 29, 2026, then Coinbase — valued at the live Coinbase spot price). DCA means dollar-cost averaging: putting in the same amount on a set rhythm, no matter the price. Give an amount per buy in dollars and a rhythm (daily, weekly, or monthly), then either a span of 1, 3, or 5 years or an exact start date (an end date is optional; dates win if both are given); it returns how much would have gone in, how much bitcoin it would have bought, what that would be worth today, and the gain or loss against what went in, in dollars and percent. It also states how many buys there were, the first and last buy dates, the weekday the weekly buys land on, the average cost per bitcoin, and the day the price history ends (a buy scheduled after that day is priced at the last close). An optional fee_percentage takes that percent out of each buy before it buys; by default no fees are counted, and the answer says which. Today's value prints the shared spot quote with its UTC time, the same quote rainbow_today prints, so the two answers reconcile; two checks more than a minute apart can still differ a little. Shows the past only: it is not a prediction, not a promise, and not advice to buy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | How many years back the buys run: 1, 3, or 5. Give this or a start date. | |
| amount | Yes | Dollars put in on each buy, e.g. 50. | |
| end_date | No | The last day of the buys, like 2024-03-01. Defaults to today. | |
| frequency | No | How often the buy lands: daily, weekly, or monthly. Defaults to weekly. | |
| start_date | No | The first day of the buys, like 2021-03-01. Give this instead of years for an exact span. | |
| fee_percentage | No | Optional fee taken out of each buy, in percent, e.g. 1 means 1% of each buy never reaches bitcoin. Defaults to 0, which counts no fees. |