PureBytes Links
Trading Reference Links
|
Michael, i suppose "Read The Manual" would apply to me. I looked at
it with unseeing eyes!
I changed the subject -- hope that's ok.
What i need to do with SampleDB is Match <SYMbol>-DIVD & <SYMbol> on
date. First tho' i explain what i had been doing.
What i had done outside AB to develop dividend adjusted prices
(before your work) was
1. export price data. (do an explore then copy paste to Excel)
2. use available dividend data from my broker and copy paste to excel.
3. lookup the excel dividend sheet from the price data sheet using
vblookup on date and record the dividend alongside the price data.
4. (a)copy down the dividend till the next dividend, and (b) also
compute the cumulative dividend (from there to the last dividend{see
below for alternative}).
5. develop an adjustment factor for prices going back.
6. adjust all the prices
7. copy paste to a file suitable for AB input.
8. import it to a separate AB db <SYM>DA ("dividednd adjusted").
I can send you the excel workbook if you like.
ALTERNATIVE dividend adjustment process
The trick with adjusting prices (as some do it) is you need to go
backwards from the last dividend, which anyway has to influence all
prices since then. There is another possibility: Add the dividends to
all ex-dividend-prices cumulatively. That would make the comparison
price for say ANZ, a few dollars more than today's price. So what....
That would be easier to compute in a single pass. As new non-dividend
data arrives, it is adjusted by the ratio of the previously adjusted
price to the vanilla data price IE a pre-processor function would be
required for the -DA.
So to repeat: what i need to do with SampleDB is
Match <SYMbol>-DIVD & <SYMbol> on date. That would get me to step 3
above (then 4a).
FORK in possibilities:
A. have Sample db record date in openinterest of -DIVD in same format
as datenum()?
B. If i knew how to read an AB <SYM> file in VB (or JS) maybe that
would make it possible to consolidate the equivalent steps.
Once a match can be performed, then it should be posible to write out
a file of dividend adjusted prices.
As i mentioned, the background is to obtain price data which is
insensitive to dividends, and so avoid spurious instances of
applystop or sell decisions when you are entitled to the dividend in
lieu of a price drop. For what i had done so far, it seemed useful.
--- In amibroker@xxxxxxxxxxxxxxx, "Michael.S.G." <OzFalcon@xxxx>
wrote:
> Gerry,
> The reason you are getting an error is because you are trying
to do
> a string function on an array.
> Also, I do not believe you can use "Date" in the Foreign()
statement. ie.
> Re UserGuide:
> DATAFIELD defines which array is referenced. Allowable data
fields:
> "open", "close", "high", "low", "volume", "interest".
>
> Unless you have unadjusted close price in your database, Im not to
sure
> how you are going to go about adjusting the dividend price.
>
> I can't follow your process to establish dividend adjustested
prices, is
> it possible to re-explain?
>
> ATB
> Michael.
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
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/
|