下载APP | 繁體版 | 发布广告 |常用工具
楼主: 有希望

[转帖] 技术分析:拐角及曲线的成败双向性

[复制链接]

429

主题

1069

帖子

878

积分

贝壳网友七级

留学博士后(十二级)

Rank: 3Rank: 3

积分
878
有希望 发表于 2005-7-11 20:27 | 显示全部楼层 |阅读模式

[转帖] 技术分析:拐角及曲线的成败双向性





Just want to shake things up and say that all strategy development is curve fitting to some degree or other. I think once people recognize this, then the spectre of "curve fitting" will start to pale and we can begin to discuss this aspect of strategy development rationally.

First of all, you're trying to develop a strategy that reacts to highs and lows in a price series. By definition you are fitting your strategy to a curve. This isn't necessarily a bad thing - the term curve fitting itself is not well defined. I think that most people say "hey I know what curve-fitting is" without even stopping to think about it. What does it really mean? Is it only a there/not-there thing? Of course not. There are degrees of curve fitting, and therefore a continuum from not at all to heavily curve fit.

If it isn't there at all, then can your strategy do anything? Of course not; you fit your strategy to some sort of curve, whether it be "curves" you recognize as patterns, or triple-tops, or just break-outs, but when the series changes your strategy reacts to it. So now, the question is, how much curve-fitting is too much? Everyone will agree that at some point, you can create a strategy that is too specific to a set of prices and if you give it any other set of prices then it won't react in the same way. So really, you are trying to create an adaptive curve fitting system, that adapts to react the same way as the curves change, or one which recognizes general cases or high-probability events in the series. To me, it all means the same thing - you're looking for one or more characteristics of the series that you can react to - you're fitting your strategy to those charcteristics, so I guess you could call that curve-fitting, or maybe curve-reacting? Maybe really, curve fitting is a static thing, whereas the counterpart to curving fitting is curve-reacting, which is a dynamic thing.

Now the next step of the discussion goes something like this... how can we tell the difference? And how can we measure each? Can we measure the degree of curve-fitness vs. curve-reactivness? I would think they both need to be quantifiable. E.g. the less similar the equity curve is to the original in a walk-forward test, the greater the curve-fit value, and the less the curve-reactive value. Or the more random the returns for any test on out-of-sample data, the higher the curve-fit value. The opposite of that would be, the more uniform the returns on an out-of-sample test, the lower the curve-fit value and the higher the curve-reactive value?

In my opinion, “curve fitting” is a well defined term. It means finding a mathematical function that models a data series (such as a stocks’ price over time). Assume that one is observing some phenomena that is corrupted by noise, then any number of curving fitting algorithms could used to find the underlying equations that models that phenomena. The problem with curve fitting a stock’s price time series is that it consist only of noise. Hence one may be able to curve fit the training data set, but that model will fail on out-of-sample data.

The term “curve fitting” has been applied to strategies whose parameters have been optimized to maximize (or minimize) some metric (net profit, max drawdown, etc.). Since optimization is one of the methods used to find an underlying model this is a legitimate use of the term. But if the strategy performs well with out-of-sample data who cares if it was curve fitted as you deposit money in the bank?

The issue for strategy development shouldn’t be whether it was based upon curve fitting, but rather how well it has Generalized the trading problem (i.e., how well does the strategy perform on data it has never seen before (out-of-sample)). Generalization can be accomplished by curve fitting or by abstraction based upon observation of the underlying trading process.

For example, if one has observed that if a particular indicator moves to a specific level that within a minute or two of when an arbitrage buy program is likely to be initiated, and designs a strategy around this phenomena is this curving fitting? No, I would argue that it is Generalization since it is based upon an observable underlying phenomena.

Therefore, I would argue that (1) all strategies are not necessarily curve fitted, and (2) strategies should be evaluated on how well they have Generalized the trading game as measured by out-of-sample test performance.

