PureBytes Links
Trading Reference Links
|
<SPAN
class=525151622-26112003>Hi Paul, glad if you found the auto-optimization thing
useful, or at least an interesting exploration.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>The optimization logic is actually really simple.
During optimization, it cycles through all requested parameter combinations,
calculating equity for each one, and keeping track of the best performing
combination for each bar. When that's done, it runs the strategy once more,
using the values for each bar that delivered the best
equity.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>A couple of things fall out of that that are relevant
to your question. First, neither the entry or exit are specifically
optimized for, just overall equity. Second, the active trading rule has only one
set of parameters on any given bar. They change over time, but there's only ever
one "copy" of the rule running, giving off whatever signals it does.
W<SPAN
class=525151622-26112003>hatever positions are entered, exited, or held, it's
all in response to that single set of signals. Individual positions aren't
managed at all.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>You're right that a held position can be dumped
unceremoniously if the indicator changes parameter settings. That's just how
this works. A completely different design would be required to have each
position separately maintain the parameter values that were in effect when it
was entered.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>FWIW, it's not clear that that would be the right thing
anyway. If the market "accelerates" or "decelerates", to use a simplistic
example, why would it be correct for some securities not to evolve too, just
because they happened to be held when the change occurred?
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>If you run it as an exploration, you can compare
the parameter values chosen and the buy/sell dates. I think you'll see that
changes values does sometimes result in immediate sells, but nothing like
always.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>Just FYI, I have an updated version of the framework
that I haven't published yet. It handles three optimizable parameters instead of
two, allows each trading rule to set the range and step of the optimization
parameters itself (so you don't have to edit the framework configuration as
often when you change rules, or keep track of what ranges work well for each
rule), lets you globally
<SPAN
class=525151622-26112003>allow long trades, short, or both<SPAN
class=525151622-26112003>, optionally exiting when a signal occurs on the
side not taken. It also contains more utility functions and sample trading
rules. Alas though, it does not contain the Holy Grail.
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>HTH,
<SPAN
class=525151622-26112003>
<SPAN
class=525151622-26112003>Dave
<BLOCKQUOTE
>
I have been
playing with this fine piece of code you wrote. Very impressive. I
was going to code this myself until I remembered you had posted this in
October. You are right that it does not seem to be very profitable for
most systems but one thing I did notice was that the system seems to optimize
the entry and exit of a trade at separate times and not at the time the trade
is entered. What I am trying to say is that there should be an option to
optimization before entering and/or after exiting a trade and not in the
middle. This way the trade parameters are defined when it is
entered. If I am wrong on this then let me know but if I am correct then
maybe you could give me some hints on how to change this. The code is a
little overwhelming. If you don't have the time, not a problem, I
will figure it out eventually.
<FONT face=Arial
size=2>
<FONT face=Arial
size=2>Paul.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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.
|