FinGraph
A simple abstraction layer on top of Matplotlib that allows for easily displaying financial graphics.
Please read this README on GitHub to ensure the SVGs display correctly.
Installation
python -m pip install FinGraph
Examples
See Example.ipynb.
GME and AMC returns
Code
startEnd = ('2021-01-01', '2021-06-09', '1d')
GME = Stock("GME", *startEnd).returns()
AMC = Stock("AMC", *startEnd).returns()
FinPlot(
title = "Return Profiles of GameStop and AMC",
headingFont = "Public Sans",
xlabel = "Date",
ylabel = "Return",
offset = (24,-12),
).multiplot(
(GME, "GME", "black"),
(AMC, "AMC", "red", (0,2)),
).save()
Saved at FinGraphData/Return Profiles of GameStop and AMC.svg
Profit Margins of Remote Work Firms
Code
COLORS = {
'UBER': '#000000',
'FVRR': '#1DBF73',
'LYFT': '#EA0B8C',
'UPWK': '#37A000'
}
UPWK = (0.131, 3.0e8, -1.6659e7)
FVRR = (0.261, 1.06e8, -3.37363e7)
UBER = (0.220, 1.41e10, -8.506e9)
LYFT = (0.279, 3.62e9, -2.602e9)
# convert to %
fmt = [UPWK, FVRR, UBER, LYFT]
fmt = [(pair[0]*100, pair[1], pair[2]/pair[1]) for pair in fmt]
UPWK, FVRR, UBER, LYFT = fmt
FinPlot(
"Profit Margins of Flexible Work Firms",
"Take Rate $T_R$",
"Revenue $R$",
percentX=True,
financialY=True,
).multiplot_point(
(*UPWK, "Upwork", COLORS["UPWK"]),
(*FVRR, "Fiverr", COLORS["FVRR"], (-1, 0)),
(*UBER, "Uber", COLORS["UBER"], (0, -1)),
(*LYFT, "Lyft", COLORS["LYFT"], (0, 1)),
bubbleLabelTransform=lambda x: f"{round(x, 2)*100}%"
).save()
Saved at FinGraphData/Profit Margins of Flexible Work Firms.svg
Release files for FinGraph 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 | |
|---|---|---|---|
| FinGraph-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| FinGraph-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / FinGraph-0.1.0.tar.gz
| Download URL | FinGraph-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca9e36e32148518f60c36ed1ce90d3f87471199395e10a54f1fff6eb2636febc
|
|
BLAKE2b-256 checksum How to use checksums |
1a8c0d6377802459a3f0b29fc4914f16e9d1bbd2def6a125330ec52f4d50945e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|
Release files / FinGraph-0.1.0-py3-none-any.whl
| Download URL | FinGraph-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cd1031f0ffc28c556158fc504326c9a6db613cc8f5dbc0d46b933e4f51051d5
|
|
BLAKE2b-256 checksum How to use checksums |
42d68852de2b4ac0e803df3c1e169e16f5d38b35e3e600eca8640321972aa45c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|