每一位交易者都有自己擅长或喜欢的交易策略和方法,但是不论哪种策略,胜率、盈亏比和交易频次是影响结果的最重要的三个因素。一般来说,交易频次越高,所对应的胜率和盈亏比都会出现不同程度的下降,而胜率和盈亏比的关系会受到持仓时间的影响,在短线尺度上二者可能存在某些负向关联,而在中长期尺度上,我们认为两者的关联度会随着持仓时间的增加出现减弱甚至某些正相关性。因此,相较于短线交易,中长期交易在胜率和盈亏比上会更具有优势。那在交易频次相对恒定的基础上,中长期交易者在5-10年的交易中大概能得到多大的收益那?
我们来模拟一个情景:一位BTC交易员Emo,初始本金100美元,交易在盈利情况下获利20~40%,亏损的情况下亏损10~20%,我们模拟他胜率在40%到90%之间变化, 在5-10年的时间内总共交易了10次,我们使用R语言对这种情景随机模拟1万次,我们来看一下结果。

从上面的结果,我们可以发现:
- 随着胜率的增加,我们最终出现的亏损的可能性逐渐降低;
- 在盈亏出现的可能性完全随机的情况下,如果胜率大于60%,我们最终大概率可以赚到钱;
- 两个人即便具有一样的平均胜率和盈亏比,他们的收益也会具有天壤之别,这个差别就是运气。
好的,现在让我们来换一个模拟条件,我们保持其它条件不变,而只是拉长交易员从事该项工作的时间,也就是通过增加时间来增多交易次数。我们将时间拉长到20年,假设该交易员总共交易了30笔,我们来看看结果。

从上面的结果,我们可以发现,如果我们在该前提下,长期从事该交易模式,大概率不会亏钱,而且回报是呈指数增长。
我门重新回到第一张图,我们发现,即便一个人的胜率达到80%,他依旧有概率会出现亏损,那这些人的资产在10次交易的过程中,到底经历了什么那?

从上图,我们可以很清晰的发现,这些资产没有明显增多的情况,大多发生所谓的“大赚大赔”和“小赚大赔”的情况下。
从这些模拟分析中,我得到了什么?
- 在胜率和盈亏比上多下功夫,剩下的交给时间;
- 避免频繁交易,换句话说,宁愿错过,不要过错;
- 要分仓,不要重仓一个标的,根据市场情况制定多个不同的计划(因为即便胜率一样,不同模拟情况下的结果也有天壤之别,这是运气,我们无法忽略它的存在)。
最后,我放上本次模拟所用到的R代码,如果你有兴趣可以资金尝试模拟,如果有别的看法和见解可以在下方评论,也可以来邮交流([email protected])。
# Load necessary libraries
library(ggplot2)
# Set initial conditions
initial_capital <- 100
win_probabilities <- c(0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
num_rounds <- 10
num_trials <- 10000
# Function to simulate the betting game with fluctuating win/loss percentages
simulate_game_fluctuating <- function(win_probability) {
results <- numeric(num_trials)
for (i in 1:num_trials) {
capital <- initial_capital
for (j in 1:num_rounds) {
win_return <- runif(1, 0.2, 0.4) # Win profit between 20% and 40%
loss_return <- -runif(1, 0.1, 0.20) # Loss percentage between 10% and 20%
if (runif(1) < win_probability) {
capital <- capital + capital * win_return
} else {
capital <- capital + capital * loss_return
}
}
results[i] <- capital
}
return(results)
}
# Perform simulations
simulation_results_fluctuating <- lapply(win_probabilities, simulate_game_fluctuating)
# Prepare data for plotting
plot_data_fluctuating <- data.frame(
WinProbability = rep(win_probabilities, each = num_trials),
FinalCapital = unlist(simulation_results_fluctuating)
)
# Plotting
ggplot(plot_data_fluctuating, aes(x = as.factor(WinProbability), y = FinalCapital)) +
geom_jitter(aes(color = ifelse(FinalCapital > 100, "red", "black")), width = 0.1, size = 1, alpha = 0.1) +
geom_violin(trim = FALSE, color = "blue",fill = NA) +
geom_hline(aes(yintercept = 100), linetype = 2) +
labs(title = "Density and Distribution of Final Capital",
x = "Win Probability",
y = "Final Capital") +
theme_bw() +
ylab("Final Capital (USD)")+
theme(legend.position = "none")
ggsave("WinProbability.png")
#Third Ploting
simulate_game_detailed <- function(win_probability) {
results <- list()
for (i in 1:num_trials) {
capital <- initial_capital
capital_each_round <- numeric(num_rounds)
for (j in 1:num_rounds) {
win_return <- runif(1, 0.10, 0.20) # Win profit between 10% and 20%
loss_return <- -runif(1, 0.05, 0.10) # Loss percentage between 5% and 10%
if (runif(1) < win_probability) {
capital <- capital + capital * win_return
} else {
capital <- capital + capital * loss_return
}
capital_each_round[j] <- capital
}
results[[i]] <- capital_each_round
}
return(results)
}
# 运行模拟
win_probability <- 0.8 # 例如,我们可以只看一个特定的胜率
simulation_results_detailed <- simulate_game_detailed(win_probability)
# 获取最终资本值
final_capitals <- sapply(simulation_results_detailed, function(x) x[length(x)])
# 找到最低的50次
lowest_50_indices <- order(final_capitals)[1:50]
# 提取这500次模拟
lowest_50_simulations <- simulation_results_detailed[lowest_50_indices]
# 绘制折线图
plot_data <- data.frame(Round = rep(1:num_rounds, 50),
Capital = unlist(lowest_50_simulations),
Simulation = rep(1:50, each = num_rounds))
ggplot(plot_data, aes(x = Round, y = Capital, group = Simulation)) +
geom_line(alpha = 0.3) +
labs(title = "Capital Change in the Lowest 50 Simulations",
x = "Round",
y = "Final Capital (USD)") +
theme_bw()