detquantlib 3.10.1__tar.gz → 3.10.3__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.
Files changed (21) hide show
  1. {detquantlib-3.10.1 → detquantlib-3.10.3}/PKG-INFO +2 -1
  2. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/tradable_products/tradable_products.py +7 -3
  3. {detquantlib-3.10.1 → detquantlib-3.10.3}/pyproject.toml +6 -5
  4. {detquantlib-3.10.1 → detquantlib-3.10.3}/LICENSE.txt +0 -0
  5. {detquantlib-3.10.1 → detquantlib-3.10.3}/README.md +0 -0
  6. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/__init__.py +0 -0
  7. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/data/__init__.py +0 -0
  8. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/data/databases/detdatabase.py +0 -0
  9. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/data/entsoe/entsoe.py +0 -0
  10. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/data/sftp/sftp.py +0 -0
  11. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/dates/__init__.py +0 -0
  12. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/dates/dates.py +0 -0
  13. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/figures/__init__.py +0 -0
  14. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/figures/plotly_figures.py +0 -0
  15. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/outputs/__init__.py +0 -0
  16. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/outputs/outputs_interface.py +0 -0
  17. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/stats/__init__.py +0 -0
  18. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/stats/data_analysis.py +0 -0
  19. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/tradable_products/__init__.py +0 -0
  20. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/utils/__init__.py +0 -0
  21. {detquantlib-3.10.1 → detquantlib-3.10.3}/detquantlib/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: detquantlib
3
- Version: 3.10.1
3
+ Version: 3.10.3
4
4
  Summary: An internal library containing functions and classes that can be used across Quant models.
5
5
  License-File: LICENSE.txt
6
6
  Author: DET
@@ -15,6 +15,7 @@ Requires-Dist: numpy (>=2.2.6,<3.0.0)
15
15
  Requires-Dist: pandas (>=2.3.3,<3.0.0)
16
16
  Requires-Dist: paramiko (>=4.0.0,<5.0.0)
17
17
  Requires-Dist: plotly (>=6.3.1,<7.0.0)
18
+ Requires-Dist: pyarrow (>=21.0.0,<22.0.0)
18
19
  Requires-Dist: pyodbc (>=5.2.0,<6.0.0)
19
20
  Requires-Dist: python-dotenv (>=1.1.0,<2.0.0)
20
21
  Requires-Dist: scipy (>=1.15.2,<2.0.0)
@@ -1,6 +1,6 @@
1
1
  # Python built-in packages
2
2
  import math
3
- from datetime import datetime
3
+ from datetime import datetime, time
4
4
  from typing import Literal
5
5
 
6
6
  # Third-party packages
@@ -35,14 +35,18 @@ def convert_delivery_start_date_to_maturity(
35
35
  # Make input product string lower case only
36
36
  product = product.lower()
37
37
 
38
+ # Set trading date and delivery date to midnight
39
+ trading_date = datetime.combine(trading_date, time())
40
+ delivery_start_date = datetime.combine(delivery_start_date, time())
41
+
38
42
  if product == "day":
39
43
  maturity = (delivery_start_date - trading_date).days
40
44
 
41
45
  elif product == "week":
42
- maturity = math.ceil((delivery_start_date - trading_date).ceil("D").days / 7)
46
+ maturity = math.ceil((delivery_start_date - trading_date).days / 7)
43
47
 
44
48
  elif product == "weekend":
45
- maturity = math.ceil((delivery_start_date - trading_date).ceil("D").days / 7)
49
+ maturity = math.ceil((delivery_start_date - trading_date).days / 7)
46
50
 
47
51
  elif product == "month":
48
52
  maturity = calc_months_diff(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "detquantlib"
3
- version = "3.10.1"
3
+ version = "3.10.3"
4
4
  description = "An internal library containing functions and classes that can be used across Quant models."
5
5
  authors = ["DET"]
6
6
  readme = "README.md"
@@ -11,14 +11,15 @@ packages = [
11
11
 
12
12
  [tool.poetry.dependencies]
13
13
  python = ">=3.10,<4.0"
14
+ python-dotenv = "^1.1.0"
14
15
  paramiko = "^4.0.0"
16
+ pyodbc = "^5.2.0"
17
+ sqlalchemy = "^2.0.43"
18
+ plotly = "^6.3.1"
15
19
  numpy = "^2.2.6"
16
20
  pandas = "^2.3.3"
17
- plotly = "^6.3.1"
18
- python-dotenv = "^1.1.0"
21
+ pyarrow = "^21.0.0"
19
22
  scipy = "^1.15.2"
20
- sqlalchemy = "^2.0.43"
21
- pyodbc = "^5.2.0"
22
23
 
23
24
  [tool.poetry.group.dev.dependencies]
24
25
  toml = "^0.10.2"
File without changes
File without changes