Tharp's Thoughts Weekly Newsletter (View On-Line)

  • Article Curve Fitting by Thomas Krawinkel
  • Trading Education Workshops Feb-May
  • Trading Tip The Current Market Is Easier to Read Than Usual by D.R. Barton, Jr.
  • Offer No Shipping Cost on These Downloadable Items
  • Mailbag How to Identify the State of the Market When Trading a Particular Stock

$700 Discounts Expire TODAY, February 15th, on Two Sydney Workshops

A good foundation of trading know-how can vault a mediocre trader into a market maven, and Dr. Van K. Tharp has just the place for you to start on this journey to profitable trading. Learn more...


 

Curve Fitting

Sooner or later every trader runs across the term “curve fitting.” In this article I’d like to share my ideas on this topic and provide some food for thought.

According to Wikipedia, “Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints.” In my opinion there is one important point missing—or at least not explicitly stated—from this definition: knowledge about the data must have influenced the design process. If you don’t know where the data points are, you cannot curve fit.

Applied to the trading realm, this “curve or mathematical function” would be generated by the rule set of a trading system. The data points would consist of the system input (x-axis value) and the results (y-axis value) of a series of trades produced during the design process. Typically the initial outcome of those tests is not satisfactory. The developer will then modify the system rules until the performance reaches an acceptable level or discard the system altogether. This recursive process where information gained by the tests influences the definition of the system rules therefore constitutes curve fitting (see Figure 1).

1

Figure 1: System Design Process

Examples for rule changes:

  • Selecting numerical constants for calculations (after stepping through a range of values).
  • Adding true/false conditions (eliminates some losing trades, but allows winning trades to be taken).
  • Switching off the system in “Market Types” that showed unsatisfactory results (simply another filter).
  • Inclusion and exclusion of trading vehicles in the universe that the system is applied on.

At the very core, systematic trading is based on the belief that a certain price behavior is likely to repeat under defined conditions and thereby offers a trading opportunity with a positive expectancy. Once that repetition is recognized in the past and described as a trading system, it is assumed to continue (for “some” time) into the future. So by definition we have to examine the past and extract knowledge from it, thereby “curve fitting” our system to exactly that data.

So How Can We Avoid Curve Fitting in the System Development Process? We Cannot!

The real task, then, is not to eliminate curve fitting, but to understand curve fitting’s big risk and how to deal with it.

What is curve fitting’s primary risk? Expecting that the good system performance (“good” being relative) found with historical data will produce equally satisfying results in the future.  This fails to happen quite often and it’s hard to know how the results will come out.  Simply looking at a system’s rule set or at the number of changes made to those rules in the curve fitting process does not enable the system developer to confidently predict system performance with test data or in a live market.

At best, we can form qualified opinions about system performance and temper the risk of overly optimistic expectations by introducing the system to data that was not used during the design phase. If the results deteriorate significantly with new data, we run a high risk of seeing poor results in the future as well. Beware that the inverse logic does NOT apply here! You cannot prove that a system works because it generated good results on all available test data—you can only develop a certain degree of confidence that those results were not caused just by luck (an excellent read on this topic is Evidence-Based Technical Analysis by Prof. D. Aronson, pg. 217ff).

In order to verify a system, we need to make sure that we will have unused data left once the design process is over. It is also possible that we may decide to make rule changes if the verification leads to a significant deterioration of results. Unfortunately, all the data presented to the system up to that point will no longer qualify as “unused” and cannot serve for further verification. Therefore, before we even start the design process, we should plan how to divide the available data. The basic principle can be seen in Figure 2.

2

Figure 2: Data Slices for Design and Verification

Based on my experience, I would recommend splitting all available data into thirds, as a minimum, along two dimensions: time and universe of trading vehicles. I would also recommend segregating the data by purpose—design or verification—with the majority of data assigned to verification. You can see one such example of this division in Figure 3.

3

Figure 3: Recommended Data Split