For the term “curve-reactivness” my initial thought was of some type of an adaptive system where the strategy’s parameters rather than being optimized over some data set at design time are instead changed dynamically in realtime. There is no guarantee that this type of strategy will perform any better on out-of-sample data than a curve fitted system. Additionally, I can conceive of adaptive systems that are designed using optimization techniques (curving fitting) and even some that optimize themselves in realtime. I don’t see how we could use “curve-reactivness” as a measure of a the “goodness” of a strategy. Here again the measure of the worthiness of the strategy should be how well has it generalized

I agree with most of what's been said here with some departure from the consensus. It's true that trading strategies can been assimilated to curve fitting of sorts, but what type of curve fitting is often misunderstood. No trading strategy, be it discretionary or mechanical, ever attempts at fitting the price curve. That would be like trying to predict the next bar price, and nobody does that. What we're trying to do is fit an optimal trading position given a price curve. In math terminology, we perform a classification (what trading position best fits the current price pattern?) and not a regression (what price is going to be next bar, given present and past prices?). So it's my belief that curve fitting should be understood in the classification framework.

TRUE TARGET:

The above assertion has a number of implications. For one, we should be aware of our true target: it's a series of +1 and -1 representing trading positions over time. The ideal target can be modelled by a zigzag going from peak to valley, allowing for some noise by giving it a minimum retracement value. I use the zigzag a lot. It tells me how much I could make as a perfect trader. If I apply a zizag (.5% retracement) on 1 year of recent NQ 20mn, a perfect trader can make $300,000. My systems being what they are, I am a 10% perfect trader. My goal is to become a 20% perfect trader

If anyone wants to measure his/her degree of perfection, it's a good test. The perfect zigzag varies over time. 3 years ago, a perfect trader could make 3 times as much as today. Tough times, the trading opportunities have drifted away and most non-optimized mechanical systems have blown up because they weren't fitted for these market conditions.

OVER AND UNDER FITTING

Curve fitting is too often mixed up with over-fitting. Curve fitting is an ideal situation: your system is capable of capturing the past market dynamics, and to generalize -without too much degradation - in the future.

Over-fitting is what troubles most traders: you fit the past perfectly, but you don't generalize well. It happens when you're trying to be so close to the perfect zigzag that you model noise and not structure.

There is another curse, which is referred to as under-fitting: for fear of being too close to the past zigzag, we deliberately allow for more slack and end up with a sub-optimal system: it's still OK in the past, but doesn't generalize either. Underfitting is probably what plagues the so-called non optimized mechanical systems which have all gone south in 2003. With so few rules, so linear, so general, supposedly working on so many sysmbols, how can they beat a true specialist of one market? I know what I'm talking about, I own a couple very famous trading systems that cost me much more than the tag price.

To summarize, curve fitting may well be the ideal equilibrium between under and over-fitting. But how do we know that we're ideally curve fitting is another matter!

STRATEGY TESTING

TS has provided us with the most basic tool for appraising the quality of a strategy: backtesting. Most people don't use that capability in the right manner: when designing a strategy, one should tune it on a training period, decide that it's OK, and then test it on another period JUST ONCE to see if it generalizes. If it doesn't one should never try to tweak the system to make it work on the test period because it's not a test period any longer. Doing it is called data snooping. If it doesn't generalize well, change your logic and start again from scratch.

I'm not one for testing strategies on different symbols, different timeframes, or even random data. My reasons are that

- price behavior is very specific of its underlying market dynamics, with very typical stylized facts that represent the symbol's signature. It's not even certain that time frames can be scaled up or down with the same logic. So why try to apply the same logic to different symbols? We may be under-fitting on 2 symbols to make it work!! I know people who're very happy to discover that their logic on NQ "also" works on ES: they're just experiencing some correlation between NQ and ES...

- Market structure drifts sometimes slowly, sometimes fast, and my attention is fully on timing the need to retrain. It's not because a strategy performs across several markets that the need to retrain disappears.

WALK-FORWARD:

