PureBytes Links
Trading Reference Links
|
Hi Natasha,
Re the warmer climes - I have lived most of my life in New England. Nice
place, but I am getting tired of the cold and snow. I guess I would like to
optimize more than just my indicators : - )
Re the DLL - You can find it in the folder "Steve Dugas" in the files
section of the Amibroker-AFL Yahoo group. I will just mention a couple of
things though:
1. I have not used or maintained it in a year or more, and AB has undergone
many changes during this time. I can't say for sure whether it still works.
2. More importantly, you don't really need it anymore. I wrote it before TJ
incorporated looping and program control features into native AFL. At the
time, you couldn't do it in AFL, and scripting languages were very slow. But
now, it is much simpler and more flexible to just write it in AFL. Here is a
small example that TJ provided a while back for a simple optimization loop.
Happy trading!
Steve
bestequity = 0;
bestrange = 0;
// optimization loop
for( range = 12; range < 40; range ++ )
{
Buy = Cross( Close, EMA( Close, range ) );
Sell = Cross( EMA( Close, range ), Close );
Le = LastValue( Equity() );
if( Le > bestequity )
{
bestequity = Le;
bestrange = range;
}
}
range = bestrange;
Buy = Cross( Close, EMA( Close, range ) );
Sell = Cross( EMA( Close, range ), Close );
Filter = BarIndex() == BarCount - 1;
AddColumn( bestrange, "Best range" );
AddColumn( Equity(), "Best Equity" );
----- Original Message -----
From: "Natasha !!" <dynomitedoll_ddd@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, April 05, 2005 11:50 PM
Subject: Re: [amibroker] Re: Optimizing & Robustness of single parameters
>
>
> Hello ,
> I am currently in that phase of trading system development where i
> am putting stress on Optimisation of the systems i have got ready
> .Unfortunately some of the systems which are showing extremely very
> good returns on a sustained long term basis are also showing terrific
> drawdowns during a very few stages which would give anyone butterflies
> .I would like to evaluate your Optimisation DLL .Any link to the same
> would be nice.
> (In Jest)-Is it necessary to go to warmer climes for full time
> trading.I mean we are not migratory birds though we may migrate
> between currencies , stocks ,gold , silver , lean hogs , cotton etc
> etc.I stay in extremely cold conditions a few months of the year where
> temps are sometimes below freezing .Currently weather here is fine and
> sunny and just right for some OPtimisation.
> Thanks for the info.
>
> --- N !!
>
> --- Steve Dugas <sjdugas@xxxxxxxxxxx> wrote:
>
>> Hi Fred,
>>
>> I have seen you refer to "intelligent optimization" in previous
>> messages.
>> Honestly, I can't claim to know very much about it, but I am guessing
>> that
>> you have determined your PSO approach to be the most feasible method
>> of
>> attacking this for the time being? I downloaded your original version
>> when
>> you first posted it, but have not been able to look at it yet.
>> Unfortunately, with a full-time job and the need to concentrate on my
>> trades
>> at night, I had to pretty much abandon the idea of exploring new
>> approaches
>> a while back due to lack of time.
>>
>> The good news (for me, anyway :-) is that within a month or two, I
>> will
>> have moved on to warmer climes and full-time trading, at which point
>> I will
>> be able to resume coding on a few ideas that I have.
>>
>> I am actually very interested in optimization. You may recall that I
>> wrote a
>> DLL a year or two ago which automatically returns the optimal value
>> of
>> several built-in indicators for each individual stock. At the time,
>> this
>> approach was roundly denounced by some of the more experienced
>> traders, and
>> in fact, I actually tried it for a while, with only mediocre results.
>> But
>> based on these results, I have some ideas/plans for refining and
>> backtesting
>> this approach, which I have put on hold for now because it looks like
>> a
>> major coding job. The results, of course, remain to be seen, but when
>> the
>> time comes, I would be very interested in hearing your opinion and,
>> if you
>> think you might be interested, possibly getting your feedback on ways
>> to
>> improve it via these intelligent optimization and/or sensitivity
>> testing
>> methods. OK, getting late now here, time to look at some charts.
>> Thanks
>> again for the code below, and looking forward to your response!
>>
>> Steve
>>
>> ----- Original Message -----
>> From: "Fred" <ftonetti@xxxxxxxxxxxxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Tuesday, April 05, 2005 12:10 AM
>> Subject: [amibroker] Re: Optimizing & Robustness of single parameters
>>
>>
>> >
>> >
>> > The next for systems w/more then 2 parameters where exhaustive
>> search
>> > is not feasible is to incorporate sensitivity testing of parameter
>> > values in the optimization process so that one winds up with a
>> > relatively insensitive group of parameter values. This IS doable
>> > using an intelligent optimization process.
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx>
>> wrote:
>> >> Thanks Fred - very nice idea!
>> >>
>> >> FWIW, I just realized that Herman sent the code for his graphs in
>> a
>> >> follow-up message to the original. Here it is for anyone that
>> might
>> > be
>> >> interested.
>> >>
>> >> Steve
>> >>
>> >> ----- Original Message -----
>> >> From: "Fred" <ftonetti@xxxx>
>> >> To: <amibroker@xxxxxxxxxxxxxxx>
>> >> Sent: Monday, April 04, 2005 9:22 PM
>> >> Subject: [amibroker] Re: Optimizing & Robustness of single
>> > parameters
>> >>
>> >>
>> >> >
>> >> >
>> >> > For systems with a single parameter this is of course fine ...
>> >> >
>> >> > For systems with more then 2 two parameters where the 3d plots
>> > are no
>> >> > longer of great use it's a simple matter to generate random data
>> >> > points in the +/- n% range of what appears to be the optimum
>> > value to
>> >> > see how sensitive or not the parameter values actually are i.e.
>> >> >
>> >> > Original System where the default values are assumed to be
>> optimum
>> >> > but sensitivity is unknown ...
>> >> >
>> >> > X = Optimize("X", 10, 1, 20, 1);
>> >> > Y = Optimize("Y", 100, 1, 200, 1);
>> >> > Z = Optimize("Z", 1000, 1, 2000, 1);
>> >> >
>> >> > Sensitivity Tester for +/- 10%
>> >> >
>> >> > Senstivity = Optimize("Sensitivity", 1, 1, 5000, 1);
>> >> >
>> >> > X = Round((Random() - 0.5) * 2.99) + 10;
>> >> > Y = Round((Random() - 0.5) * 20.99) + 100;
>> >> > Z = Round((Random() - 0.5) * 200.99) + 1000;
>> >> >
>> >> > The results based on whatever fitness metric interests you can
>> be
>> >> > observed and sorted in the output of optimization and/or can be
>> >> > exported for further statistical analysis (distribution) in
>> Excel.
>> >> >
>> >> > --- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx>
>> > wrote:
>> >> >> Hi Natasha,
>> >> >>
>> >> >> Here is the entire message intact, with thanks to Herman.
>> >> >>
>> >> >> Steve
>> >> >>
>> >> >>
>> -----------------------------------------------------------------
>> > --
>> >> >>
>> >> >> In addition to using 3D surface maps to evaluate the Robustness
>> > of
>> >> > two or more parameters you may consider assessing the Robustness
>> > and
>> >> > across-market dependency of single parameters over a Watch list.
>> >> >>
>> >> >> You can do this by superimposing equity lines for different
>> >> > parameter values to see whether they track over time (fan-out) .
>> > This
>> >> > is a far better method for evaluating systems and finding stocks
>> > than
>> >> > picking a high equity from the Optimization result table. If the
>> >> > equity ratios remain approximately constant your parameters are
>> > more
>> >> > Robust than if the Equities do not track.
>> >> >>
>> >> >> In my example I use Steve Karnish's CMO5 system (symmetrical
>> >> > triggers). To test this method on your own trading system you
>> > should
>> >> > substitute your own code inside the curly brackets of the
>> System()
>> >> > function and substitute the variable named "TestParameter" for
>> the
>> >> > parameter you like to evaluate. Here is a typical chart showing
>> >> > robust behavior:
>> >> >>
>> >> >>
>> >> >>
>> >> >> Here is a chart for a system that may be over optimized and
>> lacks
>> >> > robustness:
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> Things to look for:
>> >> >>
>> >> >> 1) Over-optimization: High profits but Equity lines move all
>> over
>> >> > the place.
>> >> >> 2) Robustness: Equity lines "fanout" keeping the system
>> > profitable
>> >> > under most TestParameter values
>> >> >> 3) Synchronized dips; if all equities dip you can create an
>> > Equity-
>> >> > composite and use it to qualify signals.
>> >> >> 4) Stepping through the stocks in you workspace you can observe
>> >> > stock-synchronization
>> >> >> 5) Is the optimum value optimum over time?
>> >> >> 6) Straight equity lines
>> >> >>
>> >> >> Happy trading,
>> >> >>
>> >> >> Herman
>> >> >>
>> >> >>
>> >> >> Yahoo! Groups Sponsor
>> >> >> ADVERTISEMENT
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> Send BUG REPORTS to bugs@xxxx
>> >> >> Send SUGGESTIONS to suggest@xxxx
>> >> >> -----------------------------------------
>> >> >> Post AmiQuote-related messages ONLY to:
>> amiquote@xxxxxxxxxxxxxxx
>> >> >> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>> >> >> --------------------------------------------
>> >> >> Check group FAQ at:
>> >> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>> >> >>
>> >> >> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>> >> > Service.
>> >> >>
>> >> >> ----- Original Message -----
>> >> >> From: Natasha !!
>> >> >> To: amibroker@xxxxxxxxxxxxxxx
>> >> >> Sent: Monday, April 04, 2005 1:02 PM
>> >> >> Subject: [amibroker] Optimizing & Robustness of single
>> > parameters
>> >> >>
>> >> >>
>> >> >> Hi,
>> >> >> Just going over the archieves and i dug out a mail i
>> > didnt
>> >> > quite well understand:
>> >> >> Since the attachments are not stored in the usergoups any
>> graph
>> >> > to illustrate the same would be much obliged;
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >> -- N !!
>> >> >>
>> >> >>
>> >> >> In add From: "Herman van den Bergen" <psytek@>
>> >> >> Date: Thu Sep 4, 2003 9:44 am
>> >> >> Subject: Optimizing & Robustness of single parameters ition
>> to
>> >> > using 3D surface maps to evaluate the Robustness of two or more
>> >> > parameters you may consider assessing the Robustness and across-
>> >> > market dependency of single parameters over a Watch list.
>> >> >>
>> >> >> You can do this by superimposing equity lines for different
>> >> > parameter values to see whether they track over time (fan-out) .
>> > This
>> >> > is a far better method for evaluating systems and finding stocks
>> > than
>> >> > picking a high equity from the Optimization result table. If the
>> >> > equity ratios remain approximately constant your parameters are
>> > more
>> >> > Robust than if the Equities do not track.
>> >> >>
>> >> >> In my example I use Steve Karnish's CMO5 system (symmetrical
>> >> > triggers). To test this method on your own trading system you
>> > should
>> >> > substitute your own code inside the curly brackets of the
>> System()
>> >> > function and substitute the variable named "TestParameter" for
>> the
>> >> > parameter you like to evaluate. Here is a typical chart showing
>> >> > robust behavior:
>> >> >>
>> >> >> Chart for the above and for the below
>> >> > explanation.Thanks ???
>> >> >>
>> >> >> Here is a chart for a system that may be over optimized and
>> > lacks
>> >> > robustness:
>> >> >>
>> >> >>
>> >> >>
>> >> >> Things to look for:
>> >> >>
>> >> >> 1) Over-optimization: High profits but Equity lines move all
>> > over
>> >> > the place.
>> >> >> 2) Robustness: Equity lines "fanout" keeping the system
>> >> > profitable under most TestParameter values
>> >> >> 3) Synchronized dips; if all equities dip you can create an
>> >> > Equity-composite and use it to qualify signals.
>> >> >> 4) Stepping through the stocks in you workspace you can
>> observe
>> >> > stock-synchronization
>> >> >> 5) Is the optimum value optimum over time?
>> >> >> 6) Straight equity lines
>> >> >>
>> >> >> Happy trading,
>> >> >>
>> >> >> Herman
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> Warm regards,
>> >> >> Natasha !
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> -----------------------------------------------------------------
>> > ---
>> >> > ----------
>> >> >> Yahoo! Messenger
>> >> >> Show us what our next emoticon should look like. Join the
>> fun.
>> >> >>
>> >> >> Please note that this group is for discussion between users
>> > only.
>> >> >>
>> >> >> To get support from AmiBroker please send an e-mail directly
>> to
>> >> >> SUPPORT {at} amibroker.com
>> >> >>
>> >> >> For other support material please check also:
>> >> >> http://www.amibroker.com/support.html
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> -----------------------------------------------------------------
>> > ---
>> >> > ----------
>> >> >> Yahoo! Groups Links
>> >> >>
>> >> >> a.. To visit your group on the web, go to:
>> >> >> http://groups.yahoo.com/group/amibroker/
>> >> >>
>> >> >> b.. To unsubscribe from this group, send an email to:
>> >> >> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> >> >>
>> >> >> c.. Your use of Yahoo! Groups is subject to the Yahoo!
>> Terms
>> > of
>> >> > Service.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > Please note that this group is for discussion between users
>> only.
>> >> >
>> >> > To get support from AmiBroker please send an e-mail directly to
>> >> > SUPPORT {at} amibroker.com
>> >> >
>> >> > For other support material please check also:
>> >> > http://www.amibroker.com/support.html
>> >> >
>> >> >
>> >> > Yahoo! Groups Links
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > Please note that this group is for discussion between users only.
>> >
>> > To get support from AmiBroker please send an e-mail directly to
>> > SUPPORT {at} amibroker.com
>> >
>> > For other support material please check also:
>> > http://www.amibroker.com/support.html
>> >
>> >
>> > Yahoo! Groups Links
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>
>
> Warm regards,
> Natasha !
>
>
>
>
>
>
>
>
>
>
>
>
>
> __________________________________
> Yahoo! Messenger
> Show us what our next emoticon should look like. Join the fun.
> http://www.advision.webevents.yahoo.com/emoticontest
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|