kaxanuk.data-curator 0.40.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kaxanuk_data_curator-0.40.0/CHANGELOG.md +506 -0
- kaxanuk_data_curator-0.40.0/LICENSE +7 -0
- kaxanuk_data_curator-0.40.0/PKG-INFO +91 -0
- kaxanuk_data_curator-0.40.0/README.md +67 -0
- kaxanuk_data_curator-0.40.0/docs/Makefile +40 -0
- kaxanuk_data_curator-0.40.0/docs/data_dictionary.xlsx +0 -0
- kaxanuk_data_curator-0.40.0/docs/make.bat +35 -0
- kaxanuk_data_curator-0.40.0/docs/requirements.txt +6 -0
- kaxanuk_data_curator-0.40.0/docs/source/__init__.py +9 -0
- kaxanuk_data_curator-0.40.0/docs/source/_static/Imagotipo_Kaxanuk.png +0 -0
- kaxanuk_data_curator-0.40.0/docs/source/_static/Isologo_Kaxanuk.png +0 -0
- kaxanuk_data_curator-0.40.0/docs/source/_static/content.css +81 -0
- kaxanuk_data_curator-0.40.0/docs/source/_static/general.css +31 -0
- kaxanuk_data_curator-0.40.0/docs/source/_static/sidebar.css +37 -0
- kaxanuk_data_curator-0.40.0/docs/source/about_us.rst +19 -0
- kaxanuk_data_curator-0.40.0/docs/source/advanced_functions.rst +48 -0
- kaxanuk_data_curator-0.40.0/docs/source/changelog.rst +7 -0
- kaxanuk_data_curator-0.40.0/docs/source/conf.py +55 -0
- kaxanuk_data_curator-0.40.0/docs/source/examples.rst +4 -0
- kaxanuk_data_curator-0.40.0/docs/source/features.rst +90 -0
- kaxanuk_data_curator-0.40.0/docs/source/how_to_contribute.rst +4 -0
- kaxanuk_data_curator-0.40.0/docs/source/how_to_use.rst +27 -0
- kaxanuk_data_curator-0.40.0/docs/source/index.rst +20 -0
- kaxanuk_data_curator-0.40.0/docs/source/quick_start.rst +5 -0
- kaxanuk_data_curator-0.40.0/docs/source/readme.rst +7 -0
- kaxanuk_data_curator-0.40.0/docs/source/sphinx_ext.py +128 -0
- kaxanuk_data_curator-0.40.0/pyproject.toml +227 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/__init__.py +45 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/config_handlers/__init__.py +13 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/config_handlers/configurator_interface.py +50 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/config_handlers/excel_configurator.py +624 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/data_curator.py +261 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/data_providers/__init__.py +15 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/data_providers/data_provider_interface.py +451 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/data_providers/financial_modeling_prep.py +1131 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/data_providers/not_found.py +66 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/__init__.py +38 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/configuration.py +67 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/dividend_data.py +41 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/dividend_data_row.py +28 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/fundamental_data.py +47 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/fundamental_data_row.py +72 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/fundamental_data_row_balance_sheet.py +72 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/fundamental_data_row_cash_flow.py +57 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/fundamental_data_row_income_statement.py +66 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/main_identifier.py +22 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/market_data.py +49 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/market_data_daily_row.py +74 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/split_data.py +41 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/entities/split_data_row.py +24 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/exceptions/__init__.py +138 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/features/__init__.py +3 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/features/calculations.py +2331 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/features/helpers.py +469 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/modules/__init__.py +3 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/modules/data_column.py +1363 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/modules/debugger.py +26 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/modules/dotenv_loader.py +27 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/modules/extension_handler.py +106 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/output_handlers/__init__.py +15 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/output_handlers/csv_output.py +64 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/output_handlers/output_handler_interface.py +37 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/output_handlers/parquet_output.py +65 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/py.typed +0 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/services/__init__.py +5 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/services/cli.py +485 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/services/column_builder.py +793 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/services/entity_helper.py +167 -0
- kaxanuk_data_curator-0.40.0/src/kaxanuk/data_curator/services/validator.py +15 -0
- kaxanuk_data_curator-0.40.0/templates/data_curator/Config/custom_calculations.py +58 -0
- kaxanuk_data_curator-0.40.0/templates/data_curator/Config/parameters_datacurator.xlsx +0 -0
- kaxanuk_data_curator-0.40.0/tests/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/conftest.py +62 -0
- kaxanuk_data_curator-0.40.0/tests/unit/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/data_providers/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/data_providers/data_provider_interface_test.py +194 -0
- kaxanuk_data_curator-0.40.0/tests/unit/entities/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/entities/main_identifier_test.py +34 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/calculations_test.py +1568 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/conftest.py +324 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/adjusted_price_ratio.csv +328 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/adjusted_price_ratio_calculation.csv +3841 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/average_daily_traded_value.csv +1007 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/book_to_price.csv +586 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/book_value_per_share.csv +334 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/chakin_money_flow.csv +697 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/earnings_to_price.csv +1232 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/last_twelve_months_revenue_per_share.csv +423 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/log_returns_annualized_volatility.csv +502 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/logarithmic_difference_high_low.csv +175 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/market_cap.csv +586 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/moving_average.csv +800 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/moving_average_convergence_divergence.csv +312 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/relative_strength_index.csv +443 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/fixtures/sales_to_price.csv +412 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/helpers_test.py +288 -0
- kaxanuk_data_curator-0.40.0/tests/unit/features/test_fixture_test.py +83 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/arithmetic_test.py +1227 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/boolean_test.py +387 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/comparison_test.py +376 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/concatenation_test.py +95 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/conversion_test.py +55 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/equality_test.py +854 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/iterable_test.py +113 -0
- kaxanuk_data_curator-0.40.0/tests/unit/modules/data_column/private_members_test.py +209 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/fixture_entities.py +29 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/fixtures/__init__.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/fixtures/calculations.py +12 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/instance_test.py +0 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/column_builder/non_instance_methods_test.py +1775 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/entity_helper_test.py +245 -0
- kaxanuk_data_curator-0.40.0/tests/unit/services/validator_test.py +19 -0
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.40.0] - 2025-06-04
|
|
9
|
+
### Changed
|
|
10
|
+
- First public release, now on PyPI
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [0.39] - 2025-06-03
|
|
14
|
+
### Changed
|
|
15
|
+
- `ticker` has been renamed to `main_identifier` in Excel configuration and all related code
|
|
16
|
+
- `Ticker` entity is now a `MainIdentifier` entity, with `Ticker.symbol` becoming `MainIdentifier.identifier`
|
|
17
|
+
- `MainIdentifier.identifier` now only validates that no whitespace is present
|
|
18
|
+
- `TickerNotFoundError` is now `IdentifierNotFoundError`
|
|
19
|
+
- Configuration entity no longer validates identifiers format, as different data providers will have different required formats
|
|
20
|
+
- `fi_` prefix for income statement columns now becomes `fis_`
|
|
21
|
+
- Versioning changed to remove `1.0b` prefix, as version 1.0 still requires quite a few features.
|
|
22
|
+
- `FundamentalDataRowIncome` entity is now `FundamentalDataRowIncomeStatement`
|
|
23
|
+
- `DataProviderInterface.init_config()` is now `DataProviderInterface.initialize()`
|
|
24
|
+
- `DividendDataRow.adjusted_dividend` renamed to `DividendDataRow.split_adjusted_dividend`
|
|
25
|
+
- `MarketDataDailyRow` entity fields added for all split-adjusted and dividend-and-split-adjusted data sets
|
|
26
|
+
- FMP updated all endpoints to the new "stable" version
|
|
27
|
+
- `FMP` class and all related code usages now renamed to `FinancialModelingPrep`;
|
|
28
|
+
- Parameters file now uses `financial_modeling_prep` instead of `fmp` as the provider name
|
|
29
|
+
- Renamed most calculation feature functions for consistency
|
|
30
|
+
- Updated Excel parameters file template to the new public API
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- CLI `update excel` command not working on dev
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
- `MarketDataDailyRow.adjusted_close` field, as it is now redundant
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [0.38] - 2025-05-08
|
|
40
|
+
### Added
|
|
41
|
+
- `DataColumn` comparison operators ==, !=, <, <=, >, >= for use in binary logic, filters, etc.
|
|
42
|
+
- `DataColumn.boolean_and` and `DataColumn.boolean_or` methods for boolean comparisons between multiple BooleanArray DataColumns
|
|
43
|
+
- Missing `DataColumn` reverse arithmetic operation tests
|
|
44
|
+
- `DataColumn._replace_array_mask_with_nones` private method to replace the mask of a DataColumn with None values
|
|
45
|
+
- `DataColumn` related exceptions
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
- `DataColumn` divisions involving decimal inputs now output as float64, as any decimal precision was lost in the division anyway and becomes innecessary
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## [0.37] - 2025-04-11
|
|
52
|
+
### Added
|
|
53
|
+
- Created `conftest.py` with `pytest` fixtures to load example data from CSV files used in calculation tests.
|
|
54
|
+
- Helper methods in `helpers.py` to compute technical indicators, including Exponential Moving Average (EMA).
|
|
55
|
+
- Pytest coverage for `calculations.py`, reaching 96%.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- Prefixed all functions in `calculations.py` with `c_`.
|
|
59
|
+
- Alphabetically ordered all functions in `calculations.py` and their corresponding tests.
|
|
60
|
+
- Replaced usage of `ta` library for technical indicators in almost all features, except for `c_chaikin_money_flow` and `c_relative_strength_index_14d`, which are still under development.
|
|
61
|
+
- Removed CSV-based test data fixtures previously defined directly in `calculations_test.py`.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [0.36] - 2025-03-24
|
|
65
|
+
### Changed
|
|
66
|
+
- Simplify dev installation procedure in README.md and Dockerfile
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- ExcelConfigurator: Data providers returning `validate_api_key()` as `None` should not raise an error
|
|
70
|
+
- ColumnBuilder: Extended Fundamental entity properties fail when full data period contains no fundamental data
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [0.35] - 2025-03-13
|
|
74
|
+
### Fixed
|
|
75
|
+
- `DataColumn` extended entity subclasses should now work with empty data on the first rows
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## [0.34] - 2025-03-04
|
|
79
|
+
### Added
|
|
80
|
+
- `DataProviderInterface` tests (incomplete)
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
- `DataProviderInterface._find_first_date_before_start_date_in_descending_dates` renamed to `DataProviderInterface._find_first_date_before_start_date`, added `descending_order` parameter
|
|
84
|
+
- `DataProviderInterface._find_unordered_dates_in_descending_dates` renamed to `DataProviderInterface._find_unordered_dates`, added `descending_order` parameter
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## [0.33] - 2025-02-20
|
|
88
|
+
### Changed
|
|
89
|
+
- Feature and custom calculation function names should now always start with a `c_` prefix.
|
|
90
|
+
- Improved some error texts' legibility
|
|
91
|
+
|
|
92
|
+
### Deprecated
|
|
93
|
+
- Feature and custom calculation function names without the `c_` prefix will stop working in the public release version.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## [0.32] - 2025-02-17
|
|
97
|
+
### Changed
|
|
98
|
+
- Breaking: `entity_helper.fill_fields` renamed to `entity_helper.convert_data_row_into_entity_fields`
|
|
99
|
+
- `entity_helper.convert_data_row_into_entity_fields` now skips the type conversion logic if the value is already the expected type.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## [0.31] - 2025-02-13
|
|
103
|
+
### Changed
|
|
104
|
+
- Can now subclass all fundamental statement row entities to add custom data columns
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
- Regression: Debugger initialization was not being called
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## [0.30] - 2025-01-31
|
|
111
|
+
### Changed
|
|
112
|
+
- Python 3.13 now officially supported
|
|
113
|
+
- Can now subclass `MarketDataDailyRow` to add custom market data columns
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
- CLI `update` should load the templates from the templates dir instead of the Python data dir when installed in editable mode
|
|
117
|
+
- templates dir not found when installed in editable mode on Windows
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## [0.29] - 2025-01-25
|
|
121
|
+
### Added
|
|
122
|
+
- `kaxanuk.data_curator.modules.extension_handler` aliased to `kaxanuk.data_curator.extension_handler` for loading external extension modules
|
|
123
|
+
|
|
124
|
+
### Changed
|
|
125
|
+
- YahooFinance is now a separate package, `kaxanuk.data_curator_extensions.yahoo_finance` under https://github.com/KaxaNuk/Data-Curator-Extensions_Yahoo-Finance
|
|
126
|
+
|
|
127
|
+
### Removed
|
|
128
|
+
- YahooFinance from this main package
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
## [0.28] - 2024-12-19
|
|
132
|
+
### Added
|
|
133
|
+
- Sphinx documentation generator with Readthedocs support
|
|
134
|
+
- Creation of a .py extension for parsing the calculations file and classifying its content using the `..category::` directive found in the docstring
|
|
135
|
+
- Implementation of a structure to support `.md` files located outside the docs folder
|
|
136
|
+
- Development of a Sphinx custom template for the documentation.
|
|
137
|
+
- CLI `--version` command
|
|
138
|
+
- `kaxanuk.datacurator.__package_name__`
|
|
139
|
+
- `kaxanuk.datacurator.__package_title__`
|
|
140
|
+
|
|
141
|
+
### Changed
|
|
142
|
+
- `__version__` and `__parameters_format_version__` moved from `__version__.py` to `__init__.py`
|
|
143
|
+
- Migration of the documentation structure to the `docs` folder, replacing the deprecated `Read_the_Docs` folder.
|
|
144
|
+
- Parquet and CSV output handlers no longer take `data_features_subdir` parameter, everything is saved to the `Output` folder
|
|
145
|
+
|
|
146
|
+
### Fixed
|
|
147
|
+
- Regression: YahooFinance not correctly loaded by Excel configuration entry script
|
|
148
|
+
- Editable install CLI `init` and `update` now work in any directory
|
|
149
|
+
- CLI catch `OSError` when there's a file permissions issue
|
|
150
|
+
|
|
151
|
+
### Removed
|
|
152
|
+
- `__version__.py` file
|
|
153
|
+
- `kaxanuk.datacurator.version`
|
|
154
|
+
- `Data_and_Features` subfolder
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## [0.27] - 2024-11-17
|
|
158
|
+
### Added
|
|
159
|
+
- CLI update format 'entry_script' for updating just the entry script
|
|
160
|
+
- `validate_api_key` abstract (required) method to `DataProviderInterface`
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
- `FinancialDataProviderInterface` is now `DataProviderInterface` once more
|
|
164
|
+
- `ExcelConfigurator.__init__` API changed, data_providers now receive a typed dict with `class` and `api_key` params
|
|
165
|
+
- Data provider API keys now are per provider
|
|
166
|
+
- Excel entry script now gets api keys from environment (loading from Config/.env if available)
|
|
167
|
+
- `FMP` changed `_endpoints` MappingProxyType for StrEnum
|
|
168
|
+
- `FMP.validate_api_key` makes a request to get AAPL company information
|
|
169
|
+
- Updated parameters_datacurator file version
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## [0.26] - 2024-11-13
|
|
173
|
+
### Added
|
|
174
|
+
-`Datacolumn.__neg__`
|
|
175
|
+
- Left a not implemented placeholder for `Datacolumn.__pos__` for completeness
|
|
176
|
+
|
|
177
|
+
### Changed
|
|
178
|
+
- `DataColumn.all_equal()` renamed to `DataColumn.fully_equal()`
|
|
179
|
+
- Updated usage instructions in README.md
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
- DataColumn reflected operators for +, -, *, /, //, %
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## [0.25] - 2024-11-08
|
|
186
|
+
### Added
|
|
187
|
+
- Tests to replicate reflected arithmetic operation errors.
|
|
188
|
+
- Missing typing on data_column methods.
|
|
189
|
+
- CLI interface through `services.cli`
|
|
190
|
+
- click library for the CLI implementation
|
|
191
|
+
- `.env` file to templates (unused at the moment)
|
|
192
|
+
- `__main__.py` file to templates
|
|
193
|
+
|
|
194
|
+
### Changed
|
|
195
|
+
- `DataColumn` arithmetic operation tests now grouped into classes.
|
|
196
|
+
- Docker images now install the library and use the CLI interface
|
|
197
|
+
- `templates` dir files moved into `data_curator` subdir so that installed data files are also installed in a subdir of the data dir
|
|
198
|
+
- Config templates are now in the `templates/data_curator/Config` subdir
|
|
199
|
+
- The PyCharm debugger now only depends on the `KNDC_DEBUG_PORT` env variable for activation
|
|
200
|
+
|
|
201
|
+
### Fixed
|
|
202
|
+
- GitHub workflow broke on pull request merges
|
|
203
|
+
|
|
204
|
+
### Removed
|
|
205
|
+
- `Config` dir (gets created by the CLI interface now)
|
|
206
|
+
- `Output` dir (gets created by the CLI interface now)
|
|
207
|
+
- `__main__.py` (gets created by the CLI interface now)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## [0.24] - 2024-10-12
|
|
211
|
+
### Changed
|
|
212
|
+
- FMP: use unadjustedVolume for `MarketDataDailyRow.volume`
|
|
213
|
+
- Standardized .gitignore based on the official GitHub one
|
|
214
|
+
|
|
215
|
+
### Fixed
|
|
216
|
+
- Pin Dockerfile base image to python:3.12-slim, as Python 3.13 is now a thing and Pyarrow breaks on it
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
## [0.23] - 2024-09-21
|
|
220
|
+
### Added
|
|
221
|
+
- The GitHub Actions pipeline now builds and pushes the container image to GitHub Packages when pushing the dev branch or a main branch tag.
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## [0.22] - 2024-09-21
|
|
225
|
+
### Changed
|
|
226
|
+
- `DataColumn.__getitem__` - simplified the logic
|
|
227
|
+
- First steps to build the full GitHub Packages publishing pipeline
|
|
228
|
+
|
|
229
|
+
### Fixed
|
|
230
|
+
- `FinancialDataProviderInterface._request_data` - "AttributeError: 'URLError' object has no attribute 'read'" when `_load_ssl_context` throws "ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host"
|
|
231
|
+
- `FinancialDataProviderInterface._request_data` - connection errors were still throwing up error trace after all connection attempts
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## [0.21] - 2024-08-04
|
|
235
|
+
### Added
|
|
236
|
+
- tests: `ColumnBuilder._process_columns_with_available_dependencies` now fully tested
|
|
237
|
+
|
|
238
|
+
### Changed
|
|
239
|
+
- prepended `KNDC_` to all env vars
|
|
240
|
+
- increased `parameters_datacurator.xlsx` version to 0.21
|
|
241
|
+
- `ExcelConfigurator` now receives the names of the api key env vars, and loads them itself, as otherwise the warnings can't really know if the keys were loaded from env vars or not
|
|
242
|
+
- added optional `logger_file` parameter to `data_curator.main`, to enable logging to a file
|
|
243
|
+
- Fundamental data entity error logs now include the date, where available
|
|
244
|
+
|
|
245
|
+
### Fixed
|
|
246
|
+
- `logger_level` parameter in `data_curator.main` was being ignored if `ExcelConfigurator` had been used beforehand, as it was not closing its own logger
|
|
247
|
+
- `ExcelConfigurator` now changes its own level to the one in the Excel file, as soon as it can
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## [0.20] - 2024-07-28
|
|
251
|
+
### Changed
|
|
252
|
+
- *parameters.xlsx* file renamed to *parameters_datacurator.xlsx* as a workaround for Excel's mind-numbingly idiotic inability to have 2 open files with the same name as of 2024
|
|
253
|
+
- `MarketDataDailyRow`: validate `low <= high`
|
|
254
|
+
- `MarketDataDailyRow`: validate `volume` and `vwap` are not negative
|
|
255
|
+
- `FundamentalDataRowIncome`: validate `weighted_average_shares_outstanding` and `weighted_average_shares_outstanding_diluted` are not negative
|
|
256
|
+
- `ColumnBuilder._process_columns_with_available_dependencies` is now class method, for easier unit testing
|
|
257
|
+
- pytest: added `data_column_debugger.dump_data_columns_to_csv()` fixture to conftest.py for dumping DataColumns to a csv file for debugging tests
|
|
258
|
+
- more unit tests
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
## [0.19] - 2024-06-30
|
|
262
|
+
### Added
|
|
263
|
+
- `FinancialDataProviderInterface._build_url_with_ticker_path_and_query_params` method for building standard URLs
|
|
264
|
+
- `calculations.annualized_volatility_5d()` test with csv fixture
|
|
265
|
+
|
|
266
|
+
### Changed
|
|
267
|
+
- `features.helpers.annualized_volatility` and `features.helpers.indexed_rolling_window_operation` now require kwargs as they are meant as user-facing functions
|
|
268
|
+
- improved `column_builder` typing and docstrings
|
|
269
|
+
- `FinancialDataProviderInterface._request_data` now accepts a `url_builder` callable argument for building the URLs, `_build_url_with_ticker_path_and_query_params` by default
|
|
270
|
+
- made `MarketDataDailyRow.adjusted_close` nullable
|
|
271
|
+
- refactored `DataColumn.equal()` to use both absolute and relative thresholds when comparing with `approximate_floats=true`
|
|
272
|
+
- better documentation and linting
|
|
273
|
+
|
|
274
|
+
## Fixed
|
|
275
|
+
- Fundamental Data Provider 'none' failed regression
|
|
276
|
+
- `DataColumn.equal` failed when presented 2 NullArray arguments
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
## [0.18] - 2024-05-26
|
|
280
|
+
### Added
|
|
281
|
+
- `logger_format` param to `ExcelConfigurator.__init__`
|
|
282
|
+
- `Ticker` value object for entities
|
|
283
|
+
- `services.validator` module, with a validator for date pattern strings
|
|
284
|
+
- date pattern tests for dividend and split rows
|
|
285
|
+
- package descriptions for each `__init__.py`
|
|
286
|
+
|
|
287
|
+
### Changed
|
|
288
|
+
- Started removing redundant docstring types from typehinted functions
|
|
289
|
+
- `providers` package is now `data-providers`
|
|
290
|
+
- `internals` package is now `services`
|
|
291
|
+
- entities now use `Ticker` instead of `str` for field `ticker`
|
|
292
|
+
- Moved all interface modules to their respective implementation packages
|
|
293
|
+
- test coverage report now skips fully covered files
|
|
294
|
+
|
|
295
|
+
### Fixed
|
|
296
|
+
- `ExcelConfigurator` missing checks
|
|
297
|
+
- Handle FMP throwing error 404 when symbol data not found
|
|
298
|
+
- `entity_helper.detect_field_type_errors` bug that prevented validation of all fields of an entity
|
|
299
|
+
- `entity_helper` and `validator` services now fully tested, full library test coverage @ 58%
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## [0.17] - 2024-05-12
|
|
303
|
+
### Added
|
|
304
|
+
- pdm.lock to .gitignore (don't forget to remove on main branch!)
|
|
305
|
+
- `FinancialDataProviderInterface.init_config()` method for running code before looping through each ticker
|
|
306
|
+
- `DataProviderMissingKeyError`
|
|
307
|
+
- YahooFinance missing interface implementation methods
|
|
308
|
+
- `__all__` to all `__init__.py` files, to be able to remove the `F401` linter ignore
|
|
309
|
+
- `ConfiguratorInterface`
|
|
310
|
+
|
|
311
|
+
### Changed
|
|
312
|
+
- Data providers now use object instances instead of classes
|
|
313
|
+
- Inject api keys into data providers at object initialization, removed them from individual method params
|
|
314
|
+
- `data_curator.main()` now receives individual data provider objects instead of dict with possible choices
|
|
315
|
+
- `data_curator.main()` now receives output_handlers list, runs all
|
|
316
|
+
- `data_curator.main()` now receives an int `logger_level`
|
|
317
|
+
- Complete refactor of `ExcelConfigurator`, is now an implementation of the new `ConfiguratorInterface` and has methods for outputting each dependency type
|
|
318
|
+
- `PassedArgumentError` Exception
|
|
319
|
+
|
|
320
|
+
### Fixed
|
|
321
|
+
- SplitData error with Fundamental data provider set as None
|
|
322
|
+
- data_curator.py linter G004 error
|
|
323
|
+
|
|
324
|
+
### Removed
|
|
325
|
+
- `Configuration` entity fields related to providers, handlers and loggers
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
## [0.16] - 2024-05-02
|
|
329
|
+
### Added
|
|
330
|
+
- yahoo_finance market data - yahoo!
|
|
331
|
+
|
|
332
|
+
### Changed
|
|
333
|
+
- increased parameters file version
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
## [0.15] - 2024-04-28
|
|
337
|
+
### Added
|
|
338
|
+
- split data
|
|
339
|
+
- initial entity_helper tests
|
|
340
|
+
|
|
341
|
+
### Changed
|
|
342
|
+
- MarketDataDailyRow.vwap now nullable
|
|
343
|
+
- use entity_helper.detect_field_type_errors() for all downloaded data entity validation
|
|
344
|
+
- entity_helper.fill_fields() now accepts null field correspondences
|
|
345
|
+
- updated parameters.xlsx template to add new fields, column width adjustments
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
## [0.14] - 2024-04-23
|
|
349
|
+
### Added
|
|
350
|
+
- modules/data_column 100% effective test coverage!
|
|
351
|
+
- dividend data - had to rework some internal machinery
|
|
352
|
+
- entity_helper.detect_field_type_errors() for validating entity field types
|
|
353
|
+
|
|
354
|
+
### Changed
|
|
355
|
+
- `pdm run test` now includes coverage term-missing report
|
|
356
|
+
- attribute_filler.py renamed to entity_helper.py
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
## [0.13] - 2024-04-06
|
|
360
|
+
### Added
|
|
361
|
+
- DataColumn.__mod__() actual implementation
|
|
362
|
+
- DataColumn private members tests, class coverage at 90%
|
|
363
|
+
|
|
364
|
+
### Changed
|
|
365
|
+
- Replaced generic exceptions by custom ones
|
|
366
|
+
|
|
367
|
+
### Fixed
|
|
368
|
+
- Decimal precision out of range errors on DataColumn.__add__(), .__subtract__()
|
|
369
|
+
- Decimal precision out of range error on DataColumn._mask_zeroes()
|
|
370
|
+
- Multiple DataColumn private methods minor bugs
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
## [0.12] - 2024-03-24
|
|
374
|
+
### Changed
|
|
375
|
+
- CHANGELOG.md updated Keep a Changelog link to version 1.1.0
|
|
376
|
+
- Fundamental data: missing cash flow or balance sheet now returns just the income statement data if available
|
|
377
|
+
- Improved Api server error retries handler
|
|
378
|
+
- Api server errors (after retries) now fully stop execution
|
|
379
|
+
- Publicly exposed entity classes from kaxanuk.data_curator.entities namespace
|
|
380
|
+
- Improved error handler for circular dependencies
|
|
381
|
+
- Improved error handler for missing custom calculation functions
|
|
382
|
+
- Improved error handler for Excel parameters file configuration errors
|
|
383
|
+
- Removed redundant src/kaxanuk/py.typed file
|
|
384
|
+
|
|
385
|
+
### Fixed
|
|
386
|
+
- "Decimal precision out of range" error when dividing decimal columns with too many decimals
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
## [0.11] - 2024-03-17
|
|
390
|
+
### Added
|
|
391
|
+
- pdm run install_dev
|
|
392
|
+
- parquet output handler
|
|
393
|
+
- py.typed files to declare the whole library is typehinted
|
|
394
|
+
|
|
395
|
+
### Changed
|
|
396
|
+
- now loading api_keys from env vars, only using templates/parameters.xlsx as fallback
|
|
397
|
+
- increased templates/parameters.xlsx version
|
|
398
|
+
- fixed templates/parameters.xlsx start date validation
|
|
399
|
+
- added all default output columns to templates/parameters.xlsx
|
|
400
|
+
- improved internal documentation in templates/parameters.xlsx
|
|
401
|
+
- Docker: don't uninstall pdm on dev environment
|
|
402
|
+
- renamed `pdm run test_with_coverage` to `pdm run test`
|
|
403
|
+
|
|
404
|
+
### Fixed
|
|
405
|
+
- support index tickers with ^ character
|
|
406
|
+
- "Decimal precision out of range" error when multiplying decimal columns with too many decimals
|
|
407
|
+
- ExcelConfigurator typecasting None values to 'None' string
|
|
408
|
+
- mypy configuration and some typehint errors
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
## [0.10] - 2024-03-10
|
|
412
|
+
### Added
|
|
413
|
+
- coverage tests under pytest-cov
|
|
414
|
+
|
|
415
|
+
### Changed
|
|
416
|
+
- modules/security_calculations.py is now features/calculations.py
|
|
417
|
+
- moved security_calculations helper functions into features/helpers.py
|
|
418
|
+
- moved modules/attribute_filler.py to internals/attribute_filler.py
|
|
419
|
+
- moved modules/column_builder.py to internals/column_builder.py
|
|
420
|
+
- exposed FinancialDataProviderInterface as kaxanuk.data_curator.interfaces.FinancialDataProviderInterface
|
|
421
|
+
- exposed OutputHandlerInterface as kaxanuk.data_curator.interfaces.OutputHandlerInterface
|
|
422
|
+
- refactored DataColumn tests
|
|
423
|
+
|
|
424
|
+
### Fixed
|
|
425
|
+
- Circular references error when custom calculation function parameter columns are missing from the output column list
|
|
426
|
+
- __main__.py now only injects src to sys.path if not loading as installed library
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
## [0.9] - 2024-03-03
|
|
430
|
+
### Added
|
|
431
|
+
- An actual public API for the library by means of `__all__` and imports in `__init__.py` files
|
|
432
|
+
- DataColumn methods, fully unit tested:: `all_equal`, `concatenate`, `equal`
|
|
433
|
+
- DataColumn property: `type`
|
|
434
|
+
- Basic url request retry functionality
|
|
435
|
+
|
|
436
|
+
### Changed
|
|
437
|
+
- CsvOutputter is now CsvOutput
|
|
438
|
+
- `__main__.py` now uses the public library API in its imports
|
|
439
|
+
|
|
440
|
+
### Fixed
|
|
441
|
+
- security_calculations._indexed_rolling_window_operation was broken, so last_twelve_month... functions returned wrong data
|
|
442
|
+
- Improved internal documentation
|
|
443
|
+
- Improved/simplified some type hints
|
|
444
|
+
- Regression: Empty market data no longer terminates the whole process
|
|
445
|
+
|
|
446
|
+
### Removed
|
|
447
|
+
- Numpy no longer a dependency
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
## [0.8] - 2024-02-26
|
|
451
|
+
### Added
|
|
452
|
+
- pytest pyarrow_helper fixture, for helper functions for testing PyArrow arrays
|
|
453
|
+
|
|
454
|
+
### Changed
|
|
455
|
+
- No more Numpy! DataColumn, and thus security_calculations, now work on top of PyArrow!
|
|
456
|
+
- DataColumn public API changed, but operator overloading works the same
|
|
457
|
+
- security_calculations refactor as PyArrow simplifies many operations, allows easier use of pandas
|
|
458
|
+
- security_calculations output columns are automatically wrapped in DataColumn
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
## [0.7] - 2024-02-11
|
|
462
|
+
### Added
|
|
463
|
+
- Add main() optional parameter logger_format, for configuring the logger
|
|
464
|
+
|
|
465
|
+
### Changed
|
|
466
|
+
- Make entity attribute typing/casting errors more explicit
|
|
467
|
+
- Remove revenue>=0 checks
|
|
468
|
+
- Simplify entity attribute type validations
|
|
469
|
+
- Change the default logger format for more readable logs
|
|
470
|
+
- Allow floats as entity attribute type
|
|
471
|
+
- Moved all general helper methods from FMP to FinancialDataProviderInterface, so any provider can use them
|
|
472
|
+
|
|
473
|
+
### Fixed
|
|
474
|
+
- Require Configurator.start_date and end_date to be explicitly datetime.date
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
## [0.6] - 2024-02-05
|
|
478
|
+
### Fixed
|
|
479
|
+
- Add blank FundamentalData rows for ommited data (in case of ammendments, missing fundamentals, &c.)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
## [0.5] - 2024-02-04
|
|
483
|
+
### Added
|
|
484
|
+
- Custom exceptions
|
|
485
|
+
- New library dependency for semver version comparisons: packaging
|
|
486
|
+
|
|
487
|
+
### Changed
|
|
488
|
+
- New parameters file template
|
|
489
|
+
- Now versioning the parameters file formats, and checking them in ExcelConfigurator
|
|
490
|
+
- Fundamental data provider can be now set independently of market data one, or even as disabled
|
|
491
|
+
- Separate input and config handlers into their own folders
|
|
492
|
+
- Rename the "quarter" period to "quarterly" in config
|
|
493
|
+
|
|
494
|
+
### Fixed
|
|
495
|
+
- Missing fundamental data for a ticker will only omit that data, but keep the market data
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
## [0.4] - 2024-02-03
|
|
499
|
+
### Changed
|
|
500
|
+
- Replace numpy.array with custom DataColumn to remove "where" kwarg boilerplate code.
|
|
501
|
+
- Inject custom calculations from entry script
|
|
502
|
+
- Move templates outside src
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
## [0.3] - 2024-01-07
|
|
506
|
+
- Restructure src to implement under organization/project_name namespace.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright since 2022 KaxaNuk SC
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: kaxanuk.data_curator
|
|
3
|
+
Version: 0.40.0
|
|
4
|
+
Summary: Tool for retrieving and combining financial and related data for informing security investments
|
|
5
|
+
Author-Email: Rinku Kazeno <rinku.kazeno@kaxanuk.mx>, Ruben Flores <ruben.flores@kaxanuk.mx>, Arturo Aguilar <arturo.aguilar@kaxanuk.mx>
|
|
6
|
+
License: MIT License
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Project-URL: Homepage, https://kaxanuk.mx
|
|
11
|
+
Project-URL: Repository, https://github.com/KaxaNuk/Data-Curator
|
|
12
|
+
Project-URL: Issues, https://github.com/KaxaNuk/Data-Curator/issues
|
|
13
|
+
Project-URL: Changelog, https://github.com/KaxaNuk/Data-Curator/blob/main/CHANGELOG.md
|
|
14
|
+
Requires-Python: <3.14,>=3.12
|
|
15
|
+
Requires-Dist: click>=8.1.7
|
|
16
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
17
|
+
Requires-Dist: packaging>=24.2
|
|
18
|
+
Requires-Dist: pandas>=2.2.3
|
|
19
|
+
Requires-Dist: pandas_ta>=0.3.14b
|
|
20
|
+
Requires-Dist: pyarrow>=18.0
|
|
21
|
+
Requires-Dist: ta>=0.11
|
|
22
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# KaxaNuk Data Curator
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
[](https://github.com/KaxaNuk/Data-Curator/actions/workflows/main.yml)
|
|
30
|
+
|
|
31
|
+
Tool for building a structured database for market, fundamental and alternative data obtained
|
|
32
|
+
from different financial data provider web services.
|
|
33
|
+
|
|
34
|
+
Allows for easy creation of additional calculated column functions.
|
|
35
|
+
|
|
36
|
+
# Requirements
|
|
37
|
+
* Python `3.12` or `3.13`
|
|
38
|
+
* All the dependency library versions specified in `pyproject.toml` under the `[project].dependencies` section
|
|
39
|
+
(see the installation guide)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Supported Data Providers
|
|
43
|
+
* Financial Modeling Prep
|
|
44
|
+
* Yahoo Finance (requires installing a separate extension package, and doesn't support most data types)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Installation
|
|
48
|
+
1. Make sure you're running the required version of Python, preferably in its own virtual environment.
|
|
49
|
+
2. Open a terminal and run:
|
|
50
|
+
```
|
|
51
|
+
pip install --upgrade pip
|
|
52
|
+
pip install kaxanuk.data_curator
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
3. If you want to use the Yahoo Finance data provider, install the extension package:
|
|
56
|
+
```
|
|
57
|
+
pip install kaxanuk.data_curator_extensions.yahoo_finance
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Configuration
|
|
62
|
+
1. Open a terminal in any directory and run the following command:
|
|
63
|
+
```
|
|
64
|
+
kaxanuk.data_curator init excel
|
|
65
|
+
```
|
|
66
|
+
This should create 2 subdirectories, `Config` and `Output`, as well as the entry script `__main__.py` in the current directory.
|
|
67
|
+
2. Open the `Config/parameters_datacurator.xlsx` file in Excel, fill out the fields in all the sheets, save the file and close it.
|
|
68
|
+
3. If your data provider requires an API key, open the `Config/.env` file in a text editor, and paste the key after
|
|
69
|
+
the `=` sign of the provider's corresponding `API_KEY` variable. Don't add any quotes or spaces before or after the key.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# Usage
|
|
73
|
+
Now you can run the entry script with either:
|
|
74
|
+
```
|
|
75
|
+
kaxanuk.data_curator run
|
|
76
|
+
```
|
|
77
|
+
or by executing the `__main__.py` script directly with Python:
|
|
78
|
+
```
|
|
79
|
+
python __main__.py
|
|
80
|
+
```
|
|
81
|
+
The system will download the data for the tickers configured in the file, and save the data to the `Output` folder.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Customization
|
|
85
|
+
The `__main__.py` entry script is customizable, so you can implement your own data providers and configuration and output
|
|
86
|
+
handlers, and inject them from there.
|
|
87
|
+
|
|
88
|
+
You can also create your own calculated feature functions by adding them to the `Config/custom_calculations.py` file, and
|
|
89
|
+
adding the function's name (which start with the `c_` prefix) to the `Columns` sheet in the `Config/parameters_datacurator.xlsx` file.
|
|
90
|
+
|
|
91
|
+
Check the API Reference to learn how to easily implement your own calculated features.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# KaxaNuk Data Curator
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://github.com/KaxaNuk/Data-Curator/actions/workflows/main.yml)
|
|
6
|
+
|
|
7
|
+
Tool for building a structured database for market, fundamental and alternative data obtained
|
|
8
|
+
from different financial data provider web services.
|
|
9
|
+
|
|
10
|
+
Allows for easy creation of additional calculated column functions.
|
|
11
|
+
|
|
12
|
+
# Requirements
|
|
13
|
+
* Python `3.12` or `3.13`
|
|
14
|
+
* All the dependency library versions specified in `pyproject.toml` under the `[project].dependencies` section
|
|
15
|
+
(see the installation guide)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Supported Data Providers
|
|
19
|
+
* Financial Modeling Prep
|
|
20
|
+
* Yahoo Finance (requires installing a separate extension package, and doesn't support most data types)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Installation
|
|
24
|
+
1. Make sure you're running the required version of Python, preferably in its own virtual environment.
|
|
25
|
+
2. Open a terminal and run:
|
|
26
|
+
```
|
|
27
|
+
pip install --upgrade pip
|
|
28
|
+
pip install kaxanuk.data_curator
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
3. If you want to use the Yahoo Finance data provider, install the extension package:
|
|
32
|
+
```
|
|
33
|
+
pip install kaxanuk.data_curator_extensions.yahoo_finance
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Configuration
|
|
38
|
+
1. Open a terminal in any directory and run the following command:
|
|
39
|
+
```
|
|
40
|
+
kaxanuk.data_curator init excel
|
|
41
|
+
```
|
|
42
|
+
This should create 2 subdirectories, `Config` and `Output`, as well as the entry script `__main__.py` in the current directory.
|
|
43
|
+
2. Open the `Config/parameters_datacurator.xlsx` file in Excel, fill out the fields in all the sheets, save the file and close it.
|
|
44
|
+
3. If your data provider requires an API key, open the `Config/.env` file in a text editor, and paste the key after
|
|
45
|
+
the `=` sign of the provider's corresponding `API_KEY` variable. Don't add any quotes or spaces before or after the key.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Usage
|
|
49
|
+
Now you can run the entry script with either:
|
|
50
|
+
```
|
|
51
|
+
kaxanuk.data_curator run
|
|
52
|
+
```
|
|
53
|
+
or by executing the `__main__.py` script directly with Python:
|
|
54
|
+
```
|
|
55
|
+
python __main__.py
|
|
56
|
+
```
|
|
57
|
+
The system will download the data for the tickers configured in the file, and save the data to the `Output` folder.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# Customization
|
|
61
|
+
The `__main__.py` entry script is customizable, so you can implement your own data providers and configuration and output
|
|
62
|
+
handlers, and inject them from there.
|
|
63
|
+
|
|
64
|
+
You can also create your own calculated feature functions by adding them to the `Config/custom_calculations.py` file, and
|
|
65
|
+
adding the function's name (which start with the `c_` prefix) to the `Columns` sheet in the `Config/parameters_datacurator.xlsx` file.
|
|
66
|
+
|
|
67
|
+
Check the API Reference to learn how to easily implement your own calculated features.
|