mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-06-27 16:10:07 +08:00
ENH #199 core no mp option MAINT notebook refresh
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -86,7 +86,7 @@
|
||||
"text": [
|
||||
"name = All\n",
|
||||
"description = All the indicators with their default settings. Pandas TA default.\n",
|
||||
"created = 01/23/2021, 12:36:24\n",
|
||||
"created = 02/02/2021, 12:59:41\n",
|
||||
"ta = None\n"
|
||||
]
|
||||
}
|
||||
@@ -117,7 +117,7 @@
|
||||
"text": [
|
||||
"name = Common Price and Volume SMAs\n",
|
||||
"description = Common Price SMAs: 10, 20, 50, 200 and Volume SMA: 20.\n",
|
||||
"created = 01/23/2021, 12:36:24\n",
|
||||
"created = 02/02/2021, 12:59:41\n",
|
||||
"ta = [{'kind': 'sma', 'length': 10}, {'kind': 'sma', 'length': 20}, {'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}, {'kind': 'sma', 'close': 'volume', 'length': 20, 'prefix': 'VOL'}]\n"
|
||||
]
|
||||
}
|
||||
@@ -159,7 +159,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='A', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='A', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
@@ -187,7 +187,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='B', ta=[{'kind': 'ema', 'length': 8}, {'kind': 'ema', 'length': 21}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'rsi'}, {'kind': 'supertrend'}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='B', ta=[{'kind': 'ema', 'length': 8}, {'kind': 'ema', 'length': 21}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'rsi'}, {'kind': 'supertrend'}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
@@ -215,7 +215,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='Runtime Failure', ta=[{'kind': 'percet_return'}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='Runtime Failure', ta=[{'kind': 'percet_return'}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
@@ -814,7 +814,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='A', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='A', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
@@ -1039,7 +1039,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='B', ta=[{'kind': 'ema', 'length': 8}, {'kind': 'ema', 'length': 21}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'rsi'}, {'kind': 'supertrend'}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='B', ta=[{'kind': 'ema', 'length': 8}, {'kind': 'ema', 'length': 21}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'rsi'}, {'kind': 'supertrend'}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
@@ -1369,7 +1369,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='Runtime Failure', ta=[{'kind': 'percet_return'}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='Runtime Failure', ta=[{'kind': 'percet_return'}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
@@ -1435,7 +1435,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='Volume MAs and Price MA chain', ta=[{'kind': 'ema', 'close': 'volume', 'length': 10, 'prefix': 'VOLUME'}, {'kind': 'sma', 'close': 'volume', 'length': 20, 'prefix': 'VOLUME'}, {'kind': 'ema', 'length': 5}, {'kind': 'linreg', 'close': 'EMA_5', 'length': 8, 'prefix': 'EMA_5'}], description='TA Description', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='Volume MAs and Price MA chain', ta=[{'kind': 'ema', 'close': 'volume', 'length': 10, 'prefix': 'VOLUME'}, {'kind': 'sma', 'close': 'volume', 'length': 20, 'prefix': 'VOLUME'}, {'kind': 'ema', 'length': 5}, {'kind': 'linreg', 'close': 'EMA_5', 'length': 8, 'prefix': 'EMA_5'}], description='TA Description', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 20,
|
||||
@@ -1736,7 +1736,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='MACD BBands', ta=[{'kind': 'macd'}, {'kind': 'bbands', 'close': 'MACD_12_26_9', 'length': 20, 'prefix': 'MACD'}], description='BBANDS_20 applied to MACD', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='MACD BBands', ta=[{'kind': 'macd'}, {'kind': 'bbands', 'close': 'MACD_12_26_9', 'length': 20, 'prefix': 'MACD'}], description='BBANDS_20 applied to MACD', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
@@ -2095,7 +2095,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='Momo, Bands and SMAs and Cumulative Log Returns', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}, {'kind': 'bbands', 'length': 20}, {'kind': 'macd'}, {'kind': 'rsi'}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'sma', 'close': 'CUMLOGRET_1', 'length': 5, 'suffix': 'CUMLOGRET'}], description='MACD and RSI Momo with BBANDS and SMAs 50 & 200 and Cumulative Log Returns', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='Momo, Bands and SMAs and Cumulative Log Returns', ta=[{'kind': 'sma', 'length': 50}, {'kind': 'sma', 'length': 200}, {'kind': 'bbands', 'length': 20}, {'kind': 'macd'}, {'kind': 'rsi'}, {'kind': 'log_return', 'cumulative': True}, {'kind': 'sma', 'close': 'CUMLOGRET_1', 'length': 5, 'suffix': 'CUMLOGRET'}], description='MACD and RSI Momo with BBANDS and SMAs 50 & 200 and Cumulative Log Returns', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 26,
|
||||
@@ -2419,7 +2419,7 @@
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Strategy(name='EMA, MACD History, Outter BBands, Log Returns', ta=[{'kind': 'ema', 'params': (10,)}, {'kind': 'macd', 'params': (9, 19, 10), 'col_numbers': (1,)}, {'kind': 'bbands', 'col_numbers': (0, 2), 'col_names': ('LB', 'UB')}, {'kind': 'log_return', 'params': (5, False)}], description='EMA, MACD History, BBands(LB, UB), and Log Returns Strategy', created='01/23/2021, 12:36:24')"
|
||||
"Strategy(name='EMA, MACD History, Outter BBands, Log Returns', ta=[{'kind': 'ema', 'params': (10,)}, {'kind': 'macd', 'params': (9, 19, 10), 'col_numbers': (1,)}, {'kind': 'bbands', 'col_numbers': (0, 2), 'col_names': ('LB', 'UB')}, {'kind': 'log_return', 'params': (5, False)}], description='EMA, MACD History, BBands(LB, UB), and Log Returns Strategy', created='02/02/2021, 12:59:41')"
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
|
||||
+61
-93
File diff suppressed because one or more lines are too long
+1
-5
@@ -361,11 +361,7 @@ class AnalysisIndicators(BasePandasObject):
|
||||
if "append" in kwargs and kwargs["append"]:
|
||||
df = self._df
|
||||
na_columns = self._check_na_columns()
|
||||
if df is None or result is None:
|
||||
return
|
||||
elif len(na_columns):
|
||||
print(f"[X] {result.name} column(s) values are all na: {', '.join(na_columns)}")
|
||||
return
|
||||
if df is None or result is None: return
|
||||
else:
|
||||
if isinstance(result, pd.DataFrame):
|
||||
# If specified in kwargs, rename the columns. If not, use
|
||||
|
||||
@@ -17,7 +17,7 @@ setup(
|
||||
"pandas_ta.volatility",
|
||||
"pandas_ta.volume"
|
||||
],
|
||||
version=".".join(("0", "2", "42b")),
|
||||
version=".".join(("0", "2", "43b")),
|
||||
description=long_description,
|
||||
long_description=long_description,
|
||||
author="Kevin Johnson",
|
||||
|
||||
@@ -183,7 +183,7 @@ class TestStrategyMethods(TestCase):
|
||||
self.category = "Volume"
|
||||
self.data.ta.strategy(self.category, verbose=verbose, timed=strategy_timed)
|
||||
|
||||
# @skip
|
||||
# @skipUnless(verbose, "verbose mode only")
|
||||
def test_all_no_multiprocessing(self):
|
||||
self.category = "All with No Multiprocessing"
|
||||
|
||||
@@ -192,7 +192,7 @@ class TestStrategyMethods(TestCase):
|
||||
self.data.ta.strategy(verbose=verbose, timed=strategy_timed)
|
||||
self.data.ta.cores = cores
|
||||
|
||||
# @skip
|
||||
# @skipUnless(verbose, "verbose mode only")
|
||||
def test_custom_no_multiprocessing(self):
|
||||
self.category = "Custom A with No Multiprocessing"
|
||||
|
||||
@@ -215,5 +215,4 @@ class TestStrategyMethods(TestCase):
|
||||
"Common indicators with specific lengths and a chained indicator", # description
|
||||
)
|
||||
self.data.ta.strategy(custom, verbose=verbose, timed=strategy_timed)
|
||||
|
||||
self.data.ta.cores = cores
|
||||
|
||||
Reference in New Issue
Block a user