A package for a quick and dirty portfolio analysis.
Project description
stockeasy
Quick and Easy Stock Portfolio Analysis - FOR ENTERTAINMENT PURPOSES ONLY!!
Introduction
All exposed functions in this package have been designed with the intent that they can be strung together in a DAG; as such, they all follow a consistent contract.
function contract
def function_name (data: Dict, config: dict, logging: logging.Logger)
return results: dict
data contract
data = {'name': pandas dataframe}
config contract
config = {'setting': setting values}
Example Code
import stockeasy
import pandas as pd
df_stocklist = pd.DataFrame([['VTSAX', 120], ['MSFT', 100]], columns=['symbol', 'sharesOwned'])
config = {
'symbolField': 'symbol',
'sharesField': 'sharesOwned',
'dataFields': ['exchange', 'symbol', 'shortName', 'sector', 'country', 'marketCap']
}
results = stockeasy.get_info({'input': df_stocklist}, config=config)
print(results.get('output').head())
logging
Standard python logging object
Notes
- I use Docker for enviroment management; as such, my build process will deviate from more classical approaches.
- I attempt to follow functional programming style
Getting Started Contributing
for windows create a env.bat file after pulling with the mount path to the current directory. In windows, you can't use relative paths with Docker Volume mounts, so...
set LOCAL_MOUNT=C:\Users\ablac\OneDrive\Documents\stockeasy\
then run
make DOCKER
cd stockeasy
doit
Available doit tasks
lint -- runs linting setup_tool -- installs local tool unit_tests -- runs unit tests
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
Built Distribution
Close
Hashes for stockeasy-0.0.20220226172142.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f09c64b35d87b1d763bcc17fdc0319886078208cf5ddd86a3544c7617fa5b4 |
|
MD5 | 3cb3da5d56a1e71ea95b9379f264ac73 |
|
BLAKE2b-256 | d1be8805b06117634defe767447b07736cf353fcb544d3eaf87ec53f33a628a8 |
Close
Hashes for stockeasy-0.0.20220226172142-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21cd97217a8f70c40c0779e78c409f8d6c1271703db6d9aea9e2e0ef23e04341 |
|
MD5 | 9cf65a7ec0565f6c4450413767491474 |
|
BLAKE2b-256 | 9ae8a9a060eabc613f1aa73497601636f74f8bdf28429bd84e60d0f252e50d3b |