Thanks Brian. Those are very good points! I concur with Brian.

Hence my Q4:

What's a good objective function for using with any optimizer?

Intuitively there should be at least two objectives:

1. In the past (in-sample data), the performance should be the best (be it
Sharpe, or MDD, etc.)

2. In the future (out-sample data), the performance should still be
good(hopefully), i.e. there should be some sort of "staying power"...


Therefore, if we divide the whole data into three parts:

1. In-sample

2. Validation

3. Out-sample

Both part 1 and part 2 data are known at the time of optimization.

Then we can use part 1 and part 2 data to optimize for both "performance"
and "staying-power".

My questions are:

1. Does this procedure make sense?

2. What is a good measure for "staying power" on the "Validation" part of
data?

3. With two measures "performance" and "staying power", how do we weigh
them and transform them into one measure and therefore one objective
function.

Any thoughts?

Thanks a lot!








On Thu, Mar 8, 2012 at 8:41 AM, Brian G. Peterson <brian@braverock.com>wrote:

>
> On Thu, 2012-03-08 at 09:25 -0500, Zachary Mayer wrote:
> > There is the DEoptim<
> http://cran.r-project.org/web/packages/DEoptim/index.html>library
> > in r, which is an excellent library for differential evolution.  If
> > you can define your trading strategy in terms of a bunch of parameters to
> > adjust and an objective function (i.e. turn it into an optimization
> > problem), DEoptim will help you find the minimum (or maximum).
> >
> > DEoptim works well on non-differentiable problems with many local minima.
> >  Here is an example of using it to solve a portfolio optimization
> problem:
> >
> http://cran.r-project.org/web/packages/DEoptim/vignettes/DEoptimPortfolioOptimization.pdf
>
> Certainly DEoptim can be used for parameter optimization of a trading
> strategy.  Of course focusing on genetic algorithms to the exclusion of
> other global optimization algorithms may miss the larger challenges of
> optimizing trading system parameters.
>
> I think one of the biggest challenges in this space is the definition of
> an objective function to give to the optimizer.  What constitutes
> success? (and I'm sure your answer will vary widely from other answers
> to this question, not one size fits all).
>
> Another major challenge here is that parameter optimization gets into
> two 'hard' optimization problems: mixed integer problems, and
> multi-objective optimization.
>
> Most global optimizers use some random/directed selection in continuous
> floating point numbers.  Trading system parameters may be integers,
> factors, floating point, etc.  This poses some difficulty in fitting the
> optimizer's floating point parameters to the trading system.
>
> Also, you may actually have multiple objectives.  Maximize Returns and
> minimize risk, subject to some maximum drawdown.  This means that you
> need to optimize for all these objectives simultaneously.  In portfolio
> problems, this is reasonably well understood, see for example
> PortfolioAnalytics on R-Forge.  In trading system optimization, it is
> not nearly so clear how to create an appropriate penalized objective for
> the optimizer to work on.
>
> Regards,
>
>   - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

	[[alternative HTML version deleted]]

