📌 連載:7月高配当株シリーズ Week 2/4 |
対象銘柄:日本駐車場開発株式会社(東証プライム:2353)
🗓️
売却想定日:2026年6月26日(株価248円)
🔗
先月の鈴木版:https://rpubs.com/tkubota0720/suzuki_6785_week2
先月の鈴木(6785)Week 2は、株価+61.3%という上昇局面で税引後トータルリターン+46.1%という結果でした。
今回は株価が下落した局面で、高配当がどこまで損失を吸収できるかを検証します。「高配当株の真骨頂」が問われる内容です。
# install.packages(c("quantmod","dplyr","ggplot2","scales","knitr","kableExtra"))
library(quantmod)
library(dplyr)
library(ggplot2)
library(scales)
library(knitr)
library(kableExtra)
# Mac用:日本語フォント設定
library(showtext)
font_add("HiraginoSans", "/System/Library/Fonts/ヒラギノ角ゴシック W3.ttc")
showtext_auto()💡 getSymbols() は Yahoo Finance
から株価を取得します。東証のティッカーは
「証券コード.T」
の形式です。先月の鈴木(“6785.T”)と同じパターンです。
## [1] "2353.T"
prices_xts <- Cl(`2353.T`)
# 休場日対応ヘルパー関数(先月の鈴木と同一設計)
get_close <- function(xts_obj, target_date) {
target <- as.Date(target_date)
for (i in 0:5) {
d <- target + i
key <- format(d, "%Y-%m-%d")
if (key %in% index(xts_obj)) {
val <- as.numeric(xts_obj[key])
if (!is.na(val)) {
if (i > 0) message("注: ", target_date, " は休場 → ", key, " の終値を使用")
return(list(price = val, date_used = as.Date(key)))
}
}
}
stop("株価を取得できませんでした: ", target_date)
}
# 購入日:2025年6月27日 / 売却日:2026年6月26日
buy_result <- get_close(prices_xts, "2025-06-27")
sell_result <- get_close(prices_xts, "2026-06-26")
price_buy <- buy_result$price
price_sell <- sell_result$price
date_buy <- buy_result$date_used
date_sell <- sell_result$date_used
cat(sprintf("購入日 (%s) 終値 : %s 円\n", date_buy, format(price_buy, big.mark=",")))## 購入日 (2025-06-27) 終値 : 248 円
## 売却日 (2026-06-26) 終値 : 246 円
## 株価変化率 : -0.8%
investment <- 1000000 # 投資元本(円)
fee_sell <- 0 # kabu.com:2026年5月18日以降 無料化
div_per_share <- 9 # 2025年7月期 期末配当(年1回のみ)
tax_div <- 0.20315 # 所得税15.315% + 住民税5%
tax_cap <- 0.20315📅 先月(鈴木)との配当構造の違い
鈴木:中間45円
+ 期末60円 = 年間105円(年2回)
日本駐車場開発:期末9円のみ(年1回・中間なし)
配当回数と金額の両面で大きく異なります。
💡 Rのポイント:手数料の動的判定
先月の鈴木では手数料を固定値(535円)で入力しましたが、今回は if /
else if
で約定代金に応じて自動判定します。株価・株数が変わっても正確な手数料が計算されます。
# Step 1: 仮試算
shares_trial <- floor(investment / price_buy / 100) * 100
cost_trial <- shares_trial * price_buy
# Step 2: kabu.com 手数料の動的判定
fee_buy <- if (cost_trial <= 500000) {
275 # ~50万円
} else if (cost_trial <= 1000000) {
535 # 50万超~100万円
} else {
round(cost_trial * 0.00099 + 99) # 100万円超(上限4,059円)
}
# Step 3: 手数料を引いた後の実際の購入株数
shares <- floor((investment - fee_buy) / price_buy / 100) * 100
cost <- shares * price_buy + fee_buy
cash <- investment - cost
cat(sprintf("仮試算(手数料なし): %s株 × %s円 = %s円\n",
format(shares_trial, big.mark=","),
format(price_buy, big.mark=","),
format(cost_trial, big.mark=",")))## 仮試算(手数料なし): 4,000株 × 248円 = 992,000円
## 適用手数料 : 535円
## 購入可能株数 : 4,000株(100株単位)
## 株式購入代金 : 992,000円
## 合計取得コスト : 992,535円
## 余剰現金 : 7,465円
div_gross <- shares * div_per_share
div_tax <- floor(div_gross * tax_div) # 源泉税は floor() で切り捨て
div_net <- div_gross - div_tax
cat(sprintf("▸ 期末配当(%d円/株)権利確定:2025年7月31日\n", div_per_share))## ▸ 期末配当(9円/株)権利確定:2025年7月31日
## 税引前 : 36,000円
## 源泉税 : 7,313円(20.315%)
## 税引後 : 28,687円
💡 Rのポイント:損失時の条件分岐
if
(capital_gain_gross > 0)
で正負を判定し、損失の場合は課税ゼロとします。損失は確定申告で損益通算の対象になります。
sell_gross <- shares * price_sell
capital_gain_gross <- sell_gross - cost
capital_gain_tax <- if (capital_gain_gross > 0) {
floor(capital_gain_gross * tax_cap)
} else {
0 # 損失のため課税なし
}
capital_gain_net <- capital_gain_gross - capital_gain_tax
cat(sprintf("売却代金(税前) : %s円\n", format(sell_gross, big.mark=",")))## 売却代金(税前) : 984,000円
## 取得コスト : 992,535円
## 譲渡損益(税前) : -8,535円
## ※損失のため譲渡益課税なし(損益通算の対象)
## 譲渡損益(税後) : -8,535円
total_net <- capital_gain_net + div_net
net_pct <- total_net / investment * 100
gross_pct <- (capital_gain_gross + div_gross) / investment * 100
coverage <- div_net / abs(capital_gain_gross) * 100
sum_df <- data.frame(
項目 = c(
"購入コスト(株式+手数料)",
"売却収入(手数料ゼロ)",
"配当(税引前)",
" うち源泉税",
" うち税引後手取り",
"譲渡損失(税引前)",
" (損失のため課税なし)",
" 譲渡損失(税後)",
"税引後トータル損益",
"税引後リターン(元本比)",
"配当による損失カバー率"
),
金額 = c(
paste0("▲ ", format(cost, big.mark=",")),
format(sell_gross, big.mark=","),
format(div_gross, big.mark=","),
paste0("▲ ", format(div_tax, big.mark=",")),
format(div_net, big.mark=","),
paste0("▲ ", format(abs(capital_gain_gross), big.mark=",")),
"0円",
paste0("▲ ", format(abs(capital_gain_net), big.mark=",")),
paste0("▲ ", format(abs(round(total_net)), big.mark=",")),
sprintf("%+.2f%%", net_pct),
sprintf("%.1f%%", coverage)
),
stringsAsFactors = FALSE
)
kable(sum_df, col.names = c("項目", "金額(円)"), align = "lr") |>
kable_styling(full_width = FALSE, position = "left") |>
row_spec(9:11, bold = TRUE, background = "#fdf3ec", color = "#b85c10")| 項目 | | 額(円)| |
|---|---|
| 購入コスト(株式+手数料) | ▲ 992,535| | |
| 売却収入(手数料ゼロ) | 984,00 |
| トータル損失 | ▲20,152 円 |
| リターン(元本比) | +2.02 % |
| 配当による損失カバー率 | 336.1 % |
| 税引前リターン(参考) | +2.75 % |
suzuki_net <- 460950
suzuki_net_pct <- 46.10
comp_df <- data.frame(
指標 = c("税引後損益", "税引後リターン", "株価変化率",
"配当回数", "配当手取り", "配当の役割"),
`日本駐車場開発` = c(
paste0("▲", format(abs(round(total_net)), big.mark=","), "円"),
sprintf("%+.2f%%", net_pct),
sprintf("%+.1f%%", (price_sell/price_buy-1)*100),
"1回(期末のみ)",
paste0(format(div_net, big.mark=","), "円"),
paste0("損失の", sprintf("%.1f", coverage), "%をカバー")
),
`鈴木 Week2(参考)` = c(
paste0("+", format(suzuki_net, big.mark=","), "円"),
sprintf("+%.2f%%", suzuki_net_pct),
"+61.3%",
"2回(中間+期末)",
"35,858円",
"リターンの7.8%を担う"
),
check.names = FALSE
)
kable(comp_df, align = "lrr") |>
kable_styling(full_width = FALSE, position = "left") |>
row_spec(1:2, bold = TRUE)| 指標 | | 日本駐車場開発| 鈴木 We | k2(参考)| |
|---|---|---|
| 税引後損益 | | ▲20,152円| | +460,950円| |
| 税引後リターン | | +2.02%| | +46.10%| |
| 株価変化率 | | -0.8%| | +61.3%| |
| 配当回数 | | 1回(期末のみ)| 2回(中間+ | 末)| |
| 配当手取り | | 28,687円| | 35,858円| |
| 配当の役割 | 損失の | 36.1%をカバー| リターンの7.8%を | う| |
🔗 先月の鈴木 Week2 の全コードはこちら:https://rpubs.com/tkubota0720/suzuki_6785_week2
events <- data.frame(
date = as.Date(c(format(date_buy), "2025-10-01", format(date_sell))),
label = c(
paste0("購入\n▲", format(cost, big.mark=","), "円"),
paste0("期末配当(税後)\n+", format(div_net, big.mark=","), "円"),
paste0("売却\n▲", format(abs(round(capital_gain_net)), big.mark=","), "円")
),
amount = c(-cost, div_net, capital_gain_net)
)
ggplot(events, aes(x = date, y = 0)) +
geom_hline(yintercept = 0, linewidth = 0.7, color = "#cccccc") +
geom_point(aes(color = amount > 0), size = 6) +
geom_text(aes(label = label,
vjust = ifelse(amount > 0, -0.6, 1.9)),
size = 3.3, lineheight = 1.3) +
scale_color_manual(values = c("TRUE" = "#1a6e3c", "FALSE" = "#c0381a"),
guide = "none") +
scale_x_date(date_labels = "%Y/%m", date_breaks = "3 months") +
labs(title = "インカムタイムライン:日本駐車場開発(2353)",
x = NULL, y = NULL) +
theme_minimal() +
theme(
plot.title = element_text(size = 13, face = "bold", color = "#1a1a2e"),
axis.text.y = element_blank(),
panel.grid = element_blank(),
axis.text.x = element_text(size = 9, color = "#6e7180"),
text = element_text(family = "HiraginoSans") # ← この1行を追加
)price_df <- data.frame(
date = as.Date(index(prices_xts)),
close = as.numeric(prices_xts)
) |> filter(!is.na(close))
div_date <- as.Date("2025-10-01")
# geom_ribbon の fill はベクトル指定不可 → 2層に分割
ggplot(price_df, aes(x = date, y = close)) +
geom_ribbon(aes(ymin = price_buy, ymax = pmax(close, price_buy)),
fill = "#dcf0e5", alpha = 0.55) +
geom_ribbon(aes(ymin = pmin(close, price_buy), ymax = price_buy),
fill = "#fde8e4", alpha = 0.55) +
geom_line(color = "#1a1a2e", linewidth = 0.85) +
geom_hline(yintercept = price_buy, linetype = "dashed",
color = "#c0381a", linewidth = 0.6) +
geom_hline(yintercept = price_sell, linetype = "dashed",
color = "#b85c10", linewidth = 0.6) +
geom_vline(xintercept = as.numeric(div_date),
linetype = "dotted", color = "#b8922a", linewidth = 0.7) +
annotate("text", x = date_buy,
y = price_buy * 1.025,
label = paste0("Buy ", price_buy, " JPY"),
hjust = 0, size = 3.2, color = "#c0381a") +
annotate("text", x = date_sell,
y = price_sell * 0.970,
label = paste0("Sell ", price_sell, " JPY"),
hjust = 1, size = 3.2, color = "#b85c10") +
annotate("text", x = div_date,
y = min(price_df$close, na.rm = TRUE) * 0.985,
label = "Div\n10/01",
size = 2.8, color = "#b8922a", vjust = 1) +
scale_y_continuous(labels = comma_format()) +
scale_x_date(date_labels = "%Y/%m", date_breaks = "2 months") +
labs(title = "Nippon Parking Development (2353) — Jun 2025 to Jun 2026",
x = NULL, y = "Close (JPY)",
caption = "Source: Yahoo Finance | dotted: dividend payment date (est.)") +
theme_minimal() +
theme(
plot.title = element_text(size = 12, face = "bold", color = "#1a1a2e"),
plot.caption = element_text(size = 8, color = "#aaaaaa"),
axis.text = element_text(size = 9, color = "#6e7180"),
panel.grid.minor = element_blank()
)売却タイミングによって結果がどれだけ変わるかを整理します。
sens_df <- data.frame(
売却価格 = c(253, 248),
売却日 = c("6月19日(前回)", "6月26日(今回)"),
株価変化率 = c("-6.3%", "-8.1%"),
譲渡損失 = c("▲63,435円", "▲81,935円"),
税引後損失 = c("▲36,899円", "▲55,399円"),
リターン = c("-3.69%", "-5.54%"),
カバー率 = c("41.8%", "32.4%")
)
kable(sens_df, align = "lllrrrr") |>
kable_styling(full_width = FALSE, position = "left") |>
row_spec(2, bold = TRUE, background = "#fdf3ec", color = "#b85c10")| 売却価格 |売却日 | |株価変化率 | 譲渡損失| 税引後 | 失| リターン| カ | ー率| | ||
|---|---|---|---|---|---|---|
| 253 | 6月19日(前回) |-6.3% |
▲63,
|
⚠️ 1週間で5円下落の影響
248円(6/26)vs
253円(6/19)の差はわずか5円ですが、3,700株では差額18,500円になります。高株数銘柄では「いつ売るか」の影響が増幅されます。
loss_amount <- abs(capital_gain_gross)
tax_saved <- floor(loss_amount * tax_cap)
benefit_df <- data.frame(
項目 = c("譲渡損失(税前)",
"損益通算による最大節税効果",
"損失+配当の実質負担"),
金額 = c(
paste0("▲", format(loss_amount, big.mark=","), "円"),
paste0("+", format(tax_saved, big.mark=","), "円(他の利益20.315%分)"),
paste0("▲", format(loss_amount - tax_saved - div_net, big.mark=","), "円")
)
)
kable(benefit_df, col.names = c("項目", "金額"), align = "lr") |>
kable_styling(full_width = FALSE, position = "left") |>
row_spec(2, bold = TRUE, background = "#f0faf4", color = "#1a6e3c")| 項目 | | 金額| |
|---|---|
| 譲渡損失(税前) | | ▲8,535円| |
| 損益通算による最大節税効果 | +1,733円(他の利 | 20.315%分)| |
| 損失+配当の実質負担 | | ▲-21,885円| |
decomp_df <- data.frame(
区分 = c("キャピタル損失(税後)", "配当(税後)", "合計"),
金額 = c(capital_gain_net, div_net, round(total_net)),
`元本比(%)` = c(
capital_gain_net / investment * 100,
div_net / investment * 100,
net_pct
),
check.names = FALSE
)
kable(decomp_df,
col.names = c("区分", "金額(円)", "元本比(%)"),
digits = 2,
format.args = list(big.mark = ","),
align = "lrr") |>
kable_styling(full_width = FALSE, position = "left") |>
row_spec(3, bold = TRUE, background = "#fdf3ec", color = "#b85c10")| 区分 | | 額(円)| 元本比(% | |
|---|---|---|
| キャピタル損失(税後) | -8,53 |
-0.
|
## R version 4.4.3 (2025-02-28)
## Platform: aarch64-apple-darwin20
## Running under: macOS 26.3.1
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## time zone: Asia/Tokyo
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] showtext_0.9-8 showtextdb_3.0 sysfonts_0.8.9 kableExtra_1.4.0
## [5] knitr_1.49 scales_1.3.0 ggplot2_3.5.2 dplyr_1.1.4
## [9] quantmod_0.4.26 TTR_0.24.4 xts_0.14.1 zoo_1.8-12
##
## loaded via a namespace (and not attached):
## [1] sass_0.4.9 generics_0.1.4 xml2_1.3.6 stringi_1.8.7
## [5] lattice_0.22-6 digest_0.6.37 magrittr_2.0.3 evaluate_1.0.1
## [9] grid_4.4.3 fastmap_1.2.0 jsonlite_2.0.0 viridisLite_0.4.2
## [13] jquerylib_0.1.4 cli_3.6.5 rlang_1.1.6 munsell_0.5.1
## [17] withr_3.0.2 cachem_1.1.0 yaml_2.3.10 tools_4.4.3
## [21] colorspace_2.1-1 curl_6.2.3 vctrs_0.6.5 R6_2.6.1
## [25] lifecycle_1.0.4 stringr_1.5.1 pkgconfig_2.0.3 pillar_1.10.2
## [29] bslib_0.8.0 gtable_0.3.6 glue_1.8.0 systemfonts_1.1.0
## [33] xfun_0.49 tibble_3.2.1 tidyselect_1.2.1 rstudioapi_0.17.1
## [37] farver_2.1.2 htmltools_0.5.8.1 rmarkdown_2.29 svglite_2.1.3
## [41] labeling_0.4.3 compiler_4.4.3
【免責事項】 本記事は情報提供を目的としたものであり、特定の銘柄への投資を推奨するものではありません。投資判断はご自身の責任において行ってください。株式投資には元本割れのリスクがあります。将来の運用成果を保証するものではありません。
連載:7月高配当株シリーズ | Week 2/4 | 高配当株ラボ