Permalink
Browse files

Doc tweaks for Yahoo! Finance historical quotes.

  • Loading branch information...
1 parent 1da75ec commit 9a5275d8b8445107a5b9d2ed6c667dac53f7b708 @kwgoodman committed Oct 12, 2010
Showing with 15 additions and 1 deletion.
  1. +15 −0 la/data/yahoo.py
  2. +0 −1 la/external/matplotlib.py
View
@@ -87,6 +87,21 @@ def quotes(tickers, date1=None, date2=None, adjust=True, verbose=False):
x
array([[ 282.52, 278.64, 288.94],
[ 24.38, 23.91, 24.35]])
+
+ Calculate the log return from the close prices:
+
+ >>> ret = close / close.lag(1, axis=-1)
+ >>> ret = ret.log()
+ >>> ret
+ label_0
+ aapl
+ msft
+ label_1
+ 2010-10-04
+ 2010-10-05
+ x
+ array([[-0.01382872, 0.03629843],
+ [-0.01946634, 0.01823507]])
"""
if date1 is None:
@@ -13,7 +13,6 @@
# - Remove year, month, day, d (date number); just return datetime.date
# - Remove rearrays and asobject parameter; always return lists of tuples
# - Don't adjust prices or volume, leave that for the la package
-# - Don't reverse order of data
# - parse_historical_yahoo now returns dates and data separately
# - quotes_historical_yahoo now returns dates and data separately
# - parse_historical_yahoo no longer reverses data order

0 comments on commit 9a5275d

Please sign in to comment.