114 lines (111 with data), 10.9 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/lib/python2.4/site-packages/matplotlib/finance.py">/usr/lib/python2.4/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="datetime.html">datetime</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
</td><td width="25%" valign=top><a href="warnings.html">warnings</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="-Value"><strong>Value</strong></a>(...)</dt><dd><tt><a href="#-Value">Value</a>(x)</tt></dd></dl>
<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>, 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>
time must be in float days format - see date2num<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>
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="-candlestick2"><strong>candlestick2</strong></a>(ax, opens, closes, highs, lows, width<font color="#909090">=4</font>, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>, alpha<font color="#909090">=0.75</font>)</dt><dd><tt>Represent the open, close as a bar line and high low range as a<br>
vertical line.<br>
<br>
<br>
ax : an Axes instance to plot to<br>
width : the bar width in points<br>
colorup : the color of the lines where close >= open<br>
colordown : the color of the lines where close < open <br>
alpha : bar transparency<br>
<br>
return value is lineCollection, barCollection</tt></dd></dl>
<dl><dt><a name="-index_bar"><strong>index_bar</strong></a>(ax, vals, facecolor<font color="#909090">='b'</font>, edgecolor<font color="#909090">='l'</font>, width<font color="#909090">=4</font>, alpha<font color="#909090">=1.0</font>)</dt><dd><tt>Add a bar collection graph with height vals (-1 is missing).<br>
<br>
ax : an Axes instance to plot to<br>
width : the bar width in points<br>
alpha : bar transparency</tt></dd></dl>
<dl><dt><a name="-plot_day_summary"><strong>plot_day_summary</strong></a>(ax, quotes, ticksize<font color="#909090">=3</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>
time must be in float date format - see date2num<br>
<br>
ax : an Axes instance to plot to<br>
ticksize : open/close tick marker in points<br>
colorup : the color of the lines where close >= open<br>
colordown : the color of the lines where close < open <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, opens, closes, highs, lows, ticksize<font color="#909090">=4</font>, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>)</dt><dd><tt>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 : size of open and close ticks in points<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)</dt><dd><tt>Get historical data for ticker between date1 and date2. date1 and<br>
date2 are datetime instances<br>
<br>
results are a list of<br>
<br>
d, open, close, high, low, volume<br>
<br>
where d is a floating poing representation of date, as returned by date2num</tt></dd></dl>
<dl><dt><a name="-volume_overlay"><strong>volume_overlay</strong></a>(ax, opens, closes, volumes, colorup<font color="#909090">='k'</font>, colordown<font color="#909090">='r'</font>, width<font color="#909090">=4</font>, alpha<font color="#909090">=1.0</font>)</dt><dd><tt>Add a volume overlay to the current axes. The opens and closes<br>
are used to determine the color of the bar. -1 is missing. If a<br>
value is missing on one it must be missing on all<br>
<br>
ax : an Axes instance to plot to<br>
width : the bar width in points<br>
colorup : the color of the lines where close >= open<br>
colordown : the color of the lines where close < open <br>
alpha : bar transparency</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>TICKLEFT</strong> = 0<br>
<strong>TICKRIGHT</strong> = 1<br>
<strong>colorConverter</strong> = <matplotlib.colors.ColorConverter instance><br>
<strong>verbose</strong> = <matplotlib.Verbose instance></td></tr></table>
@footer@