[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Scheduling Scan Automatically?



PureBytes Links

Trading Reference Links

Hi Graham & DT,

Thanks so much you guys.  I am finally able to test this and get
numbers that make sense, and to find the point of diminishing
returns.  And my headache is gone.  ^^_^^

I don't suppose either one of you would be surprised that I majored
in Japanese literature, and not mathematics, would you . . . (^_-)

Rest assured I shall save all these posts for future headaches.

Yuki

Saturday, July 31, 2004, 4:59:08 PM, you wrote:

G> Yuki If something is true when 2 conditions exist, then reversing
G> both conditions does not make the inverse something true.
G> Confusing, yes. :) Another way is that you must also take into
G> account all 4 condition options. It takes 3 options to invert 1
G> option 1st option   >= and >= 2ndoption   >= and < 3rd option   <
G> and >= 4th option   < and <

G> to invert the 1st then you must specify all of the remaining 3 options.

G> A simpler way is just to say "Not option 1" like this


G> AND not ( (Ref(Foreign("^225", "Close"),-1) >=
G> Ref(Foreign("^225","Close"),-2) * 1.01 AND Ref(Foreign("^IXJ",
G> "Close"),-1) >= Ref(Foreign("^IXJ", "Close"),-2) * 1.01)  );



G> Cheers,
G> Graham
G> http://e-wire.net.au/~eb_kavan/

G> -----Original Message-----
G> From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx] 
G> Sent: Saturday, July 31, 2004 12:12 PM
G> To: amibroker@xxxxxxxxxxxxxxx
G> Subject: [amibroker] logic problem

G> I have a system than runs short term trades, both long and short.  I
G> notice that on days when the market is very strong, say the Nikkei
G> AND TOPIX are both up more than 1 percent (I'll use 1.1 percent in
G> the example to follow), taking short signals generated by my system
G> the next day is ill advised.

G> I prove this by appending the following to my short statement:

G> AND (Ref(Foreign("^225", "Close"),-1) >=
G> Ref(Foreign("^225","Close"),-2) * 1.01 AND Ref(Foreign("^IXJ",
G> "Close"),-1) >= Ref(Foreign("^IXJ", "Close"),-2) * 1.01);

G> (^225 is the symbol for the Nikkei 225 and ^IXJ is the symbol for the
G> TOPIX)

G> Now, the system ONLY takes shorts in the case I outlined in the first
G> paragraph (market was quite powerful the day before), and the shorts
G> are a losing proposition. Ever slightly more losers, and losers
G> average larger than winners, and the return on shorting is negative.

G> I am not at all surprised.  The total number of shorts involved here
G> is rather small, 23 out of 323 shorts when I don't worry at all about
G> the previous day's market direction or strength.  I am also not
G> surprised it is a small number.  That kind of volatility (market up
G> strongly one day but large cap stocks signalling short on my system
G> the next day) is not that common.  But eliminating any unprofitable
G> element from a profitable system makes a good system even better.

G> However, when I run what I think is the reverse of this, appending
G> the following to the short statement in an attempt to eliminate
G> *only* those 23 shorts . . .

G> AND (Ref(Foreign("^225", "Close"),-1) <
G> Ref(Foreign("^225","Close"),-2) * 1.01 AND Ref(Foreign("^IXJ",
G> "Close"),-1) < Ref(Foreign("^IXJ", "Close"),-2) * 1.01);

G> . . . I end up eliminating 118 short trades (number of shorts is now
G> 205 versus 323).  And the total return is now lower than it is with
G> the plain vanilla system, run with no reference to the previous day's
G> indices. Obviously, I am losing too many good shorts, in addition to
G> the 23 that I want to lose.  Otherwise, I should be money ahead if I
G> have a profitable system that I have just subtracted an unprofitable
G> element from.  But I'm cutting out more than I want to.

G> So, before I lose my mind ^_^ can someone give me an idea where I
G> might look to find the reason that so many short trades are
G> evaporating on the second example?  All trades are either 2-bar or
G> 3-bar trades.  I cannot understand why there is such a discrepancy.

G> In all three cases . . . (completely unmodified, taking only the
G> expected bad shorts, and trying to eliminate only the known bad
G> shorts) the number of long trades does not vary by a single trade --
G> there are always 548 long trades in each case.  So it's not a matter
G> of interaction between the long and short sides, and not a matter of
G> not enough cash or anything simple like that.  Whatever it is though,
G> my head doesn't get it, and I need some help.

G> Yuki (who has a headache from tying to figure this out)





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/