96 lines (93 with data), 8.8 kB
@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.finance</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python2.3/site-packages/matplotlib/finance.py">/usr/local/lib/python2.3/site-packages/matplotlib/finance.py</a></font></td></tr></table>
<p><tt>A collection of modules for collecting, analyzing and plotting<br>
financial data. User contributions welcome!</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-candlestick"><strong>candlestick</strong></a>(ax, quotes, width<font color="#909090">=0.20000000000000001</font>, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>, converter<font color="#909090">=<matplotlib.dates.EpochConverter instance></font>, alpha<font color="#909090">=1.0</font>)</dt><dd><tt>quotes is a list of (time, open, close, high, low, ...) tuples.<br>
As long as the first 5 elements of the tuples are these values,<br>
the tuple can be as long as you want (eg it may store volume).<br>
<br>
Plot the time, open, close, high, low as a vertical line ranging<br>
from low to high. Use a rectangular bar to represent the<br>
open-close span. If close >= open, use colorup to color the bar,<br>
otherwise use colordown<br>
<br>
ax : an Axes instance to plot to<br>
width : fraction of a day for the rectangle width<br>
colorup : the color of the rectangle where close >= open<br>
colordown : the color of the rectangle where close < open <br>
converter : dates.DateConverter instance used to convert your times.<br>
If your data is already epoch, you can use converter=None<br>
alpha : the rectangle alpha level<br>
<br>
return value is lines, patches where lines is a list of lines<br>
added and patches is a list of the rectangle patches added</tt></dd></dl>
<dl><dt><a name="-plot_day_summary"><strong>plot_day_summary</strong></a>(ax, quotes, ticksize<font color="#909090">=0.20000000000000001</font>, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>, converter<font color="#909090">=<matplotlib.dates.EpochConverter instance></font>)</dt><dd><tt>quotes is a list of (time, open, close, high, low, ...) tuples<br>
<br>
Represent the time, open, close, high, low as a vertical line<br>
ranging from low to high. The left tick is the open and the right<br>
tick is the close.<br>
<br>
ax : an Axes instance to plot to<br>
ticksize : fraction of a day for the open and close ticks<br>
colorup : the color of the lines where close >= open<br>
colordown : the color of the lines where close < open <br>
converter : dates.DateConverter instance used to convert your times. <br>
If your data is already epoch, you can use converter=None<br>
return value is a list of lines added</tt></dd></dl>
<dl><dt><a name="-plot_day_summary2"><strong>plot_day_summary2</strong></a>(ax, quotes, ticksize<font color="#909090">=0.20000000000000001</font>, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>)</dt><dd><tt>quotes is a list of (time, open, close, high, low, ...) tuples<br>
<br>
Represent the time, open, close, high, low as a vertical line<br>
ranging from low to high. The left tick is the open and the right<br>
tick is the close.<br>
<br>
ax : an Axes instance to plot to<br>
ticksize : fraction (0-1) for the open and close ticks<br>
colorup : the color of the lines where close >= open<br>
colordown : the color of the lines where close < open <br>
<br>
return value is a list of lines added</tt></dd></dl>
<dl><dt><a name="-quotes_historical_yahoo"><strong>quotes_historical_yahoo</strong></a>(ticker, date1, date2, converter<font color="#909090">=<matplotlib.dates.EpochConverter instance></font>)</dt><dd><tt>Get historical data for ticker between date1 and date2. converter<br>
is a DateConverter class appropriate for converting your dates<br>
<br>
results are a list of<br>
<br>
d, open, close, high, low, volume<br>
<br>
<br>
where d is an instnace of your datetime supplied by the converter</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>FRIDAY</strong> = 4<br>
<strong>MONDAY</strong> = 0<br>
<strong>SATURDAY</strong> = 5<br>
<strong>SEC_PER_DAY</strong> = 86400<br>
<strong>SUNDAY</strong> = 6<br>
<strong>THURSDAY</strong> = 3<br>
<strong>TUESDAY</strong> = 1<br>
<strong>WEDNESDAY</strong> = 2<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)</td></tr></table>
@footer@