siglab-py 0.5.51__tar.gz → 0.5.52__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.
- {siglab_py-0.5.51 → siglab_py-0.5.52}/PKG-INFO +1 -1
- {siglab_py-0.5.51 → siglab_py-0.5.52}/pyproject.toml +1 -1
- {siglab_py-0.5.51 → siglab_py-0.5.52}/setup.cfg +1 -1
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/unit/analytic_util_tests.py +2 -2
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/analytic_util.py +8 -4
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py.egg-info/PKG-INFO +1 -1
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/constants.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/exchanges/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/exchanges/any_exchange.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/exchanges/futubull.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/aggregated_orderbook_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/candles_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/candles_ta_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/ccxt_candles_ta_to_csv.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/deribit_options_expiry_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/futu_candles_ta_to_csv.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/orderbooks_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/test_provider.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/tg_monitor.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/ordergateway/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/ordergateway/client.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/ordergateway/encrypt_keys_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/ordergateway/gateway.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/ordergateway/test_ordergateway.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/integration/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/integration/market_data_util_tests.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/unit/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/unit/market_data_util_tests.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/unit/simple_math_tests.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/tests/unit/trading_util_tests.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/__init__.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/aws_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/market_data_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/notification_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/retry_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/simple_math.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/slack_notification_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/util/trading_util.py +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py.egg-info/SOURCES.txt +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py.egg-info/dependency_links.txt +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py.egg-info/requires.txt +0 -0
- {siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py.egg-info/top_level.txt +0 -0
|
@@ -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.52"
|
|
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"}
|
|
@@ -67,9 +67,9 @@ class AnalyticUtilTests(unittest.TestCase):
|
|
|
67
67
|
'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',
|
|
68
68
|
'fvg_low', 'fvg_high', 'fvg_gap', 'fvg_mitigated',
|
|
69
69
|
'close_delta', 'close_delta_percent', 'up', 'down',
|
|
70
|
-
'rsi', 'ema_rsi', 'rsi_max', 'rsi_idmax', 'rsi_min', 'rsi_idmin', 'rsi_trend', 'rsi_trend_from_highs', 'rsi_trend_from_lows', 'rsi_divergence',
|
|
70
|
+
'rsi', 'rsi_bucket', 'ema_rsi', 'rsi_max', 'rsi_idmax', 'rsi_min', 'rsi_idmin', 'rsi_trend', 'rsi_trend_from_highs', 'rsi_trend_from_lows', 'rsi_divergence',
|
|
71
71
|
'typical_price',
|
|
72
|
-
'money_flow', 'money_flow_positive', 'money_flow_negative', 'positive_flow_sum', 'negative_flow_sum', 'money_flow_ratio', 'mfi',
|
|
72
|
+
'money_flow', 'money_flow_positive', 'money_flow_negative', 'positive_flow_sum', 'negative_flow_sum', 'money_flow_ratio', 'mfi', 'mfi_bucket',
|
|
73
73
|
'macd', 'signal', 'macd_minus_signal',
|
|
74
74
|
'fib_0.618_short_periods', 'fib_0.618_long_periods',
|
|
75
75
|
'gap_close_vs_ema',
|
|
@@ -11,7 +11,7 @@ from hurst import compute_Hc # compatible with pypy
|
|
|
11
11
|
from ccxt.base.exchange import Exchange as CcxtExchange
|
|
12
12
|
from ccxt import deribit
|
|
13
13
|
|
|
14
|
-
from siglab_py.util.simple_math import bucket_series
|
|
14
|
+
from siglab_py.util.simple_math import bucket_series, bucketize_val
|
|
15
15
|
from siglab_py.util.market_data_util import fix_column_types
|
|
16
16
|
from siglab_py.constants import TrendDirection
|
|
17
17
|
|
|
@@ -480,9 +480,7 @@ def compute_candles_stats(
|
|
|
480
480
|
level_granularity=0.1
|
|
481
481
|
)
|
|
482
482
|
|
|
483
|
-
pd_candles['rsi_bucket'] = pd_candles['rsi'].
|
|
484
|
-
window=sliding_window_how_many_candles
|
|
485
|
-
).apply(lambda x: bucketize_val(x, buckets=rsi_buckets))
|
|
483
|
+
pd_candles['rsi_bucket'] = pd_candles['rsi'].apply(lambda x: bucketize_val(x, buckets=rsi_buckets))
|
|
486
484
|
pd_candles['ema_rsi'] = pd_candles['rsi'].ewm(
|
|
487
485
|
span=rsi_sliding_window_how_many_candles,
|
|
488
486
|
adjust=False).mean()
|
|
@@ -544,6 +542,12 @@ def compute_candles_stats(
|
|
|
544
542
|
rsi_sliding_window_how_many_candles if rsi_sliding_window_how_many_candles else sliding_window_how_many_candles).sum()
|
|
545
543
|
pd_candles['money_flow_ratio'] = pd_candles['positive_flow_sum'] / pd_candles['negative_flow_sum']
|
|
546
544
|
pd_candles['mfi'] = 100 - (100 / (1 + pd_candles['money_flow_ratio']))
|
|
545
|
+
mfi_buckets = bucket_series(
|
|
546
|
+
values = pd_candles['mfi'].to_list(),
|
|
547
|
+
outlier_threshold_percent=10,
|
|
548
|
+
level_granularity=0.1
|
|
549
|
+
)
|
|
550
|
+
pd_candles['mfi_bucket'] = pd_candles['mfi'].apply(lambda x: bucketize_val(x, buckets=mfi_buckets))
|
|
547
551
|
|
|
548
552
|
|
|
549
553
|
# MACD https://www.investopedia.com/terms/m/macd.asp
|
|
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.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/candles_ta_provider.py
RENAMED
|
File without changes
|
{siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/ccxt_candles_ta_to_csv.py
RENAMED
|
File without changes
|
|
File without changes
|
{siglab_py-0.5.51 → siglab_py-0.5.52}/siglab_py/market_data_providers/futu_candles_ta_to_csv.py
RENAMED
|
File without changes
|
{siglab_py-0.5.51 → siglab_py-0.5.52}/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
|
|
File without changes
|
|
File without changes
|