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

RE: [amibroker] How to fix missing quotes (holes in the data)



PureBytes Links

Trading Reference Links

Title: How to fix missing quotes (holes in the data)

If you set a reference symbol in AA->Settings, Amibroker will automatically fill those holes for you by using the previous day's data. There are also some commands such as Foreign, that allow you to specify whether holes are fixed or not. I recommend always fixing them. Just be careful in case you have a database with US and, say Canadian stocks as the market holidays don't always match and holes will be filled that shouldn't be. Normally this wouldn't be an issue.

 

FOREIGN
- access foreign security data

Referencing other symbol data
(AFL 1.5)

 

SYNTAX

foreign( TICKER, DATAFIELD, fixup = 1)

RETURNS

ARRAY

FUNCTION

Allows referencing other (than current) tickers in the AFL formulas. TICKER is a string that holds the symbol of the stock. DATAFIELD defines which array is referenced. Allowable data fields: "open", "close", "high", "low", "volume", "interest".
The last parameter - fixup - accepts following values

  • 1 - default value - causes filling the holes in the data with previous values,
  • 0 - the holes are not fixed

 

--

Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of NW Trader
Sent: Friday, December 09, 2005 14:39
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] How to fix missing quotes (holes in the data)

 

Hi Dan,

 

Just a fast note to send you on a search.  A about a year or so ago, there was a discussion on this group about (and possibly some code written to)  "filling" in data in for days where there was no data or no trades were done.  I don't recall who was the moving contributor, but seem to think that Tomasz also commented and fixed something in AB to ignore such holes in data.  The coding fix I recall was to create synthetic data to fill the gap, perhaps by averaging the data on either side of the hole.  Not as good as actual data, but unless there was some wild activity on that day, this might suffice for filling in hundreds of symbols and/or days manually.  Of course, getting Gary to fix the QP data is preferable, however I'm still waiting for the rest of the data base cleanup to occur (all those undefined symbols between CYX K to LF9ZK which I have to manually delete after each refreshing of the AB QP database). 

 

I'll try to search my historical email archives this weekend to see if I can find the thread for you if no one else can recall the issue earlier. 

 

Peace and Justice   ---   Patrick

----- Original Message -----

From: Dan Clark

Sent: Friday, December 09, 2005 6:52 AM

Subject: [amibroker] How to fix missing quotes (holes in the data)

 

Hi,

In my Quotes Plus database, there are about 300 symbols with missing quotes.   Quotes Plus support has been notified (no response yet, though).   When (and if) they fix the problem, that will be great, but I’m not holding my breath. 

(To see a Quotes Plus data hole, chart “EMBT” and look for the 1/27/2005 daily bar.  It’s not there.)

In the meantime, I’m fixing the problem by editing the bad data in the QP database.  This is a VERY SLOW and painful process.   I need a better way…

The only two ways that I can think of are to 1) modify my AB code as a work-around or 2) programmatically update the QP native database.   (AFAIK, you can’t fix the data in the AB database, because AB gets it’s data from the QP DB.) 

·       Is there another way to fix this problem?

·       Is there a way to programmatically fix the QP database data?

·       I tried to use the “Nz” function as a workaround, but it didn’t fill in the missing data.  I.e., I tried:

Plot( Nz(C, LastValue(Ref(C, -1)))…

Is there a way to make this work?

Thanks in advance for any help.

Regards,

Dan.




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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS