新足迹

 找回密码
 注册

精华好帖回顾

· 【三刀厨侠争霸赛】狠素很便宜的半小时家常小炒,三菜一汤。 (2008-9-27) WTFAUS · TOMTOM和HlCOM3O5N伴我们澳洲行 (2006-6-3) xiongniu
· 参加活动❤春花秋月❤----全手工莲蓉蛋黄月饼 (2012-9-9) 航迹云 · 在那木措湖边,我们四目凝望——周瑜传 (2005-12-19) 铁枪
Advertisement
Advertisement
查看: 2066|回复: 23

[外汇债券] 高手请指点如何backtesting [复制链接]

发表于 2013-8-1 00:50 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
小弟入市尚浅,很多东西不熟不精,所以更多依赖历史数据的backtesting。但是疑惑是,大户做的事quant的测试,拿变量编程测试历史数据,调整参数得到做好结果来决定trading system(个人理解而已,也许根本不对,欢迎更正),而我这样的散户,没有深入的编程知识和统计知识,测试通常都是手动设定止损,单次交易合同数量大小,exit时间和数量等等,每次测试5-6年数据往往花上1-2周时间,不太高效。这里请求高手指点,不知道大家做测试都是怎么做的,是编程MT4自动测试还是自己手动测试?谢谢

PS:我主要做Forex,已经测试几个系统,加起来约20几年的历史数据,但是结果不是很理想。所用软件:Forex tester 2,付费账户
Advertisement
Advertisement

退役斑竹

发表于 2013-8-1 02:08 |显示全部楼层
此文章由 猎梦人 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 猎梦人 所有!转贴必须注明作者、出处和本声明,并保持内容完整
如果懂编程,可以把自己的交易想法写成程序用历史回测。

单纯人工测试可靠性一般不高。

另外就是测试的如果不是你开发的交易系统,通常没办法领会核心思想和精髓,这样的话在测试后的结果存疑。

醒着做梦

发表于 2013-8-1 08:58 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
猎梦人 发表于 2013-8-1 03:08
如果懂编程,可以把自己的交易想法写成程序用历史回测。

单纯人工测试可靠性一般不高。

谢谢版主回复和建议,我拿别人的系统通常自己改些东西,适合自己的性格等等,然后去测试。不过如果是计算机程序backtesting的话,如果成功,是不是意味着系统只要有同样和变量和规矩,就可以自动交易,无须人工职守呢?谢谢

退役斑竹

发表于 2013-8-1 14:27 |显示全部楼层
此文章由 猎梦人 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 猎梦人 所有!转贴必须注明作者、出处和本声明,并保持内容完整
一只鼎 发表于 2013-8-1 08:58
谢谢版主回复和建议,我拿别人的系统通常自己改些东西,适合自己的性格等等,然后去测试。不过如果是计算 ...

是的,理论上是这样的。

如果你相信历史是不断重复的,那么就可以应用自动交易下去。
醒着做梦

发表于 2013-8-1 15:25 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
猎梦人 发表于 2013-8-1 15:27
是的,理论上是这样的。

如果你相信历史是不断重复的,那么就可以应用自动交易下去。 ...

谢猎人版主,请问有没有可以推荐的书籍或者资料可供参考如果我想对backtesting做些研究呢?谢谢版主
头像被屏蔽

禁止发言

发表于 2013-8-1 15:41 |显示全部楼层
此文章由 lubber 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 lubber 所有!转贴必须注明作者、出处和本声明,并保持内容完整
猎梦人 发表于 2013-8-1 14:27
是的,理论上是这样的。

如果你相信历史是不断重复的,那么就可以应用自动交易下去。 ...

Will that be true for all???
签名被屏蔽
Advertisement
Advertisement

退役斑竹

发表于 2013-8-1 15:58 |显示全部楼层
此文章由 猎梦人 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 猎梦人 所有!转贴必须注明作者、出处和本声明,并保持内容完整
一只鼎 发表于 2013-8-1 15:25
谢猎人版主,请问有没有可以推荐的书籍或者资料可供参考如果我想对backtesting做些研究呢?谢谢版主 ...

抱歉,印象中没有接触过有什么书籍是介绍这一块的。

如果你是用MT4做回测,可以自己放狗找一个编程的手册之类的。

醒着做梦

发表于 2013-8-1 16:11 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
猎梦人 发表于 2013-8-1 16:58
抱歉,印象中没有接触过有什么书籍是介绍这一块的。

如果你是用MT4做回测,可以自己放狗找一个编程的手 ...

哈哈,喜欢版主说的放狗,很形象。不过还是感谢,希望我在trading的同时可以慢慢对编程有点认识

