TL;DR: If you have a lump sum to invest into Bitcoin, buying now gives you more Bitcoin than DCA over the next couple of months. However most people should DCA, because it is mentally easier, or it fits better to your liquidity profile (monthly salary) or you enter the bitcoin space during overvaluation.Background: I came to the conclusion that my Bitcoin allocation is too low. As a result I have to sell shares to buy Bitcoin. So my question is, do I go all in now? Or do I cost average into Bitcoin over several months?
The first and last time I invested significant money (relative to my net worth) into Bitcoin was Nov. 2021 very close to the peak. Now after several years I broke even (not inflation adjusted). This time I want to make a better decision.I compared a lump sum investment vs. a DCA investment spread out over 2 to 12 months for every day since 16.07.2010.

The longer you spread out your Bitcoin investment the less Bitcoin you get. If you split your initinal investment into 2 equal monthly investments, you get 3% less Bitcoin on average. Spreading your investments out over 12 months makes gives you 25% less Bitcoin on average. The decision to DCA into Bitcoin is around 1/3 of the time better than a lump sum investment (32% for 12 months DCA).

If we only take data from 2015, DCA makes you miss out on less Bitcoin (18% instead of 25% for 12 months), while DCA remains a better decision than lump sum investment 31% of days.
This makes sence, since Bitcoin has a positive price trend vs. cash on average. The longer we wait to buy Bitcoin the higher Bitcoin's price trend increased. Waiting to buy Bitcoin is always a very dangerous game.
So when does DCA outperform?
We can see most of the time the curves are blow zero meaning most days DCA underperforms, but we have some time frames DCA looks like a better idea.

The more wie spread out our investment into Bitcoin, the more extreme our results become (bigger wins and bigger losses). DCA outperforms lump sum investment, when we start close to a peak, but underperforms otherwise.

We can plot our DCA outperformance vs. our position in the Bitcoin cycle. For undervaluation and moderate overvaluation it lump sum investment was better than DCA. For significant overvaluation the longer we spread out our Bitcoin buys in time the more successful we were in avoiding buying at the peak.

If we only look at data since 2015 the effect is smaller, but the decision is the same. For undervaluation and moderate overvaluation better buy Bitcoin as soon as possible (= lump sum, no DCA).
Currently we are at 0 overvaluation.

Since 2015 we can observe 12 month DCA buying 21% less bitcoin than lump sum investments. However on the time frame between 2 and 3 months DCA performed roughly as well as a lump sum investment.
Since DCA makes us buy Bitcoin later than buying at the first possibility, I would expect I'm missing out on the Bitcoin price trend with the proportion of cash not invested yet. This expectation is quantified in the column "expected DCA underperformance". We can see, the observed and the expected underperformance roughly match.
Since Bitcoin price currently is roughly equal to trend, I would expect to miss out on the Bitcoin price trend growth, if I would DCA instead of investing everything now. However the trend 2024-2025 is lower than the trend 2015-2024. Therefore the expected underperformance would between 2% (2 months) and 16% (12 months)
Conclusion: DCA can be useful, if the monthly Bitcoin buys matches your monthly liquidity surplus (salary minus food and rent). However if you already have some liquidity, which has to be invested into Bitcoin to reach optimal Bitcoin allocation, it is most cases optimal to buy Bitcoin as soon as liquidity is available. Spreading your buys out over several months is only optimal, if Bitcoin is significantly above trend. This this case, we should just wait until Bitcoin gets closer to trend again.