skip to navigation
skip to content

FinPy 0.1.006

Financial Python. Using python to do stock analysis.

Latest Version: 0.3.3

Financial Python
This is mainly inspired by QSTK and Professor Tucker's Computational Investing I
at Coursera. I plan to expand the capabilities. Please let me know if you have
any suggestions.
You can reach me at blacksburg98 (at) yahoo dot com

I've tried to use docstring as much as possible, so you can try these commands
in python shell to get more information.

from finpy.utils import get_tickdata
from finpy.equity import Equity
from finpy.portfolio import Portfolio

Please go to to file a issue if you have
any problems.

Copy stock_data to a separate area.
cp -R stock_data ~/stock_data
setenv FINPYDATA ~/stock_data

Tutorial 1
Tutorial 1
Load stock data and print
import matplotlib
matplotlib.use('Agg') # fix for matplotlib under multiprocessing
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import datetime as dt
from finpy.utils import get_tickdata

import finpy.fpdateutil as du
if __name__ == '__main__':
dt_timeofday = dt.timedelta(hours=16)
dt_start = dt.datetime(2010, 1, 1)
dt_end = dt.datetime(2010, 12, 31)
ls_symbols = ['AAPL','GOOG', 'IBM', 'MSFT']
ldt_timestamps = du.getNYSEdays(dt_start, dt_end, dt_timeofday)
all_stocks = get_tickdata(ls_symbols=ls_symbols, ldt_timestamps=ldt_timestamps)
fig = plt.figure()
ax = fig.add_subplot(111)
for tick in ls_symbols:
ax.plot(ldt_timestamps, all_stocks[tick].normalized())
legend = ls_symbols
ax.legend(legend, loc=2)
svg_file = 'tutorial1.pdf'
File Type Py Version Uploaded on Size
FinPy-0.1.006-py2.7.egg (md5) Python Egg 2.7 2014-06-23 650KB (md5) MS Windows installer 2.7 2014-06-23 837KB (md5) Source 2014-06-23 32KB
  • Downloads (All Versions):
  • 2 downloads in the last day
  • 628 downloads in the last week
  • 4891 downloads in the last month