SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

From: <jd...@us...> - 2010年10月12日 16:17:22
Revision: 8742
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8742&view=rev
Author: jdh2358
Date: 2010年10月12日 16:17:16 +0000 (2010年10月12日)
Log Message:
-----------
fixed mpl finance buglets identified by Keith Goodman
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/finance.py
Modified: branches/v1_0_maint/lib/matplotlib/finance.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/finance.py	2010年10月11日 14:04:43 UTC (rev 8741)
+++ branches/v1_0_maint/lib/matplotlib/finance.py	2010年10月12日 16:17:16 UTC (rev 8742)
@@ -4,7 +4,7 @@
 
 """
 #from __future__ import division
-import os, time, warnings
+import os, warnings
 from urllib2 import urlopen
 
 try:
@@ -17,7 +17,7 @@
 
 from matplotlib import verbose, get_configdir
 from matplotlib.dates import date2num
-from matplotlib.cbook import iterable, is_string_like
+from matplotlib.cbook import iterable
 from matplotlib.collections import LineCollection, PolyCollection
 from matplotlib.colors import colorConverter
 from matplotlib.lines import Line2D, TICKLEFT, TICKRIGHT
@@ -218,7 +218,7 @@
 if len(ret) == 0:
 return None
 except IOError, exc:
- warnings.warn('urlopen() failure\n' + url + '\n' + exc.strerror[1])
+ warnings.warn('fh failure\n%s'%(exc.strerror[1]))
 return None
 
 return ret
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2010年10月12日 17:21:45
Revision: 8747
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8747&view=rev
Author: jdh2358
Date: 2010年10月12日 17:21:39 +0000 (2010年10月12日)
Log Message:
-----------
tweak volume docstring for yahoo finance
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/finance.py
Modified: branches/v1_0_maint/lib/matplotlib/finance.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/finance.py	2010年10月12日 16:44:07 UTC (rev 8746)
+++ branches/v1_0_maint/lib/matplotlib/finance.py	2010年10月12日 17:21:39 UTC (rev 8747)
@@ -47,13 +47,17 @@
 Parse the historical data in file handle fh from yahoo finance.
 
 *adjusted*
- If True (default) replace open, close, high, low, and volume with
- their adjusted values.
- The adjustment is by a scale factor, S = adjusted_close/close.
- Adjusted volume is actual volume divided by S;
- Adjusted prices are actual prices multiplied by S. Hence,
- the product of price and volume is unchanged by the adjustment.
+ If True (default) replace open, close, high, and low prices with
+ their adjusted values. The adjustment is by a scale factor, S =
+ adjusted_close/close. Adjusted prices are actual prices
+ multiplied by S.
 
+ Volume is not adjusted as it is already backward split adjusted
+ by Yahoo. If you want to compute dollars traded, multiply volume
+ by the adjusted close, regardless of whether you choose adjusted
+ = True|False.
+
+ 
 *asobject*
 If False (default for compatibility with earlier versions)
 return a list of tuples containing
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2011年01月04日 20:52:48
Revision: 8884
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8884&view=rev
Author: efiring
Date: 2011年01月04日 20:52:42 +0000 (2011年1月04日)
Log Message:
-----------
Finance: change volume to float; close 3108059
Modified Paths:
--------------
 branches/v1_0_maint/lib/matplotlib/finance.py
Modified: branches/v1_0_maint/lib/matplotlib/finance.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/finance.py	2011年01月04日 20:36:21 UTC (rev 8883)
+++ branches/v1_0_maint/lib/matplotlib/finance.py	2011年01月04日 20:52:42 UTC (rev 8884)
@@ -38,7 +38,7 @@
 ('close', np.float),
 ('high', np.float),
 ('low', np.float),
- ('volume', np.int),
+ ('volume', np.float),
 ('aclose', np.float)])
 
 
@@ -57,7 +57,7 @@
 by the adjusted close, regardless of whether you choose adjusted
 = True|False.
 
- 
+
 *asobject*
 If False (default for compatibility with earlier versions)
 return a list of tuples containing
@@ -101,7 +101,7 @@
 dt = datetime.date(*[int(val) for val in datestr.split('-')])
 dnum = date2num(dt)
 open, high, low, close = [float(val) for val in vals[1:5]]
- volume = int(vals[5])
+ volume = float(vals[5])
 aclose = float(vals[6])
 
 results.append((dt, dt.year, dt.month, dt.day,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /