如果你是走路,随机开始下雨, 你会考虑携带的雨伞明天? 当然,你会.
请问这样的反问,原因是当人们观察一个行为, 他们作出相应的反应. 如果他们希望的东西可能再次发生, 他们改变他们的行为,以适应在结果的变化.
当你想想外汇机器人, 每个人都有开发的作品永远战略的梦境. 它无需改变. 初始设置始终工作. 打开它,并移动到海滩.
现实, 当然, 比这更复杂.
这导致你需要做的期望时,你的策略不可避免地就会出差错. It’s very possible that you come up with a strategy that works and does amazingly well on the current market. 然而, a past genius doesn’t mean future genius. There’s always the chance that your strategy will no longer work in the future.
这是为什么? It’s the same reason that you might carry an umbrella tomorrow if it rains today. 人们观察市场表现一致的方式. 随着越来越多的人使观察, 人们开始交易就可以了. 市场响应这些变化, 并最终有机会彻底洗了,因为太多人耳它.
向前走测试是确定你的战略是否已淘汰的过程. 通过测试在一组数据, 然后测试它盲目集, 你可以给自己的战略是否是坏的或不是指示. The goal of walk forward isn’t to prove that your strategy is good. It’s to prove that your strategy is not known to be bad.
向前走测试的过程非常简单. 你确定你要使用你的测试一组信息,并 优化. 用一个真实的例子, right now it’s the beginning of 2014. 因此,也许你想看看,并从测试数据 2011 通过 2012. 这将是你的样本数据, 然后你出的样本数据可能是所有的 2013.
为了进行步行向前测试, 您将测试和分析你的策略 2011-2012. 然后, to determine if it’s “不知道是坏”, 你再向前走,以 2103 看到审核业绩.
What you’ve done is a blind test. You didn’t know what how the strategy would perform in 2013 当您在测试它 2011-2012. 通过将它放在一个盲样, 你给它机会失败.
The reason so many traders put their faith in walk forward testing is because it’s the absolute best tool to identify weaknesses in your optimization. When you’re testing a strategy, it is very likely that you’ve overfit to past opportunities.
自反馈循环在当前的市场
让我给你举个例子. 在当前的市场上, 很多交易商都已经 黄金撞 在市场开放的地方,每天在市场开放。, 他们出售尽可能多的黄金,因为他们可能可以. Sometimes it’s several multiples of the annual production in a span of a few minutes. 你看到的是一个绝对的自由下落五到十分钟. 这种状态持续了好几天的时间. But that doesn’t last forever. 当足够的交易商开始看到人们对开放式爆炸黄金, 他们开始做同样的事情.
有效, 谁想黄金衰减区市场上的开放式教其他贸易商做贸易对他们. 正如人们预期金价回落在前五分钟开放, 然后他们改变自己的行为. 一些试图跳上敲打开放,做空.
别人开始修改自己的行为. 他们发现,黄金自由落下了五分钟. 然后, 突然停止, 超过喜欢它回复到均值. They’ll start changing their tack and buying after so many minutes have elapsed from the open. 他们期待着与此前销售放量将最终恢复正常. 随着人们改变他们的行为, 其他人回应实物.
如果有足够多的人开始卖就开,然后购买就开五分钟后,, 你可以看到一个模式正在形成,其中一人回应他人的行为. It’s a self feedback loop where the state that was working for the first couple of days no longer works in the future.
如果你能找出一种策略,是能够生存的条件, and is able to survive conditions where you didn’t do any testing and optimization, 你给成功的未来的自己更好的赔率. It means that not very many traders have clued into this trading opportunity that you’ve discovered.
该方法向前走测试是解药被称为问题 曲线拟合. 曲线拟合是最终的woulda本应该早该策略. It’s akin to opening a chart from yesterday and saying I would’ve bought here and I would’ve sold here, 已经知道什么蒸发了.
Of course you’re going to “赚钱” 在这种情况下. 你知道什么市场做了完善的信息. 在未来, you don’t know the perfect information. 策略的目标是处理这种模糊.
Curve fitting means that you’ve fit everything so perfectly to past market conditions that when new situations inevitably arise, 排序类似的短语, “history doesn’t repeat itself, 但是这口诀,” 你的策略做同样的事情.
你想有一个战略上表现不错,过去的表现, but you’re not coming up with a strategy to make money on historical markets. 制定战略的目的是为了赚钱的未来市场. When you’re backtesting, you’re trying to strike the balance between solid historical performance and, 最重要的, 确保了历史知识外推到未来业绩. 你的目标是赚钱.
滚动向前走优化
滚滚向前走的优化需要的是向前走的想法,并不断将其暴露于新的数据提高了战略. So let’s say that you have a twenty four month sample period. 去了解这将是优化你的策略,为期两个月的方法之一, 然后向前行走到第三个月. 你观察的行为和你重新优化为在第二和第三个月, 然后步行向前到第四个月.
通过这样不断做, 你消除战略的衰减时间,并给它一个机会,以适应目前的市场状况. 这是排序的红头发的继子女的机器学习. 经验和亏损给出的策略的机会提高,并通过步行前进的优化调整以适应市场变化.
…你消除战略的衰减时间,并给它一个机会,以适应目前的市场状况
散步着分析的另一个重要的考虑因素是 自由度 在一个系统内. 例如, let’s say that you are analyzing a moving averaage cross. You’re using two moving averages and use a fixed stoploss and take profit. 这将使你们四个自由度. 的快速移动平均值是所述第一度. 慢速移动平均线是第二度. 第三是止损和第四个是拿利润.
更多的自由度,你可以在一个系统大大增加了机会0F曲线拟合你的系统的历史数据. 绝对最好的系统保持12度的自由或更小的. 你想找到有大量交易,并且提供的性能,你觉得满意的交易机会.
在您的优化要考虑的另一个因素是你在优化. 大多数人专注于绝对回报. 回报是巨大的, 但多数交易商关心更多关于 怎么样 他们让自己的钱,而不是 多少. 让我给你举个例子. 如果我有一个系统,使得 $25,000 去年, 你会希望它? 几乎所有人都认为是.
如果我有一个系统,使得 $25,000 去年, 但你不得不失去 $15,000 你所做的任何金钱之前. Most people don’t want that system. 这是什么意思是,你关心了很多有关的某一天到一天的基础上的表现,而不是最终的结果. The problem with optimization and even walk forward optimization is that you’re not necessarily focused on what you care about in the real world: the way that you’re making your money.
大多数图表包专注于网络的结果,而且可能会导致一些弱点,在你的系统. If you’re range trading, what you’ve really done is cherry pick the results that are the least affected by substantial news. 有效, you’ve chosen the settings that have not yet been affected by 肥尾.
If you’re trend trading, you’ve done the exact opposite. 你故意挑,最大限度地发生在过去的脂肪tailes的设置. 与趋势交易策略, you probably aren’t going to find consistent performance. 代替, what you’ll find is that the optimization frequently causes long, 不断缩编持续干旱. 然后突然, 几乎是从哪儿冒出来, 它发现一个大型怪物的赢家返回缩编,你经历了好几倍. 这是很好的一个假设backtests, but in the real world where you’re suffering losses on a near daily basis, most traders can’t take the pain. The weakness I find with most optimizations is that they don’t look at the consistency of performance. 为优化策略的一个潜在替代品将在看 线性回归 随着时间的推移股权曲线. 最好的资金曲线具有最强的线性回归斜率.
实现滚动向前走优化热门图表包Amibroker, 交易, Multicharts和NinjaTrader.
在NinjaTrader向前走优化
从控制中心打开策略分析. 单击文件 / 新 / 策略分析.
- 鼠标左键点击的工具或仪器清单,并单击鼠标右键,在弹出的右键单击菜单. 选择菜单项向前走. 您也可以点击 “在” 在战略分析工具栏图标. 如果你喜欢的热键, 你也可以使用CTRL + IN A. 最后, 你也可以推 “IN A” 在策略分析器的左上角的图标.
- 从战略滑出菜单的策略
- 设置向前走的属性 (见 “了解向前走的属性” 下面的属性定义部分) 然后按OK按钮.
该向前走的进展将在控制中心的状态栏显示出来.