PureBytes Links
Trading Reference Links
|
Hi,
I use mostly QP data and when I run code containing "SectorID(1)", such as
that below, I get:
SectorID is outside of correct range (0..63), possibly
sector/industry assignments are incorrect
I don't have problems with code containing "SectorID(0)".
It may be because lots of my symbols have "-1" for Sector ID. (eg, from QP:
!SPX, CVW; from Yahoo: ^RUT; from MSN: $VIX).
Do I have incorrect assignments and/or does anyone know how to get around
this problem?
thanks,
-john
----- Original Message -----
From: "sgfuchs" <sgfuchs@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, August 05, 2004 3:35 PM
Subject: [amibroker] Re: Composite Index Help
Hello Dave
For sector composites use :
sym="~"+SectorID(1);
AddToComposite(L,sym,"L");
AddToComposite(O,sym,"O");
AddToComposite(H,sym,"H");
AddToComposite(C,sym,"C");
AddToComposite(V,sym,"V");
Buy=Sell=Short=Cover=0;
Filter=1;
For Industrygroup composites use :
sym="~"+IndustryID(1);
AddToComposite(L,sym,"L");
AddToComposite(O,sym,"O");
AddToComposite(H,sym,"H");
AddToComposite(C,sym,"C");
AddToComposite(V,sym,"V");
Buy=Sell=Short=Cover=0;
Filter=1;
Simply run a scan with either of the formulas. No Group filters or so
- just scan on the whole database.
You should find all composites in Groups folder 253.
For updating, run the scan everytime after updating your database.
This should do the trick, provided your data source is not corrupted
or full of dataholes.
I'm using AB 4.6 beta with TC2000 database and it works very well.
regards
Stefan
--- In amibroker@xxxxxxxxxxxxxxx, "davelansing2004" <d.ankrapp@xxxx>
wrote:
>
> Hi Dimitris,
>
> I've read the user's guide and also Herman's file on the multiple
> uses of the AddToComposite function.. with that said, I copied a very
> simple code that Tomasz had written to calculate composites for
> Sectors (I replaced the Sectors ID with Industry ID):
>
> sym = "~"+IndustryID(1);
> AddToComposite(C,sym,"X",27);
> AddToComposite(1,sym,"I",27);
> y = Foreign(sym,"X")/Foreign(sym,"I");
> Plot(y,sym,8);
>
> Basically, the composite plots are very erratic; there are large
> spikes in the plots day-to-day, and the plots basically oscillate
> without apparent trends... I know that the underlying data is good..
> I purchase EOD data from Reuters...so my question is how to normalize
> the data so that it's similar to the Dow Jones Indices...thanks!
>
> Dave
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/
|