Permalink
Browse files

Bug fix in adjustment of volume from Yahoo Finance.

  • Loading branch information...
1 parent 9a5275d commit ff16ca3b5edfead2efbe9b4ddecd8bed9dbd90bd @kwgoodman committed Oct 12, 2010
Showing with 4 additions and 6 deletions.
  1. +4 −6 la/data/yahoo.py
View
@@ -23,11 +23,10 @@ def quotes(tickers, date1=None, date2=None, adjust=True, verbose=False):
datetime.date(2010, 12, 31) or (2010, 12, 31). By default the last
date is 10 days beyond today's date.
adjust : bool, optional
- Adjust (default) the open, close, high, and low prices and the volume.
- The adjustment takes splits and dividends into account such that the
- corresponding returns are correct. The adjustment is not correct for
- volume, but at least price * volume remains unchanged after the
- adjustment.
+ Adjust (default) the open, close, high, and low prices. The
+ adjustment takes splits and dividends into account such that the
+ corresponding returns are correct. Volume is already split adjusted
+ by Yahoo so it is not changed by the value of `adjust`.
verbose : bool, optional
Print the ticker currently being loaded. By default the tickers are
not printed.
@@ -130,6 +129,5 @@ def quotes(tickers, date1=None, date2=None, adjust=True, verbose=False):
lar.x[:,1] = lar.x[:,-1]
lar.x[:,2] *= scale
lar.x[:,3] *= scale
- lar.x[:,4] /= scale
lar = lar[:,:-1]
return lar

0 comments on commit ff16ca3

Please sign in to comment.