The reasoning behind this way of slicing the data is threefold:

  1. By having more verification samples than design samples in either dimension I am able to “break any ties” (thus 3 by 3).
  2. Using samples from different time frames can help unveil performance changes caused by different market phases.
  3. Applying the system to different vehicles allows me to verify whether the rules really exploit a “general pattern” that should show up in other instruments as well. (Although it may be possible that a system works reliably on a few specific items, I prefer a broader application).

This approach can be difficult as either dimension can limit the data available for testing. Here are examples where that might occur:

  • Systems that act once a month or slower if applied to instruments with a relatively short span of existence (i.e., ETFs).
  • Systems that are applied to a very limited number of vehicles (i.e., indices, currencies, high volume stocks/ETFs).

Do good results stemming from backtests with these multiple data slices mean that we have eliminated or minimized the risk from curve fitting? Sadly, no. Most or all of your data can already be “burned” (invalidated) for verification purposes before you even start making any system changes. Here are a few examples of how this can happen:

  • You use someone else’s system as a starting point for your own work.
    Whatever data was used during their design process is no longer valid for your verification. It may turn out to be impossible, however, to learn the data sample used for testing from the original developer (and whether he based his design in turn on someone else’s).
  • You build your system around a published “edge” that was discovered through research that you trust (i.e., indicators, candlestick patterns, etc.).
    Again, the data used by the researcher no longer qualifies for validation purposes.
  • You design a system from scratch.
    Unfortunately, even your own experiences may unconsciously steer you in a direction that fits the past well. For example, during the hot phase of the internet bubble most people were probably designing systems to go LONG. Even when applying data from several years, almost any of those systems would have passed the verification phase with flying colors.

As explained above, using samples of unused historical data can help you to uncover negative effects of curve fitting to a certain degree. But knowledge about that data might already have found a way into the system’s design, so I highly recommend using one additional data slice: the future. The procedure of forward-testing is the only way to verify a system based on completely new data. Therefore forward testing should be mandatory for anyone who wants to trade a system.

In my opinion, “Curve Fitting” cannot be avoided, so it is useless to debate whether it is “bad” or not. Furthermore, to avoid the term altogether and use words like “tweaking”, “fine-tuning” or “adaptive” gives the impression that the risks that come from curve fitting don’t exist. They still do. We simply need to acknowledge that curve fitting is always present in the system development process and take the appropriate measures to deal with it:

  • Be aware of the various ways that curve fitting risk accumulates during the design process.
  • Examine what data may already be “burned” at the starting point of your development process.
  • Plan ahead to leave sufficient unused historical data for backtest verification.
  • Make a deliberate effort to keep the number of recursive design steps and alternative evaluations as low as you can (i.e., stepping through parameters, making rule changes, etc.).
  • Forward test your system over a significant sample size of trades as a final validation.

About the Author: With a focus on mechanical and fully-automated systems, in 2010 Thomas Krawinkel embarked on his journey to turn his passion for trading into a sustainable profession. Through his submission for NAAIM’s 2011 Wagner Award, for which he won first place, Thomas discovered the benefits of putting thoughts on paper. He hopes to spark discussions by writing articles for the VTI’s newsletter and welcomes any feedback as a further learning opportunity. You can reach him at TKrawinkel (at) GMX.DE.

 

Disclaimer »


Trading Education

Workshops

To Learn More About the Sydney Events, Click Here

Also Check Out the March Events with Ken Long in North Carolina

Feb
24-26

$2,295

$2,995

Blueprint for Trading Success
$700 Discount Expires Today

Sydney, AU
Feb 28- Mar 1

$2,295

$2,995

How to Develop a Winning Trading System
$700 Discount Expires Today

Sydney, AU
Mar
17-19

$2,295

$2,995

Peak Performance 101
Van Tharp's Signature Workshop

Sydney, AU
Mar
23-25

$3,295

$3,995

Mechanical Swing and Day Trading Systems

