PureBytes Links
Trading Reference Links
|
I happen to know that Makridis has quite a few difficulties with the English
language,
so please accept my apologies on his behalf and let me do the translation
for him:
-----------------------------------------
Spyro good morning
1. I would like to ask what is its difference from the one below?
(Translator's note: Here Makridis probably asks about the difference between
my version
and this one:)
DayOfWeek()= 5 AND DayOfMonth()>14 AND DayOfMonth()< 22
2. I will also need your help with this
z:=DayOfWeek()= 5 AND DayOfMonth()>14 AND DayOfMonth()< 22;
{It returns the 3rd Friday}
q:=ROC(C,LastValue(BarsSince(z)),$);{it returns not only
the change since 3rd Friday but also since all the preceding ones.
For this reason I am looking for a formula that will provide only the LAST
change since 3rd Friday, ignoring all others}
x:=Abs(ValueWhen(1,z, Cum(1))-Cum(1));{it returns the number of days between
successive 3rd Fridays}
100*z;
q;
x;.
---------End of translation-------------
Makridis also contacted me privately, and I had already the chance to answer
him.
In case the group is interested, here are some of my remarks:
1. While the code line
DayOfWeek()= 5 AND DayOfMonth()>14 AND DayOfMonth()< 22
correctly marks every 3rd Friday, it does not handle those cases where the
3rd Friday is absent (the market happens to be closed, or there are missing
dates
in our data). In such cases one will still need an expiration date for
his/her
calculations. This is what I tried to confront with that formula of mine,
which
if it doesn't find a 3rd Friday then it marks the next available bar. I
think that
the code I provided is quite easy to follow, as it is not as compact as it
could
(and should) be.
2. The change in points since last 3rd Friday can be expressed like this:
Close - ValueWhen(1, 3rdFriday, Close);
where 3rdFriday is a separate formula we call, or a variable like my own
"expir" inside the same formula as Makridis wishes.
3. If we need the number of bars since last 3rd Friday, we can say
BarsSince(3rd Friday);
Two remarks though (maybe unnecessary, but I will make them anyway):
a. MS deals with number of bars, not number of days as the derivatives do.
b. This code counts bars back (since last 3rd Friday), not bars ahead
(till next 3rd Friday) as we would probably wish it did, for our derivatives
calculations sake.
With the above I am not implying that this information is not useful.
Quite the contrary, I believe.
I guess you've already noticed some improvement in your Greek, don't you?
Spyros
(Raftopoulos)
Message: 8
Date: Fri, 21 Feb 2003 11:47:25 +0200
From: "Makridis Spyros" <MAKRISPY@xxxxxxxxx>
Subject: Re: RE:Re: 3rd Friday
&Sgr;&pgr;&ugr;&rgr;&ogr; &kgr;&agr;&lgr;&eegr;&mgr;&egr;&rgr;&agr;
1.&THgr;&agr; &eegr;&thgr;&egr;&lgr;&agr; &ngr;&agr; &rgr;&ohgr;&tgr;&eegr;&sgr;&ohgr; ,&tgr;&igr; &dgr;&igr;&agr;&phgr;&ogr;&rgr;&agr; &egr;&khgr;&egr;&igr; &agr;&pgr;&ogr; &tgr;&eegr;&ngr; &kgr;&agr;&tgr;&ohgr;&thgr;&igr;;
DayOfWeek()= 5 AND DayOfMonth()>14 AND DayOfMonth()< 22
2.&Egr;&pgr;&igr;&sgr;&eegr;&sfgr; &agr;&ngr; &mgr;&pgr;&ogr;&rgr;&egr;&igr;&sfgr; &dgr;&ohgr;&sgr;&egr; &mgr;&ogr;&ugr; &tgr;&eegr;&ngr; &bgr;&ogr;&eegr;&thgr;&egr;&igr;&agr; &sgr;&ogr;&ugr; &ggr;&igr;&agr; &tgr;&ogr; &egr;&xgr;&eegr;&sfgr;
z:=DayOfWeek()= 5 AND DayOfMonth()>14 AND DayOfMonth()< 22;{&ggr;&rgr;&agr;&phgr;&egr;&igr; &tgr;&eegr;&ngr; 3&eegr;
&Pgr;&agr;&rgr;&agr;&sgr;&kgr;&egr;&ugr;&eegr;}
q:=ROC(C,LastValue(BarsSince(z)),$);{&ggr;&rgr;&agr;&phgr;&egr;&igr; &tgr;&eegr;&ngr; &mgr;&egr;&tgr;&agr;&bgr;&ogr;&lgr;&eegr; &agr;&pgr;&ogr; &tgr;&eegr;&ngr; &tgr;&egr;&lgr;&egr;&ugr;&tgr;&agr;&igr;&agr;
3&eegr; &Pgr;&rgr;&agr;&sgr;&kgr;&egr;&ugr;&eegr; &mgr;&egr;&khgr;&rgr;&igr; &sgr;&eegr;&mgr;&egr;&rgr;&agr;,&Agr;&Lgr;&Lgr;&Agr; &kgr;&agr;&igr; &agr;&pgr;&ogr; &ogr;&lgr;&egr;&sfgr; &tgr;&igr;&sfgr; &pgr;&rgr;&ogr;&eegr;&ggr;&ogr;&ugr;&mgr;&egr;&ngr;&egr;&sfgr;.
&Ggr;&igr;&agr;&ugr;&tgr;&ogr; &psgr;&agr;&khgr;&ngr;&ohgr; &ngr;&agr; &bgr;&rgr;&ohgr; &egr;&kgr;&egr;&igr;&ngr;&eegr; &tgr;&eegr;&ngr; formula &pgr;&ogr;&ugr; &thgr;&agr; &agr;&pgr;&egr;&igr;&kgr;&ogr;&ngr;&igr;&zgr;&egr;&igr; &egr;&pgr;&agr;&ngr;&ohgr; &sgr;&tgr;&ogr; chart
&mgr;&ogr;&ngr;&ogr; &tgr;&eegr;&ngr; &Tgr;&Egr;&Lgr;&Egr;&Ugr;&Tgr;&Agr;&Igr;&Agr; &mgr;&egr;&tgr;&agr;&bgr;&ogr;&lgr;&eegr; &agr;&pgr;&ogr; &tgr;&eegr;&ngr; &tgr;&egr;&lgr;&egr;&ugr;&tgr;&agr;&igr;&agr; 3&eegr; &Pgr;&agr;&rgr;&agr;&sgr;&kgr;&egr;&ugr;&eegr;,&agr;&ggr;&ngr;&ogr;&ohgr;&ngr;&tgr;&agr;&sfgr; &tgr;&igr;&sfgr;
&pgr;&rgr;&ogr;&eegr;&ggr;&ogr;&ugr;&mgr;&egr;&ngr;&egr;&sfgr;}
x:=Abs(ValueWhen(1,z, Cum(1))-Cum(1));{&ggr;&rgr;&agr;&phgr;&egr;&igr; &tgr;&ogr;&ngr; &agr;&rgr;&igr;&thgr;&mgr;&ogr; &tgr;&ohgr;&ngr; &eegr;&mgr;&egr;&rgr;&ohgr;&ngr; &mgr;&egr;&tgr;&agr;&xgr;&ugr;
&dgr;&igr;&agr;&dgr;&ogr;&khgr;&igr;&kgr;&ohgr;&ngr; 3&ohgr;&ngr; &Pgr;&agr;&rgr;&agr;&sgr;&kgr;&egr;&ugr;&ohgr;&ngr;}
100*z;
q;
x;.
&Sgr;&pgr;&ugr;&rgr;&ogr;&sfgr;
----- Original Message -----
From: "SR" <raftsp@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Thursday, February 20, 2003 5:41 PM
Subject: [Metastockusers] RE:Re: 3rd Friday
> What about the missing 3rd Fridays?
> In my data there are many of them. If you like you can compare the two
> indicators to locate missing monthly expiration dates in your own data.
> In such cases this version will mark the next available bar.
>
> {***3rd Friday***}
>
> newweek:=DayOfWeek()<Ref(DayOfWeek(),-1);
> expir:=
> (DayOfWeek()=5 AND
> DayOfMonth()>14 AND
> DayOfMonth()<22)
> OR
> (Ref(DayOfWeek(),-1)=4 AND
> Ref(DayOfMonth(),-1)>13 AND
> Ref(DayOfMonth(),-1)<21 AND newweek)
> OR
> (Ref(DayOfWeek(),-1)=3 AND
> Ref(DayOfMonth(),-1)>12 AND
> Ref(DayOfMonth(),-1)<20 AND newweek)
> OR
> (Ref(DayOfWeek(),-1)=2 AND
> Ref(DayOfMonth(),-1)>11 AND
> Ref(DayOfMonth(),-1)<19 AND newweek)
> OR
> (Ref(DayOfWeek(),-1)=1 AND
> Ref(DayOfMonth(),-1)>10 AND
> Ref(DayOfMonth(),-1)<18 AND newweek) ;
>
> expir
> {****************}
>
> Spyros
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|