siglab-py 0.5.60__tar.gz → 0.5.62__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.

Potentially problematic release.


This version of siglab-py might be problematic. Click here for more details.

Files changed (45) hide show
  1. {siglab_py-0.5.60 → siglab_py-0.5.62}/PKG-INFO +1 -1
  2. {siglab_py-0.5.60 → siglab_py-0.5.62}/pyproject.toml +1 -1
  3. {siglab_py-0.5.60 → siglab_py-0.5.62}/setup.cfg +1 -1
  4. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/simple_math.py +20 -1
  5. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py.egg-info/PKG-INFO +1 -1
  6. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/__init__.py +0 -0
  7. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/constants.py +0 -0
  8. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/exchanges/__init__.py +0 -0
  9. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/exchanges/any_exchange.py +0 -0
  10. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/exchanges/futubull.py +0 -0
  11. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/__init__.py +0 -0
  12. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/aggregated_orderbook_provider.py +0 -0
  13. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/candles_provider.py +0 -0
  14. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/candles_ta_provider.py +0 -0
  15. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/ccxt_candles_ta_to_csv.py +0 -0
  16. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/deribit_options_expiry_provider.py +0 -0
  17. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/futu_candles_ta_to_csv.py +0 -0
  18. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/orderbooks_provider.py +0 -0
  19. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/test_provider.py +0 -0
  20. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/market_data_providers/tg_monitor.py +0 -0
  21. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/ordergateway/__init__.py +0 -0
  22. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/ordergateway/client.py +0 -0
  23. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/ordergateway/encrypt_keys_util.py +0 -0
  24. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/ordergateway/gateway.py +0 -0
  25. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/ordergateway/test_ordergateway.py +0 -0
  26. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/__init__.py +0 -0
  27. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/integration/__init__.py +0 -0
  28. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/integration/market_data_util_tests.py +0 -0
  29. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/unit/__init__.py +0 -0
  30. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/unit/analytic_util_tests.py +0 -0
  31. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/unit/market_data_util_tests.py +0 -0
  32. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/unit/simple_math_tests.py +0 -0
  33. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/tests/unit/trading_util_tests.py +0 -0
  34. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/__init__.py +0 -0
  35. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/analytic_util.py +0 -0
  36. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/aws_util.py +0 -0
  37. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/market_data_util.py +0 -0
  38. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/notification_util.py +0 -0
  39. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/retry_util.py +0 -0
  40. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/slack_notification_util.py +0 -0
  41. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py/util/trading_util.py +0 -0
  42. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py.egg-info/SOURCES.txt +0 -0
  43. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py.egg-info/dependency_links.txt +0 -0
  44. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py.egg-info/requires.txt +0 -0
  45. {siglab_py-0.5.60 → siglab_py-0.5.62}/siglab_py.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: siglab_py
3
- Version: 0.5.60
3
+ Version: 0.5.62
4
4
  Summary: Market data fetches, TA calculations and generic order gateway.
5
5
  Author: r0bbarh00d
6
6
  Author-email: r0bbarh00d <r0bbarh00d@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "siglab_py"
7
- version = "0.5.60"
7
+ version = "0.5.62"
8
8
  description = "Market data fetches, TA calculations and generic order gateway."
9
9
  authors = [{name = "r0bbarh00d", email = "r0bbarh00d@gmail.com"}]
10
10
  license = {text = "MIT"}
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = siglab_py
3
- version = 0.5.60
3
+ version = 0.5.62
4
4
  description = Market data fetches, TA calculations and generic order gateway.
5
5
  author = r0bbarh00d
6
6
  author_email = r0bbarh00d@gmail.com
@@ -2,6 +2,8 @@ import math
2
2
  import random
3
3
  from typing import List, Dict, Union
4
4
 
5
+ from pandas import isna
6
+
5
7
  def generate_rand_nums(
6
8
  range_min : float = 0,
7
9
  range_max : float = 1,
@@ -35,8 +37,10 @@ def round_to_level(
35
37
  num : float,
36
38
  level_granularity : float = 0.01
37
39
  ) -> float:
40
+ if math.isnan(num):
41
+ return num
38
42
  level_size = num * level_granularity
39
- magnitude = math.floor(math.log10(level_size))
43
+ magnitude = math.floor(math.log10(abs(level_size)))
40
44
  base_increment = 10 ** magnitude
41
45
  rounded_level_size = round(level_size / base_increment) * base_increment
42
46
  rounded_num = round(num / rounded_level_size) * rounded_level_size
@@ -56,8 +60,23 @@ def bucket_series(
56
60
  ] = {}
57
61
  list_0_to_1 : bool = True if len([x for x in values if x<0 or x>1])/len(values)*100 <= outlier_threshold_percent else False
58
62
  list_m1_to_1 : bool = True if len([x for x in values if x<-1 or x>1])/len(values)*100 <= outlier_threshold_percent else False
63
+
59
64
  list_0_to_100 : bool = True if len([x for x in values if x<0 or x>100])/len(values)*100 <= outlier_threshold_percent else False
65
+ if (
66
+ list_0_to_100
67
+ and (
68
+ not min(values)<100*(outlier_threshold_percent/100) or not max(values)>100*(1-outlier_threshold_percent/100)
69
+ )
70
+ ):
71
+ list_0_to_100 = False
60
72
  list_m100_to_100 : bool = True if len([x for x in values if x<-100 or x>100])/len(values)*100 <= outlier_threshold_percent else False
73
+ if (
74
+ list_m100_to_100
75
+ and (
76
+ not min(values)<-100*(1-outlier_threshold_percent/100) or not max(values)>100*(1-outlier_threshold_percent/100)
77
+ )
78
+ ):
79
+ list_m100_to_100 = False
61
80
 
62
81
  def _generate_sequence(start, stop, step):
63
82
  result = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: siglab_py
3
- Version: 0.5.60
3
+ Version: 0.5.62
4
4
  Summary: Market data fetches, TA calculations and generic order gateway.
5
5
  Author: r0bbarh00d
6
6
  Author-email: r0bbarh00d <r0bbarh00d@gmail.com>