stockmanager
Manager, Analyze, Stimulate stock information.
.. image:: https://travis-ci.com/wiccy46/stockmanager.svg?branch=master :target: https://travis-ci.com/wiccy46/stockmanager
Installation
Using pip::
pip install stockmanager
Example
Load a stock info::
from stockmanager import Ticker
mystock = Ticker(symbol='MSFT') # Give a ticker string
# result is a pandas DataFrame
info_pd = mystock.get_price(start='2020-03-01', end='2020-03-19')
# Or use period and interval
# valid period: 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max
# valid interval: 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo
info_pd = mystock.get_price(period='1mo', interval='1d')
earnings = mystock.get_earings(freq='yearly')
cashflow = mystock.get_cashflow(freq='quarterly')
balancesheet = mystock.get_balancesheet()
Other attributes: institutional_holders, major_holders, mutual_fund_holders, sustainability, company_information,
Visualization:
from stockmanager import Ticker, visualization
mystock = Ticker(symbol='MSFT') # Give a ticker string
# result is a pandas DataFrame
info_pd = mystock.get_price(start='2020-03-01', end='2020-03-19')
# Accept matplotlib and plotly (interactive) backend
visualization.plot_price(info_pd)
# or use plotly
visualization.plot_price(info_pd, backend='plotly')
Portfolio is a class that let you add holdings of certain stocks and add trade records. It has two main attributes,
- Portfolio.summary as your holding summary
- Portfolio.record as a table of all the trade record.
Example:
from stockmanager import Portfolio
myportfolio = Portfolio()
myportfolio.add('AAPL', holdings=200)
myportfolio.add('ZM', holdings=200)
myportfolio.summary # This is a DataFrame view of your holdings.
# typ is buy or sell, price by default will try to get the current price
# update_summary will modified self.summary according to amount.
myportfolio.trade(typ='buy'|'sell', symbol='AAPL', amount=20,
prince=200., update_summary=True)
myportfolio.save(filepath='./', summary_name='portfolio',
record_name='record', format='csv')
myportfolio.load(summary_path='./portfolio.csv', record_path='./record.csv')
Metadata
Release files for stockmanager 0.1.0
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 | Actions |
|---|---|---|---|---|
| stockmanager-0.1.0.tar.gz | 30.1 kB | Without provenance | Details for stockmanager-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stockmanager-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for stockmanager-0.1.0-py2.py3-none-any.whl |
Total release size: 53.1 kB
Release files / stockmanager-0.1.0.tar.gz
| Download URL | stockmanager-0.1.0.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95e5ce83e0ab0c3bef4804de47ef06c007af8013847be9e7a74bdc1e1c7d33e5
|
|
BLAKE2b-256 checksum How to use checksums |
022ecf4e2bd868d090de154b08ea9113d66aa24a0c140bec3bf7c9683bc1f5ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|
Release files / stockmanager-0.1.0-py2.py3-none-any.whl
| Download URL | stockmanager-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cd6e32c9a98b2d70e72512d23e7d7898d29d5d08432d4c7120f8d186563b539f
|
|
BLAKE2b-256 checksum How to use checksums |
3cd7f4d2a3046db0d4fd305364d4ef7227421889b6a01e43a6299b007b14658c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|
Security for stockmanager 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.