Ken Long is Back with Short-Term Systems

Cary, NC
Mar
26-30
Vary

Discretionary Swing and Day Trading Systems

Five Days of Live Trading with Ken Long

Cary, NC
 

 

Click here for combo pricing details on Ken Long's workshops. Cary, NC
Apr
21-22

$2,295

$2,995

Core Trading Systems: Market Outperformance and Absolute Returns

Longer Term Systems for Consistent Trading Profits

Cary, NC

Apr
24-26

$2,295

$2,995

Blueprint for Trading Success

Build the Foundation of Successful Trading

 
May
17-19

$2,295

$2,995

Peak Performance 101

Van Tharp's Signature Workshop

Cary, NC
May
21-24

$3,295

$3,995

Peak Performance 202

with Dr. Libby Adams

Cary, NC

To see our full workshop schedule including dates, prices, and location, click here.


Trading Tipdr

The Current Market Is Easier to Read Than Usual

Last week I wrote about the “Pop and Chop” nature of this market. Nothing has changed.

Last Wednesday and Thursday had small sideways ranges (see the hourly bar chart below). Before Friday’s open, the latest Greek bailout deal seemed to be falling apart, so we opened on a big gap down followed by a narrow range in the normal trading hours.

dr1

Over the weekend, the Greek parliament passed the austerity measures, and we gapped up at Monday's open, followed again by day within a tight range. On Valentine’s Day, more of the same: the market gapped down a bit after some overnight Greek civil unrest. Then the rest of the session saw a tight-range—even with the 10-point move in the last thirty minutes of the trading day.

Lather, rinse, repeat.  That is, at least for now.

As I said last week, this volatility compression will end. But when? And when will the market again make runs during regular US trading hours? Those questions are tough to answer, but some sign posts can help point the way.

The Current “Lines in the Sand”

There’s an important near-term support zone that’s easy to see on a chart. Let’s look at a daily chart of the very recent price action in SPY (the S&P 500 Exchange Traded Fund).

dr2

The high from Jan. 26th and the low from Feb. 7th form a very narrow 24-cent zone in the SPY that is clear support. If price breaks below that, the bears can gain control. In addition, with this small unfilled gap, we are set up for a potential Island Top reversal pattern if we gap down below it. These patterns are fairly rare in the indices and can be useful signs of reversals.

For resistance levels we have to look a lot further back than the last few weeks, or even the last few months. As you can see in the chart below, two levels from last summer give us critical information about further advancement.

dr3

The two levels are in close proximity to each other: the high for 2011 was made on May 2nd and the lower high came on July 7th. We are challenging the first of these two levels, which, if broken, will lead almost certainly to a test of last year’s high. That is where the real fun will come in. By then, if the Greek debt crisis has meaningfully progressed, look for a blow-off top above the high in the next few weeks. If whole European debt issue falls down the news chain a bit by then, we really could move even further along.

The market has cleverly crafted this little volatility consolidation island to give us the key to its direction. And while a head fake move is possible, recent market history says that the most prudent course of action will be to follow the breakout from this zone—either up or down.

As always, I’d love to hear your comments and feedback. Send them to drbarton “at” vantharp.com.

Great Trading,
D. R.

About the Author: A passion for the systematic approach to the markets and lifelong love of teaching and learning have propelled D.R. Barton, Jr. to the top of the investment and trading arena. He is a regularly featured guest on both Report on Business TV, and WTOP News Radio in Washington, D.C., and has been a guest on Bloomberg Radio. His articles have appeared on SmartMoney.com and Financial Advisor magazine. You may contact D.R. at "drbarton" at "vantharp.com".

 

Disclaimer »


Offer

No Shipping Costs on These Downloadable Items

The Intro to Position Sizing Strategies E-course $149

The Position Sizing Trading Simulation Game $195

The Investment Psychology Inventory Profile $100

Two Special Reports on Self-Sabotage $19.95 ea

