detquantlib 3.5.0__tar.gz → 3.5.1__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.5.0 → detquantlib-3.5.1}/PKG-INFO +1 -1
  2. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/databases/detdatabase.py +7 -10
  3. {detquantlib-3.5.0 → detquantlib-3.5.1}/pyproject.toml +1 -1
  4. {detquantlib-3.5.0 → detquantlib-3.5.1}/LICENSE.txt +0 -0
  5. {detquantlib-3.5.0 → detquantlib-3.5.1}/README.md +0 -0
  6. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/__init__.py +0 -0
  7. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/__init__.py +0 -0
  8. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/entsoe/entsoe.py +0 -0
  9. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/data/sftp/sftp.py +0 -0
  10. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/dates/__init__.py +0 -0
  11. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/dates/dates.py +0 -0
  12. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/figures/__init__.py +0 -0
  13. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/figures/plotly_figures.py +0 -0
  14. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/outputs/__init__.py +0 -0
  15. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/outputs/outputs_interface.py +0 -0
  16. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/stats/__init__.py +0 -0
  17. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/stats/data_analysis.py +0 -0
  18. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/tradable_products/__init__.py +0 -0
  19. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/tradable_products/tradable_products.py +0 -0
  20. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/utils/__init__.py +0 -0
  21. {detquantlib-3.5.0 → detquantlib-3.5.1}/detquantlib/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: detquantlib
3
- Version: 3.5.0
3
+ Version: 3.5.1
4
4
  Summary: An internal library containing functions and classes that can be used across Quant models.
5
5
  Author: DET
6
6
  Requires-Python: >=3.10,<4.0
@@ -233,18 +233,16 @@ class DetDatabase:
233
233
  )
234
234
 
235
235
  # Convert date columns to timezone-aware dates
236
- cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)"]
236
+ cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)", "InsertionTimestamp"]
237
237
  for c in cols_date_utc:
238
238
  if c in df.columns:
239
239
  df[c] = df[c].dt.tz_localize("UTC")
240
- if "InsertionTimestamp" in df.columns:
241
- df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize(timezone)
242
240
 
243
241
  # Add column with delivery date expressed in local timezone
244
242
  df[f"DateTime({timezone})"] = df["DateTime(UTC)"].dt.tz_convert(timezone)
245
243
 
246
244
  if not timezone_aware_dates:
247
- cols_date_all = cols_date_utc + ["InsertionTimestamp", f"DateTime({timezone})"]
245
+ cols_date_all = cols_date_utc + [f"DateTime({timezone})"]
248
246
  for c in cols_date_all:
249
247
  if c in df.columns:
250
248
  df[c] = df[c].dt.tz_localize(None)
@@ -435,18 +433,16 @@ class DetDatabase:
435
433
  )
436
434
 
437
435
  # Convert date columns to timezone-aware dates
438
- cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)"]
436
+ cols_date_utc = ["DateTime(UTC)", "UpdateTime(UTC)", "InsertionTimestamp"]
439
437
  for c in cols_date_utc:
440
438
  if c in df.columns:
441
439
  df[c] = df[c].dt.tz_localize("UTC")
442
- if "InsertionTimestamp" in df.columns:
443
- df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize(timezone)
444
440
 
445
441
  # Add column with delivery date expressed in local timezone
446
442
  df[f"DateTime({timezone})"] = df["DateTime(UTC)"].dt.tz_convert(timezone)
447
443
 
448
444
  if not timezone_aware_dates:
449
- cols_date_all = cols_date_utc + ["InsertionTimestamp", f"DateTime({timezone})"]
445
+ cols_date_all = cols_date_utc + [f"DateTime({timezone})"]
450
446
  for c in cols_date_all:
451
447
  if c in df.columns:
452
448
  df[c] = df[c].dt.tz_localize(None)
@@ -589,8 +585,9 @@ class DetDatabase:
589
585
  timezone = commodity_info["Timezone"]
590
586
 
591
587
  # Convert timezone-naive to timezone-aware dates
592
- cols_datetime = ["TradingDate", "DeliveryStart", "DeliveryEnd", "InsertionTimestamp"]
593
- for c in cols_datetime:
588
+ df["InsertionTimestamp"] = df["InsertionTimestamp"].dt.tz_localize("UTC")
589
+ cols_local_tz = ["TradingDate", "DeliveryStart", "DeliveryEnd"]
590
+ for c in cols_local_tz:
594
591
  if c in df.columns:
595
592
  df[c] = df[c].dt.tz_localize(timezone)
596
593
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "detquantlib"
3
- version = "3.5.0"
3
+ version = "3.5.1"
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"
File without changes
File without changes