发表于 2013-8-2 15:46 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
顺便问下,不知道高手可有类似Forex Tester 2的软件,但是是MT4版本的,不会编辑dll文件,谢谢了

发表于 2013-8-2 16:55 |显示全部楼层
此文章由 AUGUPIAO 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 AUGUPIAO 所有!转贴必须注明作者、出处和本声明,并保持内容完整
MT4的backtesting算法有問題,建議用Matlab做。
但是如何取得clean data很難,因為一個壞的tick可以大大影響performance。
個人不建議在這上面花太多時間,因為現在的quant system太多,變化太快,基本你開發出來的backtesting有用的系統放到現實就沒大用了。
a

发表于 2013-8-2 18:19 来自手机 |显示全部楼层
此文章由 mmmggg 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 mmmggg 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Lz可以看看 birt's ea review 和学学 walk forward testing.
Advertisement
Advertisement

发表于 2013-8-2 22:05 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
AUGUPIAO 发表于 2013-8-2 17:55
MT4的backtesting算法有問題,建議用Matlab做。
但是如何取得clean data很難,因為一個壞的tick可以大大影 ...

谢谢你的回复,那么如果想看看自己的学习成果是否在历史数据上有没有站得住脚的地方该怎么做呢?求赐教

发表于 2013-8-2 22:08 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
mmmggg 发表于 2013-8-2 19:19
Lz可以看看 birt's ea review 和学学 walk forward testing.

谢谢,这些领域的确以前想都没想到过

发表于 2013-8-2 22:15 |显示全部楼层
此文章由 iamamouse 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 iamamouse 所有!转贴必须注明作者、出处和本声明,并保持内容完整
如果你不是要非常专业的,应该可以用excel就可以了,如果还要再自动点,用上vba辅助。我给老板做了一些excel的equity backtesting。专业的equity测试一般比较有名的是metastock,ami broker什么的。但我不清楚forex跟equity所用的technical model有多大区别。

评分

参与人数 1积分 +3 收起 理由
猎梦人 + 3 感谢分享

查看全部评分

帅有个屁用!到头来还不是被卒吃掉

发表于 2013-8-2 22:16 |显示全部楼层
此文章由 iamamouse 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 iamamouse 所有!转贴必须注明作者、出处和本声明,并保持内容完整
晕,怎么足迹的网站卡了,一发出来这么多回复。sorry

发表于 2013-8-2 22:22 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
iamamouse 发表于 2013-8-2 23:16
晕,怎么足迹的网站卡了,一发出来这么多回复。sorry

没事没事,能给我出出点子我感激还来不及,更何况不给力童鞋不是还帮我顶了帖3回嘛,哈哈,谢谢哦

如果用excel,tick data怎么办?有excel格式的tick data吗?还是从txt导入的spreadsheet?
Advertisement
Advertisement

发表于 2013-8-2 22:28 |显示全部楼层
此文章由 iamamouse 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 iamamouse 所有!转贴必须注明作者、出处和本声明,并保持内容完整
这个我不太清楚,不过看你原始文件的delimit,照理说很土的办法的话你把一串数据拷到excel总能用空格,或者什么的给它分列。如果原文件是用逗号分隔的,应该可以另存为csv的文件,那excel可以直接读。
帅有个屁用!到头来还不是被卒吃掉

发表于 2013-8-4 20:38 |显示全部楼层
此文章由 xtrader 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 xtrader 所有!转贴必须注明作者、出处和本声明,并保持内容完整
一只鼎 发表于 2013-8-2 22:22
没事没事,能给我出出点子我感激还来不及,更何况不给力童鞋不是还帮我顶了帖3回嘛,哈哈,谢谢哦

如果 ...

FX is OTC product.  It does not have a real tick data.  Some fx brokers might have for their own trades.  For futures and stocks tick data, you can purchase at www.tickdata.com

For professional backtest system (as I know, they costs ~US$4000), you can check, www.tradingblox.com

发表于 2013-8-5 20:28 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
iamamouse 发表于 2013-8-2 23:28
这个我不太清楚,不过看你原始文件的delimit,照理说很土的办法的话你把一串数据拷到excel总能用空格,或者 ...

谢谢哦,可能是先入为主,比较倾向于有虚拟资金的forest tester 2,可惜不是MQL4的,编译很麻烦

我会去搜搜历史数据的,你说的没错,逗号文件可能就能解决问题

发表于 2013-8-5 20:31 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
本帖最后由 一只鼎 于 2013-8-5 21:34 编辑
xtrader 发表于 2013-8-4 21:38
FX is OTC product.  It does not have a real tick data.  Some fx brokers might have for their own t ...


谢谢,看了下,貌似不错,就是里面的系统都是内建的好像,没有自己可以打造的东东,但是利用原有的,有效的system,根据Curtis Faith说的一些原理,还是可以搞出不错的系统

