siglab-py 0.5.15__tar.gz → 0.5.17__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.
- {siglab_py-0.5.15 → siglab_py-0.5.17}/PKG-INFO +2 -5
- {siglab_py-0.5.15 → siglab_py-0.5.17}/pyproject.toml +1 -1
- {siglab_py-0.5.15 → siglab_py-0.5.17}/setup.cfg +1 -1
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/unit/analytic_util_tests.py +2 -2
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/analytic_util.py +8 -6
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py.egg-info/PKG-INFO +3 -6
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/constants.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/exchanges/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/exchanges/any_exchange.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/exchanges/futubull.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/aggregated_orderbook_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/candles_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/candles_ta_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/ccxt_candles_ta_to_csv.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/deribit_options_expiry_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/futu_candles_ta_to_csv.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/orderbooks_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/test_provider.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/tg_monitor.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/ordergateway/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/ordergateway/client.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/ordergateway/encrypt_keys_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/ordergateway/gateway.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/ordergateway/test_ordergateway.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/integration/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/integration/market_data_util_tests.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/unit/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/unit/market_data_util_tests.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/tests/unit/trading_util_tests.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/__init__.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/aws_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/market_data_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/notification_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/retry_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/slack_notification_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/util/trading_util.py +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py.egg-info/SOURCES.txt +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py.egg-info/dependency_links.txt +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py.egg-info/requires.txt +0 -0
- {siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: siglab_py
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.17
|
|
4
4
|
Summary: Market data fetches, TA calculations and generic order gateway.
|
|
5
5
|
Author: r0bbarh00d
|
|
6
6
|
Author-email: r0bbarh00d <r0bbarh00d@gmail.com>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Homepage, https://github.com/r0bbar/siglab/blob/master/siglab_py/README.md
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
9
|
Requires-Python: >=3.9.19
|
|
13
10
|
Description-Content-Type: text/markdown
|
|
14
11
|
Requires-Dist: python-dotenv
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "siglab_py"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.17"
|
|
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"}
|
|
@@ -56,7 +56,7 @@ class AnalyticUtilTests(unittest.TestCase):
|
|
|
56
56
|
'chop_against_ema',
|
|
57
57
|
'ema_volume_short_periods', 'ema_volume_long_periods',
|
|
58
58
|
'max_short_periods', 'max_long_periods', 'idmax_short_periods', 'idmax_long_periods', 'min_short_periods', 'min_long_periods', 'idmin_short_periods', 'idmin_long_periods',
|
|
59
|
-
'h_l', 'h_pc', 'l_pc', 'tr', 'atr',
|
|
59
|
+
'h_l', 'h_pc', 'l_pc', 'tr', 'atr', 'atr_avg_short_periods', 'atr_avg_long_periods',
|
|
60
60
|
'hurst_exp',
|
|
61
61
|
'boillenger_upper', 'boillenger_lower', 'boillenger_channel_height', 'boillenger_upper_agg', 'boillenger_lower_agg', 'boillenger_channel_height_agg',
|
|
62
62
|
'aggressive_up', 'aggressive_up_index', 'aggressive_up_candle_height', 'aggressive_up_candle_high', 'aggressive_up_candle_low', 'aggressive_down', 'aggressive_down_index', 'aggressive_down_candle_height', 'aggressive_down_candle_high', 'aggressive_down_candle_low',
|
|
@@ -66,7 +66,7 @@ class AnalyticUtilTests(unittest.TestCase):
|
|
|
66
66
|
'typical_price',
|
|
67
67
|
'money_flow', 'money_flow_positive', 'money_flow_negative', 'positive_flow_sum', 'negative_flow_sum', 'money_flow_ratio', 'mfi',
|
|
68
68
|
'macd', 'signal', 'macd_minus_signal',
|
|
69
|
-
'
|
|
69
|
+
'fib_0.618_short_periods', 'fib_0.618_long_periods',
|
|
70
70
|
'gap_close_vs_ema',
|
|
71
71
|
'close_above_or_below_ema',
|
|
72
72
|
'close_vs_ema_inflection'
|
|
@@ -86,6 +86,7 @@ def compute_candles_stats(
|
|
|
86
86
|
rsi_sliding_window_how_many_candles : Union[int, None] = None, # RSI standard 14
|
|
87
87
|
hurst_exp_window_how_many_candles : Union[int, None] = None, # Hurst exp standard 100-200
|
|
88
88
|
boillenger_std_multiples_for_aggressive_moves_detect : int = 3, # Aggressive moves if candle low/high breaches boillenger bands from 3 standard deviations.
|
|
89
|
+
target_fib_level : float = 0.618,
|
|
89
90
|
pypy_compat : bool = True
|
|
90
91
|
):
|
|
91
92
|
pd_candles['candle_height'] = pd_candles['high'] - pd_candles['low']
|
|
@@ -173,7 +174,9 @@ def compute_candles_stats(
|
|
|
173
174
|
pd_candles.loc[:,'l_pc'] = abs(pd_candles['low'] - pd_candles['close'].shift(1))
|
|
174
175
|
pd_candles.loc[:,'tr'] = pd_candles[['h_l', 'h_pc', 'l_pc']].max(axis=1)
|
|
175
176
|
pd_candles.loc[:,'atr'] = pd_candles['tr'].rolling(window=sliding_window_how_many_candles).mean()
|
|
176
|
-
|
|
177
|
+
pd_candles.loc[:,'atr_avg_short_periods'] = pd_candles['atr'].rolling(window=int(sliding_window_how_many_candles/slow_fast_interval_ratio)).mean()
|
|
178
|
+
pd_candles.loc[:,'atr_avg_long_periods'] = pd_candles['atr'].rolling(window=sliding_window_how_many_candles).mean()
|
|
179
|
+
|
|
177
180
|
|
|
178
181
|
'''
|
|
179
182
|
@hardcode @todo
|
|
@@ -373,9 +376,9 @@ def compute_candles_stats(
|
|
|
373
376
|
rsi_upper_threshold : float = 70,
|
|
374
377
|
rsi_lower_threshold : float = 30):
|
|
375
378
|
if row['rsi_idmax'] > row['rsi_idmin']:
|
|
376
|
-
return '
|
|
379
|
+
return 'down' if row.name > row['rsi_idmax'] and row['rsi'] <= rsi_upper_threshold else 'up'
|
|
377
380
|
else:
|
|
378
|
-
return '
|
|
381
|
+
return 'up' if row.name > row['rsi_idmin'] and row['rsi'] >= rsi_lower_threshold else 'down'
|
|
379
382
|
|
|
380
383
|
pd_candles['rsi_trend'] = pd_candles.apply(lambda row: rsi_trend(row), axis=1)
|
|
381
384
|
|
|
@@ -459,9 +462,8 @@ def compute_candles_stats(
|
|
|
459
462
|
|
|
460
463
|
|
|
461
464
|
# Fibonacci
|
|
462
|
-
|
|
463
|
-
pd_candles['
|
|
464
|
-
pd_candles['fib_618_long_periods'] = pd_candles.apply(lambda rw : estimate_fib_retracement(rw['min_long_periods'], rw['idmin_long_periods'], rw['max_long_periods'], rw['idmax_long_periods'], TARGET_FIB_LEVEL), axis=1)
|
|
465
|
+
pd_candles[f'fib_{target_fib_level}_short_periods'] = pd_candles.apply(lambda rw : estimate_fib_retracement(rw['min_short_periods'], rw['idmin_short_periods'], rw['max_short_periods'], rw['idmax_short_periods'], target_fib_level), axis=1)
|
|
466
|
+
pd_candles[f'fib_{target_fib_level}_long_periods'] = pd_candles.apply(lambda rw : estimate_fib_retracement(rw['min_long_periods'], rw['idmin_long_periods'], rw['max_long_periods'], rw['idmax_long_periods'], target_fib_level), axis=1)
|
|
465
467
|
|
|
466
468
|
|
|
467
469
|
# Inflection points
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.5.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: siglab_py
|
|
3
|
+
Version: 0.5.17
|
|
4
4
|
Summary: Market data fetches, TA calculations and generic order gateway.
|
|
5
5
|
Author: r0bbarh00d
|
|
6
6
|
Author-email: r0bbarh00d <r0bbarh00d@gmail.com>
|
|
7
7
|
License: MIT
|
|
8
8
|
Project-URL: Homepage, https://github.com/r0bbar/siglab/blob/master/siglab_py/README.md
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
9
|
Requires-Python: >=3.9.19
|
|
13
10
|
Description-Content-Type: text/markdown
|
|
14
11
|
Requires-Dist: python-dotenv
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/candles_ta_provider.py
RENAMED
|
File without changes
|
{siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/ccxt_candles_ta_to_csv.py
RENAMED
|
File without changes
|
|
File without changes
|
{siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/futu_candles_ta_to_csv.py
RENAMED
|
File without changes
|
{siglab_py-0.5.15 → siglab_py-0.5.17}/siglab_py/market_data_providers/orderbooks_provider.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|