I believe that the moment of truth for any given strategy is multiple walk-forward testing, because it's the closest to the real thing. Multiple W-F is a process by which you train (or tune) a strategy on an old data period, then test it on a newer period. Then you retrain on this period and retest on the next. So on 3 or 4 times. This process helps you verify 3 things:

- Your strategy tests well, 3 times

- Your re-training routine produces good results 3 times

- You're in a quasi real-time situation where you have to decide when to retrain and how.

I use neural nets a lot and that's what you're supposed to do with them. Multiple W-F best simulates drifting market conditions and the need to retrain.

SYNTHETIC DATA:

We all have to understand that the market dynamics are non-stationary, non-linear, aperiodic, ephemeral, chaotic (they feed on themselves), not autocorrelated in returns, and somewhat autocorrelated in volatility. Some academic work has tried to model market prices with an agent-based system, but the truth is that it's impossible to synthetize market prices. So how do you test your strategies if data is not available?

The answer is probably manifold:

- Adding noise and modulation to a price series to make it similar but different than your training period is an interesting attempt.

- Randomizing data like what Tushar Chande suggests is IMHO structure destructive and can only produce wild results. I have run some stat tests and all autocorralation and automutual information disappears

- Drawing and Randomizing larger chunks of true data from the past, even repeating chunks (with some noise added) where your learning process performs worst is also widely used in the NN community. But then it's hard to do in TS. You need an external tool for that. (I have my own).

SYNTHETIC INDICES

I have recently developped an approach which consists in making an index of prices with only 5 to 10 components from the true index. I pick the components with an algorithm in such a way that

- they are relatively uncorrelated

- their weighted sum is very correlated with the true index.

Repeating this process can give me several such synthetic index which is related to the true index, but sufficiently different to serve testing purposes.

MY FAVORITE

No trading system is satisfactory both in profit and risk (Max Draw Down). My solution is to trade several systems in a portfolio. Using portfolio theory and a home made algorithm (adapted from Markowitz), I select 5 different systems, very uncorrelated, with roughly the same profit potential. Traded together in a portfolio, these system average their profits but divide their MIDD by 2.

I deliberately use the same symbol. My reason? I consider that the price series is the only element of randomness in my approach. Therefore, if I use the same symbol for all selected systems, the uncorrelation I observe between systems is not random, but structural. Consequently, I can count on this property perpetually.

The “ Trading in the Zone “ author also does workshops go to one.

Learn and master one simple method so you don’t get overwhelmed.

You have four fears working against you when you are interacting with market data.

1. Fear of missing out. (Chasing the moving price bar)

2. Fear of leaving money on the table. (Not taking profits)

3. Fear of losing. (Feeling depressed when the price nears your stop-loss, stop-losses that are too close, most break-even stop-loss are).

4. Fear of being wrong. (Not putting on the trade)

These fears will exist when your beliefs about trading and not aligned with the probabilistic reality of trading.

Learn to play Black Jack. For a while I played Internet black jack at the same time while I traded. I helped me to stop pick and choosing my trades. It will help you to think in probabilities and it can help you learn to embrace the risk and not to avoid losses.

The more you try to avoid losses the more you create losses, a very frustrating paradox indeed.

Paper trade, until you have a solid record of profits.

These fears are also present when you paper trade, you will eventually learn to recognize and neutralize them. Use a print screen program and capture your charts, bar by bar for daily review.

There is a sky, illuminating us, Someone is out there, that we truly trust, There is a rainbow, for you and me, A beautiful sunrise, eternally.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关于本站 | 隐私政策 | 免责条款 | 版权声明 | 联络我们 | 刊登广告 | 转手机版 | APP下载

Copyright © 2001-2013 海外华人中文门户:倍可亲 (http://www.backchina.com) All Rights Reserved.

程序系统基于 Discuz! X3.1 商业版 优化 Discuz! © 2001-2013 Comsenz Inc. 更新:GMT+8, 2018-9-20 14:04

倍可亲服务器位于美国圣何塞、西雅图和达拉斯顶级数据中心,为更好服务全球网友特统一使用京港台时间

快速回复 返回顶部 返回列表