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)
Metadata
Release files for FinPy 0.61
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| FinPy-0.61.tar.gz | 71.5 kB | Without provenance | Details |
Release files / FinPy-0.61.tar.gz
| Download URL | FinPy-0.61.tar.gz |
|---|---|
| Size | 71.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
388172dae02c069ac308887cf360915e6b82c8d4a61145e02599b1ca91b1aa6a
|
|
BLAKE2b-256 checksum How to use checksums |
f2bd29d2a4461fd69c0f65fc50fc0a3ccee493e8a0255acb10bc92a97c34cfd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Security for FinPy 0.61
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.