Financial Python. Using python to do stock analysis.
Project description
finpy
=====
Financial Python
=====
To install
=====
Requirement: Python 3
pip install finpy
You can also download the window install package if you're using windows.
Introduction
=====
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
help(Equity)
from finpy.portfolio import Portfolio
help(Portfolio)
Please go to https://github.com/blacksburg98/finpy to file a issue if you have
any problems.
Recommend:
This will be the area where the downloaded stock data are stored.
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)
fig.autofmt_xdate()
svg_file = 'tutorial1.pdf'
fig.savefig(svg_file)
=====
Financial Python
=====
To install
=====
Requirement: Python 3
pip install finpy
You can also download the window install package if you're using windows.
Introduction
=====
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
help(Equity)
from finpy.portfolio import Portfolio
help(Portfolio)
Please go to https://github.com/blacksburg98/finpy to file a issue if you have
any problems.
Recommend:
This will be the area where the downloaded stock data are stored.
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)
fig.autofmt_xdate()
svg_file = 'tutorial1.pdf'
fig.savefig(svg_file)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
FinPy-0.2.004.zip
(88.8 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
FinPy-0.2.004.win-amd64.exe
(309.2 kB
view details)
FinPy-0.2.004-py3.4.egg
(137.1 kB
view details)
File details
Details for the file FinPy-0.2.004.zip.
File metadata
- Download URL: FinPy-0.2.004.zip
- Upload date:
- Size: 88.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34b1836dc1692c5b7d24abbe4264537bdcd77628335325c230e86387cdac935f
|
|
| MD5 |
b4a4fb2e0d4c42b1ecbaa874a9ea9573
|
|
| BLAKE2b-256 |
cba03e1edd203d11e8b08b09949fa08ec4d8253adbe09d46d32c24f309ddc248
|
File details
Details for the file FinPy-0.2.004.win-amd64.exe.
File metadata
- Download URL: FinPy-0.2.004.win-amd64.exe
- Upload date:
- Size: 309.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d041a5e28065437a766c1fbe48473c73f29a4aabcc666ba552c59ac99a5c8fe3
|
|
| MD5 |
45b4961413ea8493c52e7e96f8d0f31c
|
|
| BLAKE2b-256 |
69d1539b6146cdf958a949844dc5625499a87d5134366eb8ad7d3772ba53f6b2
|
File details
Details for the file FinPy-0.2.004-py3.4.egg.
File metadata
- Download URL: FinPy-0.2.004-py3.4.egg
- Upload date:
- Size: 137.1 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e7d2aef1ed5ec7a739ad2f967456fab30030745581d6d77b77251ec3077f3d
|
|
| MD5 |
a732645cf8a9213a09fb2a470c46e6de
|
|
| BLAKE2b-256 |
e4f5fec00b2e2fb66cd1fb558a00123b80c1fcac33850e693489c7db613d1e14
|