关键的关键,还是要mental toughness啊

PS:发现所有软件也好,系统的广告也好,都只有几年的数据equity的曲线,说明问题的可靠性还有待提高啊,不知道如今的trader,有没有真的follow turtle系统的

发表于 2013-8-5 22:23 |显示全部楼层
此文章由 xtrader 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 xtrader 所有!转贴必须注明作者、出处和本声明,并保持内容完整
本帖最后由 xtrader 于 2013-8-5 22:25 编辑
一只鼎 发表于 2013-8-5 20:31
谢谢,看了下,貌似不错,就是里面的系统都是内建的好像,没有自己可以打造的东东,但是利用原有的,有效 ...


Those are well known systems and used as example to demonstrate how to use the platform to build a testing system.  You can build any system and in time frame.  Can't remember does it support tick data, but I sure it supports 1 min chart.  

Trading blox is a backtesting engine.  You can get any system's 20 yrs equity curve as long as you got the 20 years data to feed.  

I don't know how many people still follow the original turtle system.  I guess that no many.  The reason is that it is so popular and that create too many noises.  Even one of the original turtles disclose that he has changed to 21/11 and 51/21.  

I agree with you the "mental" is an very important factor, but I can't agree the "mental toughness".  It is two different concepts, at least to me.



Advertisement
Advertisement

发表于 2013-8-5 23:46 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
xtrader 发表于 2013-8-5 23:23
Those are well known systems and used as example to demonstrate how to use the platform to build a ...

Again, thanks for sharing your opinions and thoughts towards the Original Turtle System

Regarding to equity curve, I partially agree with what you wrote, however, I strong believe what Curtis Faith said, which is that equity curve can vary massively from year to year, extracting certain time period may not be able to illustrate the whole picture, i.e. 4-5 year equity curve would show a substantial return while a few year later, large draw down can be spotted due to the market conditions.

If you do not mind, I am wondering if you could please share your thoughts on the trend following systems. Private me is fine, as a beginner trader, I'd love to meet the experienced.

I guess that I have to learn MQL4 good enough so that I can start my own testing with my own system

Thanks again mate

发表于 2013-8-6 11:36 |显示全部楼层
此文章由 xtrader 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 xtrader 所有!转贴必须注明作者、出处和本声明,并保持内容完整
一只鼎 发表于 2013-8-5 23:46
Again, thanks for sharing your opinions and thoughts towards the Original Turtle System

Regarding ...
Regarding to equity curve, I partially agree with what you wrote, however, I strong believe what Curtis Faith said, which is that equity curve can vary massively from year to year, extracting certain time period may not be able to illustrate the whole picture, i.e. 4-5 year equity curve would show a substantial return while a few year later, large draw down can be spotted due to the market conditions.


Sorry for misunderstood.  I see what you mean now.  I agree with you.  And spot on, it is the market conditions.  Every single moment on the market is unique. If you see a chart which has a exactly same pattern (I mean EXACTLY same, even every single bar), compare to 10 years ago or 10 mins ago.  Does it mean the market condition is the same?  My answer is no.  The reason is the number of people already involved in the market is different.  Their positions might different.  Their future view of the market might different.  More, the number of people whose ready to get into the market might different.  The view of the these potential traders might different.  And many many other factors.  Some people argue that why does it matter.  Well, what is the market?  The market is actually is people.  If no one trade, there is no market, period.  So I agree, it is the market condition, not the system itself.


If you do not mind, I am wondering if you could please share your thoughts on the trend following systems. Private me is fine, as a beginner trader, I'd love to meet the experienced.


Trend following system is very good to start with.  Easy and simple to learn and understand about trading.  Most of the systems are works (no my word, Richard Dennis), but suitable to different market conditions.  What a concept.     What I mean, generally market conditions have trend volatile, trend non-volatile, non-trend volatile, non-trend non-volatile.  High volatile market is good for option writing and swing, non-trend non-volatile is good for long straddle, etc.  If you like, you can have a system for all conditions, or have different system for different conditions.  It is your call and it is your job as a trader.


Hope this help.



发表于 2013-8-6 21:39 |显示全部楼层
此文章由 一只鼎 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 一只鼎 所有!转贴必须注明作者、出处和本声明,并保持内容完整
xtrader 发表于 2013-8-6 12:36
Sorry for misunderstood.  I see what you mean now.  I agree with you.  And spot on, it is the ma ...

Thanks, that definitely helped. I still got a list of books to read, decades of data to test, I am hoping my MQL coding skills can be developed rather quickly, otherwise I am gonna end up manually testing the breakouting system, which is pain in the ***.

Thanks again for your reply and help.

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部