Special Report Does Your System Still Work in Changing Markets? $19.95


Mailbag

How to Identify the State of the Market When Trading a Particular Stock

Q: Could you please clarify the material in one of the recent issues of Tharp's Thoughts (issue number 559, January 11th 2012)?

In this issue you mention that it is recommended to trade systems that match the current state of the market. You've also explained how to identify the state of the market using the All Ordinaries Index as an example. However, It is not clear how to identify the state of the market when trading particular stock. Should the SQN® score and the volatility of this particular stock be used? Or, on the contrary, should the market index be used?

A: Your question is excellent and prompted some thinking.

The answer is that it probably depends.

I would definitely always monitor the market type at the market level, that is a large component of any price movement at the individual issue level. In his workshops, Ken Long teaches this general guideline: a move of any stock is driven 50% by the market, 25% by the sector, and 25% by the company itself. The market is always a big factor in every stock's price.

Now, if you run scans on numerous issues and you get a setup/entry signal for a particular stock, you could follow the system rules and execute without knowing the individual stock's "market type." You only run each system in certain market types anyway, and that system's rules operating within a particular market type generate the expectancy.

If, however, you trade one particular stock every day, you might consider also watching that individual stock's market type as well as monitoring the market type for that stock's industrial sector. Researching this information would help you become more intimate with the price behavior, and this knowledge would help you trade the stock more effectively.

—RJ


Ask Van...

Everything that we do here at the Van Tharp Institute is focused around helping you improve as a trader and investor. Therefore, we love to get your feedback, both positive and negative!

Click here to take our quick, 6-question survey.


Also send comments or ask Van a question by using the form below.

Click Here for Feedback Form »

Back to Top


Contact Us

Email us [email protected]

The Van Tharp Institute does not support spamming in any way, shape or form. This is a subscription based newsletter.

To change your e-mail Address, click here

To stop your subscription look at the very bottom, left corner of this email and click on that link.

How are we doing? Give us your feedback! Click here to take our quick survey.



800-385-4486 * 919-466-0043 * Fax 919-466-0408

SQN® and the System Quality Number® are registered trademarks of the Van Tharp Institute

Back to Top

 

February 15, 2012 - Issue 564

VTI logo


 

ST expanded

A Must Read for All Traders

Super Trader

 


 

How are we doing?

Give us your feedback!

Click here to take our quick survey.

From our reader survey...
"I think the newsletter is extremely generous and it is a resource I utilize constantly. I have saved every single one since I first subscribed."

 


 

Trouble viewing this issue?

View On-line. »




 

Tharp Concepts Explained...

  • Psychology of Trading

  • System Development

  • Risk and R-Multiples

  • Position Sizing

  • Expectancy

  • Business Planning

Learn the concepts...

 


 

Read what Van says about the mission of his training institute.

 



The Position Sizing Game Version 4.0

Picking the right stocks has nothing to do with trading success and neither do amazing trading systems with high percentage wins. The Position Sizing Game teaches you the key elements of trading success. Learn more.

To Download for Free or Upgrade Click Here

game


Download the 1st three levels of Version 4.0 for free.

Register now. »

 


 

Trouble viewing this issue?

View On-line. »

 


 

tywff

 


A Thousand Names for Joy: A Commentary

You can read Super Trader Curtis Wee's full review here.


 

RECOMMENDED READING

For a list of recommended reading click here for our Amazon store.

 


 

Dr. Tharp is on Facebook

FACEBOOK


 

Follow Van through

Twitter »


Van Tharp Trading Education Products are the best training you can get.

products

Check out our home study materials, e-learning courses, and best-selling books.

Click here for products and pricing


 

What kind of Trader Are You? Click below to take the test.

Tharp Trader Test

 

Back to Top


 

Ecourse position sizing

Introduction to Position Sizing™ Strategies E-Learning Course

Only $149

Learn More

Buy Now


 

SQN® and the System Quality Number® are registered trademarks of the Van Tharp Institute