PureBytes Links
Trading Reference Links
|
Bill
The ticker that is generated using your approach is not the "short"
of the original ticker. For example, RYURX is equivalent to
1x "short" for the SP-500. So, what I am trying to do is generate a
short ticker (similar to RYURX) using the SP500 as the basis for the
calculations, but instead of a mutual fund, I want OHLC data for the
short fund. From other code I have seen, I think my method of
calculating the inverse fund is close, but still needs some work.
Thanks
Larry
--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <fimdot@xxx> wrote:
>
> If I understand what you want (i.e., "short ticker" = 1/QQQQ) then
there should be no problem. See screen shot below showing plot of
QQQQ and 1/QQQQ. If this is your definition of "short ticker" and
are not getting it then there is something wrong with your code. If
this is not what you want then take another shot at explaining.
>
>
>
> Bill
>
> ----- Original Message -----
> From: "onelkm" <LKMCD1@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, July 18, 2007 12:10 PM
> Subject: [amibroker] Re: Creating a "short" ticker
>
>
> > Thanks Bill but using xO = 1/foreign("symbol", "open")..... does
not
> > produce the correct "short" ticker.
> > Larry
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <fimdot@> wrote:
> >>
> >> One way is to use foreign():
> >>
> >> xO = 1/foreign("symbol", "open");
> >> xH = ...
> >> xL = ...
> >> xC = ...
> >>
> >> plotOHLC(xO, ...
> >>
> >> Bill
> >>
> >> ----- Original Message -----
> >> From: "onelkm" <LKMCD1@>
> >> To: <amibroker@xxxxxxxxxxxxxxx>
> >> Sent: Wednesday, July 18, 2007 9:45 AM
> >> Subject: [amibroker] Creating a "short" ticker
> >>
> >>
> >> >I want to create a short ticker that is the inverse of QQQQ for
> >> > example. Some of the inverse ETF's that are now available do
not
> > have
> >> > much history, so I want to calculate the inverse ticker based
on
> > the
> >> > long ticker. Here is what I have so far, but it is not totally
> >> > correct since the open is always higher than the high for the
> > day.
> >> > Any suggestions?
> >> > Thanks
> >> > Larry
> >> >
> >> > Buy=1;
> >> > j = Cum(-(log10(C) - log10(Ref(C, -1))));
> >> > k = Cum(-(log10(O) - log10(Ref(O, -1))));
> >> > m = Cum(-(log10(H) - log10(Ref(H, -1))));
> >> > n = Cum(-(log10(L) - log10(Ref(L, -1))));
> >> > jReal = 10 ^ j;
> >> > kReal = 10 ^ k;
> >> > mReal = 10 ^ m;
> >> > nReal = 10 ^ n;
> >> > Plot(jReal,"j",colorWhite,styleLine);
> >> > AddToComposite(jReal ,"~qst","C",1+2+8+16);
> >> > AddToComposite(kReal ,"~qst","O",1+2+8+16);
> >> > AddToComposite(mReal ,"~qst","H",1+2+8+16);
> >> > AddToComposite(nReal ,"~qst","L",1+2+8+16);
>
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|