This has been partially implemented. Two features left
to be implemented are:
Mailing list thread:
Cut&Paste of some messages from the thread:
From: Steven Davis <email@example.com>
Date: Mon Dec 29, 2003 12:36 pm
Subject: Re: [ta-lib] Re: Yahoo Adjustment logic...
It should also be noted that dividend/capital gain
adjustments can be made either additively, or
You can either subtract the dividend payment for the
prior history, or you can multiply the prior history by the
proportion (PriorClose - Dividend)/PriorClose.
For the immediate close, the result is the same, but the
cummulative affect on early history is quite different.
There are stocks who have had more dividend pay-outs
than the current price per share.
If the dividends are handled additively (subtracted from
prior history), the early history consists of negative
If the dividends are handled proportionally, the early
history approaches zero from the right.
The essential difference is that additive adjustments
reflect a policy of treating dividends as income, and
proportional adjustments reflect a reinvestment strategy.
As far as buyers and sellers reacting the perceived
value without "any cold accounting calculation", I can
not disagree more. The market makers definitely take
this into account, and the regular Joe is just getting
what the market has to offer.
See for example, http://www.csidata.com/cgi-
which has a 1 dollar disbursement which has not been
taken into account. One day his brokerage statement
says the share prices is 10.80, and the next day, 9.86.
He is not going to say he lost a ton of money, because
the brokerage statement also shows the disbursement.
It's not a fund tapping at 11 dollars, it's a fund tapping
at 10 dollars, and his buy stop order needs to be
adjusted from 11 dollars to 10 dollars.
From: Steven Davis <firstname.lastname@example.org>
Date: Mon Dec 29, 2003 3:35 pm
Subject: Re: Yahoo Adjustment logic... needs help
1. Proportional/Additive Dividend-Capital Gain
adjustments. The two
adjustment method serve different purposes. If one is
system, then it makes sense to run 10,000 trade of 100
shares a piece
and do a Monte Carlo analysis to analyze the Profit/Loss
If one is analyzing a money-management system, then it
makes sense to
proportionally adjust since a MSFT trade from 0.0001
USD to 35.00 USD
has the correct proportional return, and since you are
number of shares dynamically, that is exactly what you
want to know. I
argued with several people over the years about these
options so I don't
think there is one which is predominantly of interest.
Your main saving
grace, if you wish to just pick one, is that few data
enough history for the choice of method to really matter
that much. For
the record, there are lots of kinds of disbursements
which may be
recorded as dividends or splits at the data providers
2. Adding an offset to make prices positive. Everytime
tells a customer to employ this approach to handling
negative prices, I
get a follow-up complain that the prices are wrong. I
wouldn't make it
3. GMSCX. This is a fundamental problem with mutual
consolidates the net asset values and distributes them.
For that reason
NAV (close only) data is readily available. NASDAQ does
process capital gains for most of the mutual funds. As a
data is hard to come-by. There are some services
(Fasttrack among them)
who specialize in getting timely capital gains/dividend
worst 3 days post-dividend during the end-of-year
rush), but not for
very many of the funds. 4-6 Week delayed releases are
This is not usually a big deal since most mutual fund
long-term, have notices of pending distributions, and
don't usually look
at charts at all. The people who are really affected are
allocation systems (moving money between mutual
funds to capture momentum.)
4. Four options for doing adjustments. Your options
coincide with what
I offer users, except for the proportional. I am not
aware of anybody
who really takes advantage of splits without dividends,
dividiends without splits, but I would offer them just to
asking for it later.
5. "Disbursement" vs. "Dividend". A quick glace at a
series 7 test-prep
book shows 7 kinds of things which should be adjusted
for so I don't
really care about the choice of words. For example
technically factor into price. (Since a US stock holder
fundamental right to maintain his percentage ownership
of a company,
when the company issues new stock, he has a right to
purchase shares to
maintain his percentage before the remaining shares can
be offered to
the public. This right can be sold ... ) More picky
distinguish between short term capital gains, long term
(Don't be surprised if some day there are medium term
dividends, and splits. Less picky providers lump things
6. Providing adjustment data. As I have mentioned
sources do not provide this data, since it is expensive to
the CSI format, specifically, does not expose it. Yahoo
does, but I
have seen other data providers who original offered it,
adjustments do to competitors stealing it from them.
From: "Mario Fortier" <email@example.com>
Date: Mon Dec 29, 2003 9:44 pm
Subject: RE: [ta-lib] Re: Yahoo Adjustment logic...
Here is my latest proposal with some design details.
By default, TA-lib will assume the data source returns
price with "split/value
adjustment (applied proportionally) ".
The user can change the logic with:
TA_AddDataSource will return an error if the requested
set of flags cannot be
supported. When no flags are specified, it will also
return an error if the
default behavior cannot be supported (forcing the user
to specify the right set
For TA-Lib, the difference of what is a "Split" versus
a "Value" adjustment is
that a split affects both the volume and the price in the
same proportion. A
"Value" adjustment is everything else that affects only
the price (like a
dividend). If a data source cannot properly make such
difference, the exclusive
usage of TA_DO_NOT_SPLIT_ADJUST and
TA_DO_NOT_VALUE_ADJUST should fail i.e. both
must be specified or neither is specified.
For Yahoo! all combinations of these flags should work.
For SQL/ASCII data source, all the flags are blindly
accepted. It is the user
responsibility to make sure that the file/database
contains the corresponding
SQL data source could be extended to use Split/Value
adjustment query and offer
more flexibility (could be done in a later phase if
someone really cares).
For CSI, the TA_USE_ADDITIVE_ADJUSTMENT must be
specified and all combination of
the other flags should work.
Internally, I will implement some utility functions allowing
the "data source
driver" to easily apply both type of adjustment to
I will sleep on it, but I think that's the way to go for the
Log in to post a comment.