neo_cn从今日(2007年9月21日)起,全景直播tradestation8.3 外汇全自动交易实战

Discussion in 'TradeStation' started by neo_cn, Sep 21, 2007.

  1. 你是否可以用EXCEL测试测试,许多问题在他那里反而方便了,这几天我刚有所感想,以前不敢考虑15W行的TICK数据用EXCEL做一种很特殊的系统测试,现在却觉得还是EXCEL好了。
     
  2. 这是我计划在这次实盘交易中使用的三个策略之一
     
  3. equity curve
     
  4. profitfactor&win%

    profitfactor&win%
     
  5. 没错,excel功能被绝大多数人低估,让我印象深刻的是用excel做线性规划
     
  6. TradeStation Performance Summary

    All Trades Long Trades Short Trades
    Total Net Profit ¥16,664.70 ¥16,664.70 ¥0.00
    Gross Profit ¥43,564.60 ¥43,564.60 ¥0.00
    Gross Loss -¥26,899.90 -¥26,899.90 ¥0.00
    Profit Factor 1.62 1.62 n/a

    Roll Over Credit ¥474.05 ¥474.05 ¥0.00
    Open Position P/L ¥0.00 ¥0.00 ¥0.00

    Select Total Net Profit ¥14,473.75 ¥14,473.75 ¥0.00
    Select Gross Profit ¥41,161.60 ¥41,161.60 ¥0.00
    Select Gross Loss -¥26,687.85 -¥26,687.85 ¥0.00
    Select Profit Factor 1.54 1.54 n/a

    Adjusted Total Net Profit ¥12,392.80 ¥12,392.80 ¥0.00
    Adjusted Gross Profit ¥41,058.88 ¥41,058.88 ¥0.00
    Adjusted Gross Loss -¥28,666.09 -¥28,666.09 ¥0.00
    Adjusted Profit Factor 1.43 1.43 n/a

    Total Number of Trades 433 433 0
    Percent Profitable 57.97% 57.97% 0.00%
    Winning Trades 251 251 0
    Losing Trades 182 182 0
    Even Trades 0 0 0

    Avg. Trade Net Profit ¥38.49 ¥38.49 ¥0.00
    Avg. Winning Trade ¥173.56 ¥173.56 ¥0.00
    Avg. Losing Trade -¥147.80 -¥147.80 ¥0.00
    Ratio Avg. Win:Avg. Loss 1.17 1.17 n/a
    Largest Winning Trade ¥694.00 ¥694.00 ¥0.00
    Largest Losing Trade -¥400.00 -¥400.00 ¥0.00
    Largest Winner as % of Gross Profit 1.59% 1.59% n/a
    Largest Loser as % of Gross Loss 1.49% 1.49% n/a

    Net Profit as % of Largest Loss 4166.17% 4166.17% n/a
    Select Net Profit as % of Largest Loss 3618.44% 3618.44% n/a
    Adjusted Net Profit as % of Largest Loss 3098.20% 3098.20% n/a

    Max. Consecutive Winning Trades 23 23 0
    Max. Consecutive Losing Trades 9 9 0
    Avg. Bars in Total Trades 98.97 98.97 0
    Avg. Bars in Winning Trades 102.8 102.8 0
    Avg. Bars in Losing Trades 93.69 93.69 0
    Avg. Bars in Even Trades 0 0 0

    Max. Shares/Contracts Held 10 10 0
    Total Shares/Contracts Held 4330000 4330000 0
    Account Size Required ¥3,042.60 ¥3,042.60 ¥0.00
    Total Slippage ¥0.00 ¥0.00 ¥0.00
    Total Commission ¥0.00 ¥0.00 ¥0.00

    Return on Initial Capital 17.14%
    Annual Rate of Return 3.30%
    Buy & Hold Return 26.09%
    Return on Account 563.24%
    Avg. Monthly Return ¥225.54
    Std. Deviation of Monthly Return ¥801.20

    Return Retracement Ratio 0.29
    RINA Index 208.01
    Sharpe Ratio 0.13
    K-Ratio n/a

    Trading Period 4 Yrs, 9 Mths, 16 Dys, 14 Hrs
    Percent of Time in the Market 67.07%
    Time in the Market 3 Yrs, 2 Mths, 17 Dys, 19 Hrs, 3 Mins
    Longest Flat Period 11 Dys, 6 Hrs

    Max. Equity Run-up ¥18,497.35
    Date of Max. Equity Run-up 2007-9-12 17:00
    Max. Equity Run-up as % of Initial Capital 18.50%

    Max. Drawdown (Intra-day Peak to Valley)
    Value -¥3,227.60 -¥3,227.60 ¥0.00
    Date 2004-9-16 04:00
    as % of Initial Capital 4.56% 4.56% 0.00%
    Net Profit as % of Drawdown 516.32% 516.32% n/a
    Select Net Profit as % of Drawdown 448.44% 448.44% n/a
    Adjusted Net Profit as % of Drawdown 383.96% 383.96% n/a

    Max. Drawdown (Trade Close to Trade Close)
    Value -¥3,042.60 -¥3,042.60 ¥0.00
    Date 2004-9-3 21:00
    as % of Initial Capital 3.04% 3.04% 0.00%
    Net Profit as % of Drawdown 547.71% 547.71% n/a
    Select Net Profit as % of Drawdown 475.70% 475.70% n/a
    Adjusted Net Profit as % of Drawdown 407.31% 407.31% n/a

    Max. Trade Drawdown -¥400.00 -¥400.00 ¥0.00



    All Trades

    Total Net Profit ¥16,664.70 Profit Factor 1.62
    Gross Profit ¥43,564.60 Gross Loss -¥26,899.90

    Roll Over Credit ¥474.05
    Open Position Profit/Loss ¥0.00

    Select Total Net Profit ¥14,473.75 Select Profit Factor 1.54
    Select Gross Profit ¥41,161.60 Select Gross Loss -¥26,687.85

    Adjusted Total Net Profit ¥12,392.80 Adjusted Profit Factor 1.43
    Adjusted Gross Profit ¥41,058.88 Adjusted Gross Loss -¥28,666.09

    Total Number of Trades 433 Percent Profitable 57.97%
    Winning Trades 251 Losing Trades 182
    Even Trades 0

    Avg. Trade Net Profit ¥38.49 Ratio Avg. Win:Avg. Loss 1.17
    Avg. Winning Trade ¥173.56 Avg. Losing Trade -¥147.80
    Largest Winning Trade ¥694.00 Largest Losing Trade -¥400.00
    Largest Winner as % of Gross Profit 1.59% Largest Loser as % of Gross Loss 1.49%

    Net Profit as % of Largest Loss 4166.17%
    Slct. Net Profit as % of Largest Loss 3618.44% Adj. Net Profit as % of Largest Loss 3098.20%

    Max. Consecutive Winning Trades 23 Max. Consecutive Losing Trades 9
    Avg. Bars in Winning Trades 102.8 Avg. Bars in Losing Trades 93.69
    Avg. Bars in Total Trades 98.97

    Max. Shares/Contracts Held 10 Account Size Required ¥3,042.60
    Total Commission ¥0.00 Total Slippage ¥0.00

    Return on Initial Capital 17.14% Annual Rate of Return 3.30%
    Buy and Hold Return 26.09% Return on Account 563.24%
    Avg. Monthly Return ¥225.54 Std. Deviation of Monthly Return ¥801.20

    Return Retracement Ratio 0.29 RINA Index 208.01
    Sharpe Ratio 0.13 K-Ratio n/a

    Trading Period 4 Yrs, 9 Mths, 16 Dys, 14 Hrs Percent of Time in the Market 67.07%
    Time in the Market 3 Yrs, 2 Mths, 17 Dys, 19 Hrs, 3 Mins Longest Flat Period 11 Dys, 6 Hrs

    Max. Equity Run-up ¥18,497.35
    Date of Max. E. Run-up 2007-9-12 17:00 Max. E. Run-up as % of Initial Capital 18.50%

    Max. Drawdown (Intra-day Peak to Valley) Max. Drawdown (Trade Close to Trade Close)
    Value -¥3,227.60 Value -¥3,042.60
    Date 2004-9-16 04:00 Date 2004-9-3 21:00
    as % of Initial Capital 4.56% as % of Initial Capital 3.04%
    Net Profit as % of Drawdown 516.32% Net Profit as % of Drawdown 547.71%
    Slct. Net Profit as % of Drawdown 448.44% Slct. Net Profit as % of Drawdown 475.70%
    Adj. Net Prof as % of Drawdown 383.96% Adj. Net Profit as % of Drawdown 407.31%

    Max. Trade Drawdown -¥400.00

    Long Trades

    Total Net Profit ¥16,664.70 Profit Factor 1.62
    Gross Profit ¥43,564.60 Gross Loss -¥26,899.90

    Roll Over Credit ¥474.05
    Open Position Profit/Loss ¥0.00

    Select Total Net Profit ¥14,473.75 Select Profit Factor 1.54
    Select Gross Profit ¥41,161.60 Select Gross Loss -¥26,687.85

    Adjusted Total Net Profit ¥12,392.80 Adjusted Profit Factor 1.43
    Adjusted Gross Profit ¥41,058.88 Adjusted Gross Loss -¥28,666.09

    Total Number of Trades 433 Percent Profitable 57.97%
    Winning Trades 251 Losing Trades 182
    Even Trades 0

    Avg. Trade Net Profit ¥38.49 Ratio Avg. Win:Avg. Loss 1.17
    Avg. Winning Trade ¥173.56 Avg. Losing Trade -¥147.80
    Largest Winning Trade ¥694.00 Largest Losing Trade -¥400.00
    Largest Winner as % of Gross Profit 1.59% Largest Loser as % of Gross Loss 1.49%

    Max. Consecutive Winning Trades 23 Max. Consecutive Losing Trades 9
    Avg. Bars in Winning Trades 102.8 Avg. Bars in Losing Trades 93.69
    Avg. Bars in Total Trades 98.97

    Max. Shares/Contracts Held 10 Account Size Required ¥3,042.60
    Total Commission ¥0.00 Total Slippage ¥0.00

    Net Profit as % of Largest Loss 4166.17%
    Slct. Net Profit as % of Largest Loss 3618.44% Adj. Net Profit as % of Largest Loss 3098.20%

    Max. Drawdown (Intra-day Peak to Valley) Max. Drawdown (Trade Close to Trade Close)
    Value -¥3,227.60 Value -¥3,042.60
    as % of Initial Capital 4.56% as % of Initial Capital 3.04%
    Net Profit as % of Drawdown 516.32% Net Profit as % of Drawdown 547.71%
    Slct. Net Profit as % of Drawdown 448.44% Slct. Net Profit as % of Drawdown 475.70%
    Adj. Net Prof as % of Drawdown 383.96% Adj. Net Profit as % of Drawdown 475.70%

    Max. Trade Drawdown -¥400.00

    Short Trades

    Total Net Profit ¥0.00 Profit Factor n/a
    Gross Profit ¥0.00 Gross Loss ¥0.00

    Roll Over Credit ¥0.00
    Open Position Profit/Loss ¥0.00

    Select Total Net Profit ¥0.00 Select Profit Factor n/a
    Select Gross Profit ¥0.00 Select Gross Loss ¥0.00

    Adjusted Total Net Profit ¥0.00 Adjusted Profit Factor n/a
    Adjusted Gross Profit ¥0.00 Adjusted Gross Loss ¥0.00

    Total Number of Trades 0 Percent Profitable 0.00%
    Winning Trades 0 Losing Trades 0
    Even Trades 0

    Avg. Trade Net Proft ¥0.00 Ratio Avg. Win:Avg. Loss n/a
    Avg. Winning Trade ¥0.00 Avg. Losing Trade ¥0.00
    Largest Winning Trade ¥0.00 Largest Losing Trade ¥0.00
    Largest Winner as % of Gross Profit n/a Largest Loser as % of Gross Loss 1.49%

    Max. Consecutive Winning Trades 0 Max. Consecutive Losing Trades 0
    Avg. Bars in Winning Trades 0 Avg. Bars in Losing Trades 0
    Avg. Bars in Total Trades 0

    Max. Shares/Contracts Held 0 Account Size Required ¥0.00
    Total Slippage ¥0.00 Total Commission ¥0.00

    Net Profit as % of Largest Loss n/a
    Slct. Net Profit as % of Largest Loss n/a Adj. Net Profit as % of Largest Loss n/a

    Max. Drawdown (Intra-day Peak to Valley) Max. Drawdown (Trade Close to Trade Close)
    Value ¥0.00 Value ¥0.00
    as % of Initial Capital 0.00% as % of Initial Capital 0.00%
    Net Profit as % of Drawdown n/a Net Profit as % of Drawdown n/a
    Slct. Net Profit as % of Drawdown n/a Slct. Net Profit as % of Drawdown n/a
    Adj. Net Prof as % of Drawdown n/a Adj. Net Prof as % of Drawdown n/a

    Max. Trade Drawdown ¥0.00
     
  7. 我这是临阵磨枪啊,手里的系统都是06年初至今这段时间产生的,还没有一个让自己满意和放心的系统,除了自己工程上安排的问题之外,主要原因是每天都会有新的想法在脑子里排队等待实现和测试。我争取在10.1假期里面把这些想法都实现,把系统做到自己满意。10月假期后上线。
     
  8. 基本同意,但我认为不一定一定是趋势翻转系统
     


  9. 这个问题就大了。

    有个问题,至今为止楼主有没有连续半年以上交易外汇的经验。无论是系统交易还是手工交易?

    还是迄今主要是设计系统呢。
     
  10. 这个问题该怎么说呢?我是这样想的:
    如果未来一段时间我要进行的是手动交易(或者某种程度的直觉交易),那么我需要经过大量的真实交易来锻炼我的心态,检验我的直觉,测试金钱对荷尔蒙的刺激对主观判断的影响,不过即使做到这些,我也不能保证在未来有很好的水平维持,总而言之,做了比不做强,但做了,或者做了多少都不能保证我们未来的盈利,对吗?

    而未来一段时间,我要做的,不是直觉交易,在我给自己这个行动指定的三条原则里,就包含:“绝对不进行任何一手人工交易,排除意外的需求除外”。那么,在过去是我否进行了系统交易该怎么衡量呢?

    每一次严格的backtesting都是成百上千次的交易,即使这个过程是在几秒钟内被完成的,从这个角度上讲我已经依据我的策略进行了无数次严格的统一的交易,那么剩下的问题就是两个:
    第一个,真实交易的效果(成交的质量),是否和backtesting过程中一致?
    第二个,backtesting中表现很好的策略,是否能在未来也能保持良好绩效?

    对于第一个问题,我在cms,fxcm做过自动交易执行测试,到现在为止,得出的结论是,这个问题在资金不是非常大的情况下可以忽略不计。
    对于第二个问题,backtesting中表现很好的策略,是否能在未来也能保持良好绩效?要重点考虑两点:
    1,backtesing的标准问题:数据量,交易次数,市场相关性,测试环境的真实程度。
    2,未来相似但不等于过去,因此我的策略是否具有一定的“柔性”能适应变化。

    因此我认为,决定这次行动绩效的关键,还是在于策略本身,而对策略的评判,就要靠严格的大量的backtesting,当数据足够多的时候,forwordtesting是不必要的。
     
  11. 你可以找找blackhorse 记得在某期货论坛看到过 在谈论网格交易法时 提到这个问题 当时软件是tradestation2000i
     
  12. 多谢这位兄弟,以前怎么没见过你,是新更换的名字吗?

    刚刚看了你发过的帖子,是位高手。
     
  13. 刚才翻看 《宽客人生》 序里面有这样一段话:
    “我并不是说所有的宽客都以布莱克-肖尔斯模型为业。他们中的一些人开始越来越多的充实统计套利交易(statistical arbitrage),试图从以往股价变动的模式中发现规律和趋势,然后应用这些规律和趋势,换句话说就是从过去预测未来。对冲基金和私募基金在市场中那些偶尔出现的、没有被人注意到的角落里寻找微小的价格差异,也正是这些基金在过去五年中成了宽客的主要雇主,并且在再继续聘请他们从事”统套交易“。”

    语气上看,并不是很赞成或者热衷统套交易,而我进行的正是统套交易。

    通过不断的编写、改写规则,并将这些规则应用在历史数据上,以检测这些规则是否体现了以往历史数据中包含的规律或者概率优势,并且期望你这概率优势或者以往数据中出现的规律会在未来保持不变,或者可以适应的变化。

    有没有某个理论或者算法,来说明历史和未来的关联关系的呢?
     

  14. 从42楼的那张图来看,贴主执行的是方向性交易策略呀,怎么是套利交易呢?

    套利交易要求在任一时刻,同时持有多头和空头的交易。方向性交易虽然也需要statistical confirmation, 但那是 strategy backtest. 和 《MY LIFE AS A QUANT》作者所说的 "statistical arbitrage"是两码事。 那种交易需要频繁用期权。
     
  15. 原来是这样,长见识了,谢谢,我在这方面的知识是个小学生,呵呵

    42那张图是个半成品 我在设计和测试策略的事后习惯先做单向(仅做多,或者仅做空)的 然后再做双向的(多空同时存在的)。
     
  16. 新进展:改进策略的同时开始测试ts交易指令,sellshort 和buytocover指令在外汇交易中不被支持。
    ts外汇交易指令有如下几种
    Equities
    Options
    Futures
    Description

    Buy
    Buy to Open
    Buy
    Used to establish, or add to, a long position for the specified symbol.

    Note For futures, a Buy first offsets any existing short contracts for the specified symbol before the remaining contracts establish a long position.

    Sell
    Sell to Close

    Used to liquidate a long position for the specified symbol .

    Sell Short
    Sell to Open
    Sell
    Used to establish, or add to, a short position for the specified symbol .

    Note For futures, a Sell first offsets any existing long contracts for the specified symbol before the remaining contracts establish a short position.

    Buy to Cover
    Buy to Close

    Used to liquidate a short position for the specified symbol.
     
  17. TradeStation Order Types

    TradeStation Order Types
    In TradeStation, there are four basic order types (Market, Limit, Stop-Market, Stop-Limit) that are used in combination with an order action (Buy, Sell, Sell Short, Buy to Cover, etc.) to make up a specific order description for buying or selling a security or commodity. For stop and limit orders, the price at which you would like that action to take place is also included. The following table outlines the basic order types:



    Order Type
    Description

    Market
    A Market order is used to enter or exit a position at whatever the current market price is at the time the order reaches the trading floor.

    Limit
    A Limit order is used to enter or exit a position only when the market reaches the specified limit price or better (at-or-below for buy orders and at-or-above for sell orders). Limit orders are typically visible to the market until filled.

    Stop Market
    A Stop Market order is used to enter or exit a position only when the market reaches the specified stop price or better (at-or-above for buy orders and at-or-below for sell orders). When the stop price is met, a market order is placed. Stop orders are typically not visible to the market until the target price is reached.

    Stop Limit
    A Stop Limit order is used to enter or exit a position only after both of the following occur: a) the market reaches the specified stop price at which point the limit order is sent to the market, and then, b) the limit order executes at the specified limit price or better.

    For example, if the market is trading at 54, you can place a Buy Stop Limit order at 55 for 55.05. This means that when the price reaches the stop of 55, a limit order protects you from buying at a price of no more than 55.05.

    Note The Stop price must be better than the current market price at the time the order is sent in and the Limit price must be at or better than the Stop price. In addition, the Limit part of the order only becomes visible to the market after the Stop price has been reached, although there is no guarantee that the Limit price will be met.
     
  18. 今天按照趋势反转策略,做了一天的测试,测试方法是让系统发出信号,人工确认,到现在为止,业绩如下。
     
  19. 最近状况

    按照半自动的模式 进行了三天 效果如下

    心得随后补上