一括投資はドルコスト平均法に勝る
結論
「発生確率の高い利益を捨てる対価を払ってでも、発生確率の低い最大損失を極力出さないことを優先する」ならドルコスト平均法が合理的
そうでない場合一括投資せよ
もっと真面目にやるなら過去のデータから安定分布のパラメーターを持ってこないといけない
シミュレーション条件
一括投資:1000万円
ドルコスト平均法:10万円 x 100ヶ月
株価
平均月次リターン0.4%
月次リターンの標準偏差3%
投資期間:20年間
収益率はこんな感じ(注意:実行が別なので、上のグラフとは全く違う)
収益率試行回 | 一括投資 (%) | ドルコスト平均法 (%) |
1 | 147.36 | 110.49 |
2 | 69.49 | 56.03 |
3 | 140.73 | 175.42 |
4 | 203.56 | 155.43 |
5 | 36.90 | 16.04 |
6 | 59.42 | 54.07 |
7 | 16.12 | -13.23 |
8 | 75.46 | 58.74 |
9 | 83.91 | 49.79 |
10 | 214.62 | 192.96 |
これは10回だけど100回やっても同じだろう(気になる人はシミュレーションを回せば良い)
他の人のシミュレーション
> @nishio: 元々は「分散投資を行う場合に、数量を等分割して購入するよりも費用(コスト)を等分割した方が(相加平均より調和平均が小さいという意味で)良い」っていうシンプルな話だったと思うのだが、なぜか分割投資を進める言説に流用されて、改めてそれを否定する流れになってるみたい。難儀だな…
市場が緩やかに成長していることを前提にすると、ドルコスト平均法のほうが運用されている期間が短くなるので元本割れリスクが高まる
15年一括で負ける確率は2.9%
ただしこのデータの欠点も考察している
独立じゃない



figure.py
# Adjusting the figure with larger margins
fig, axes = plt.subplots(2, 5, figsize=[24, 12], sharex=True)
fig.suptitle('20-Year Investment Performance Comparison with Stock Price Fluctuations (10 Simulations)', fontsize=16)
fig.subplots_adjust(wspace=0.3, hspace=0.3) # Adjusting the margins
# Running the simulation 10 times and plotting
for run in range(10):
# Random returns for this run
random_returns = np.random.normal(average_monthly_return, monthly_std_dev, months)
stock_price = [100] # Starting stock price
for i in range(months):
stock_price.append(stock_price[-1] * (1 + random_returns[i]))
# One-time investment simulation
one_time_investment_rw = [initial_investment]
for i in range(months):
one_time_investment_rw.append(one_time_investment_rw[-1] * (1 + random_returns[i]))
# Dollar-cost averaging simulation
dollar_cost_averaging_rw = [0]
for i in range(months):
investment = dollar_cost_averaging_rw[-1] * (1 + random_returns[i])
if i < 100: # First 100 months, 100,000 JPY investment each
investment += monthly_investment
dollar_cost_averaging_rw.append(investment)
# Plotting on the corresponding subplot
row = run // 5
col = run % 5
ax2 = axes[row, col].twinx()
axes[row, col].plot(one_time_investment_rw, label="One-time Investment (10 million JPY)")
axes[row, col].plot(dollar_cost_averaging_rw, label="Dollar-Cost Averaging (100k JPY/month, 100 months)")
ax2.plot(stock_price, label="Stock Price Fluctuations", color="gray", linestyle="--")
axes[row, col].set_title(f'Simulation {run + 1}')
axes[row, col].grid(True)
if run == 0:
axes[row, col].legend(loc="upper left")
ax2.legend(loc="upper right")
plt.xlabel('Month')
axes[0, 0].set_ylabel('Investment Value (JPY)')
ax2.set_ylabel('Stock Price')
plt.show()
収益率試行回 | 一括投資 (%) | ドルコスト平均法 (%) |
1 | 147.36 | 110.49 |
2 | 69.49 | 56.03 |
3 | 140.73 | 175.42 |
4 | 203.56 | 155.43 |
5 | 36.90 | 16.04 |
6 | 59.42 | 54.07 |
7 | 16.12 | -13.23 |
8 | 75.46 | 58.74 |
9 | 83.91 | 49.79 |
10 | 214.62 | 192.96 |
py# Full code for 10 simulations of one-time investment vs dollar-cost averaging
# Parameters
initial_investment = 10000000 # 1000万円
monthly_investment = 100000 # 10万円
average_monthly_return = 0.004 # 平均的な月次リターン0.4%
monthly_std_dev = 0.03 # 月次リターンの標準偏差3%
months = 20 * 12 # 20年間
# Running the simulation 10 times
returns_table_10_runs = []
for run in range(10):
# Random returns for this run
random_returns = np.random.normal(average_monthly_return, monthly_std_dev, months)
# One-time investment simulation
one_time_investment_rw = [initial_investment]
for i in range(months):
one_time_investment_rw.append(one_time_investment_rw[-1] * (1 + random_returns[i]))
# Dollar-cost averaging simulation
dollar_cost_averaging_rw = [0]
for i in range(months):
investment = dollar_cost_averaging_rw[-1] * (1 + random_returns[i])
if i < 100: # 最初の100ヶ月で10万円ずつ投資
investment += monthly_investment
dollar_cost_averaging_rw.append(investment)
# Calculating returns
final_return_one_time = (one_time_investment_rw[-1] - initial_investment) / initial_investment * 100
final_return_dollar_cost = (dollar_cost_averaging_rw[-1] - (monthly_investment * 100)) / (monthly_investment * 100) * 100
returns_table_10_runs.append([final_return_one_time, final_return_dollar_cost])
# Creating a DataFrame
returns_df_10_runs = pd.DataFrame(returns_table_10_runs, columns=["一括投資の収益率 (%)", "ドルコスト平均法の収益率 (%)"])
returns_df_10_runs