a simple package that creates some convenience functions for financial data
Project description
Introduction
a simple package that creates some extensions to a pandas dataframe for handling financial functions
Getting Started
The main purpose of this simple lib is to have some convenience functions for easy handling of pandas dataframes when working with time series data. At the moment is this the focus of the implementation.
Example
>>> import financefunctions as ff
>>> import eod2pd
>>> df = eod2pd.get_symbols_prices(["BMW.XETRA","BAS.XETRA"], dict_result=False)
>>> df
BAS.XETRA BMW.XETRA
symbol open high low close adjusted_close volume symbol open high low close adjusted_close volume
date
1994-02-01 BAS.XETRA 154.5124 155.6884 153.8990 154.5124 2.4273 1565840.0 BMW.XETRA 406.4767 410.5692 400.0884 406.4767 5.1169 2677750.0
1994-02-02 BAS.XETRA 154.4102 155.0748 154.1546 154.4102 2.4257 1044460.0 BMW.XETRA 404.1757 405.7123 401.8772 404.1757 5.0880 2083911.0
1994-02-03 BAS.XETRA 154.5636 156.6088 151.5980 154.5636 2.4281 2216020.0 BMW.XETRA 398.2944 402.3868 397.2726 398.2944 5.0139 1822376.0
1994-02-04 BAS.XETRA 151.3424 153.8990 149.6552 151.3424 2.3775 1569320.0 BMW.XETRA 386.5370 392.6705 383.4664 386.5370 4.8659 2529985.0
1994-02-07 BAS.XETRA 148.8882 150.3198 148.3770 148.8882 2.3390 2213040.0 BMW.XETRA 385.0030 394.7193 382.4472 385.0030 4.8466 1404435.0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2024-03-26 BAS.XETRA 52.9000 52.9400 52.4800 52.6300 52.6300 2278963.0 BMW.XETRA 106.6000 106.7600 105.5400 106.5600 106.5600 758874.0
2024-03-27 BAS.XETRA 52.7800 53.2600 52.1500 53.2500 53.2500 2540595.0 BMW.XETRA 105.5000 106.5200 104.6600 106.1600 106.1600 816350.0
2024-03-28 BAS.XETRA 53.3400 53.5300 52.7100 52.9300 52.9300 2646566.0 BMW.XETRA 106.3400 107.1800 106.3400 106.9600 106.9600 785748.0
2024-04-02 BAS.XETRA 53.4500 54.2300 53.2100 53.8200 53.8200 2903536.0 BMW.XETRA 107.2000 107.8000 105.8000 106.6500 106.6500 1084212.0
2024-04-03 BAS.XETRA 53.5800 54.7500 53.5700 54.5100 54.5100 2314791.0 BMW.XETRA 106.9500 111.9500 106.6000 111.8500 111.8500 1830218.0
[7634 rows x 14 columns]
>>> df.ff.norm()
BAS.XETRA BMW.XETRA
open high low close adjusted_close volume open high low close adjusted_close volume
date
1994-02-01 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000 100.000000
1994-02-02 99.933856 99.605879 100.166083 99.933856 99.934083 66.702856 99.433916 98.817033 100.447101 99.433916 99.435205 77.823210
1994-02-03 100.033136 100.591181 98.504864 100.033136 100.032958 141.522761 97.987019 98.007059 99.296206 97.987019 97.987062 68.056241
1994-02-04 97.948385 98.850653 97.242477 97.948385 97.948338 100.222245 95.094504 95.640516 95.845418 95.094504 95.094686 94.481748
1994-02-07 96.360033 96.551702 96.411933 96.360033 96.362213 141.332448 94.717114 96.139530 95.590674 94.717114 94.717505 52.448324
... ... ... ... ... ... ... ... ... ... ... ... ...
2024-03-26 34.236734 34.003818 34.100287 34.061991 2168.252791 145.542520 26.225365 26.002925 26.379170 26.215525 2082.510895 28.339987
2024-03-27 34.159071 34.209357 33.885860 34.463253 2193.795575 162.251252 25.954747 25.944469 26.159219 26.117118 2074.693662 30.486416
2024-03-28 34.521501 34.382780 34.249735 34.256150 2180.612203 169.018929 26.161401 26.105222 26.579126 26.313931 2090.328128 29.343591
2024-04-02 34.592693 34.832396 34.574624 34.832156 2217.278458 185.429929 26.372975 26.256232 26.444156 26.237666 2084.269773 40.489665
2024-04-03 34.676829 35.166396 34.808543 35.278722 2245.705104 147.830621 26.311471 27.267023 26.644112 27.516952 2185.893803 68.349099
[7634 rows x 12 columns]
>>> df.ff.subcols("adjusted_close")
BAS.XETRA BMW.XETRA
adjusted_close adjusted_close
date
1994-02-01 2.4273 5.1169
1994-02-02 2.4257 5.0880
1994-02-03 2.4281 5.0139
1994-02-04 2.3775 4.8659
1994-02-07 2.3390 4.8466
... ... ...
2024-03-26 52.6300 106.5600
2024-03-27 53.2500 106.1600
2024-03-28 52.9300 106.9600
2024-04-02 53.8200 106.6500
2024-04-03 54.5100 111.8500
[7634 rows x 2 columns]
Project Homepage
https://dev.azure.com/neuraldevelopment/financefunctions
Contribute
If you find a defect or suggest a new function, please send an eMail to neutro2@outlook.de
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
File details
Details for the file financefunctions-0.0.2.1.tar.gz
.
File metadata
- Download URL: financefunctions-0.0.2.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b96ae2cd68274523451e3c12a83447862023ca49ff70ff8e38a70c5ca5aa4c9 |
|
MD5 | 43ee2f26bd731b1f643a646763bb1609 |
|
BLAKE2b-256 | 4a0c4bfaa584e9e3b40e1487e9cd9deda7efb7388b7169470610d70e9aea1a5f |
File details
Details for the file financefunctions-0.0.2.1-py3-none-any.whl
.
File metadata
- Download URL: financefunctions-0.0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f6d1f2c6f53ed9a4ea0fa73a4ee6b29269cc70fb5170ef6500974887741bf6 |
|
MD5 | dfa59a7349d01035ca08da887c3c889e |
|
BLAKE2b-256 | f64a216ea231b8c346be7bc02c1fe2051fc3853a93422b049663d69f01e7e25b |