trendvisdata 1.0.4__py3-none-any.whl
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.
- trendvisdata/__init__.py +5 -0
- trendvisdata/chart_data.py +400 -0
- trendvisdata/chart_prep.py +637 -0
- trendvisdata/market_data.py +541 -0
- trendvisdata/sector_mappings.py +666 -0
- trendvisdata/trend.py +316 -0
- trendvisdata/trend_data.py +785 -0
- trendvisdata/trend_params.py +197 -0
- trendvisdata-1.0.4.dist-info/LICENSE +21 -0
- trendvisdata-1.0.4.dist-info/METADATA +29 -0
- trendvisdata-1.0.4.dist-info/RECORD +13 -0
- trendvisdata-1.0.4.dist-info/WHEEL +5 -0
- trendvisdata-1.0.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Default trend strength parameters
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# Dictionary containing all the default parameters
|
|
7
|
+
trend_params_dict = {
|
|
8
|
+
'df_params':{
|
|
9
|
+
'ma_list':[5, 10, 20, 30, 50, 100, 200],
|
|
10
|
+
'macd_params':[12, 26, 9],
|
|
11
|
+
'adx_list':[10, 20, 30, 50, 100, 200],
|
|
12
|
+
'ma_cross_list':[(5, 200), (10, 30), (10, 50), (20, 50), (30, 100),
|
|
13
|
+
(50, 200)],
|
|
14
|
+
'price_cross_list':[10, 20, 30, 50, 100, 200],
|
|
15
|
+
'rsi_list':[10, 20, 30, 50, 100, 200],
|
|
16
|
+
'breakout_list':[10, 20, 30, 50, 100, 200],
|
|
17
|
+
'atr_list':[14],
|
|
18
|
+
'trend_flags':[
|
|
19
|
+
'MA_5_200_flag',
|
|
20
|
+
'PX_MA_10_flag',
|
|
21
|
+
'ADX_10_flag',
|
|
22
|
+
'RSI_10_flag',
|
|
23
|
+
'breakout_10_flag',
|
|
24
|
+
'MA_10_30_flag',
|
|
25
|
+
'MACD_flag',
|
|
26
|
+
'MA_10_50_flag',
|
|
27
|
+
'PX_MA_20_flag',
|
|
28
|
+
'MA_20_50_flag',
|
|
29
|
+
'ADX_20_flag',
|
|
30
|
+
'RSI_20_flag',
|
|
31
|
+
'breakout_20_flag',
|
|
32
|
+
'PX_MA_30_flag',
|
|
33
|
+
'ADX_30_flag',
|
|
34
|
+
'RSI_30_flag',
|
|
35
|
+
'breakout_30_flag',
|
|
36
|
+
'MA_30_100_flag',
|
|
37
|
+
'PX_MA_50_flag',
|
|
38
|
+
'MA_50_200_flag',
|
|
39
|
+
'ADX_50_flag',
|
|
40
|
+
'RSI_50_flag',
|
|
41
|
+
'breakout_50_flag',
|
|
42
|
+
'PX_MA_100_flag',
|
|
43
|
+
'ADX_100_flag',
|
|
44
|
+
'RSI_100_flag',
|
|
45
|
+
'breakout_100_flag',
|
|
46
|
+
'PX_MA_200_flag',
|
|
47
|
+
'ADX_200_flag',
|
|
48
|
+
'RSI_200_flag',
|
|
49
|
+
'breakout_200_flag'
|
|
50
|
+
],
|
|
51
|
+
'mpl_line_params':{
|
|
52
|
+
'figure.dpi':100,
|
|
53
|
+
'axes.edgecolor':'black',
|
|
54
|
+
'axes.titlepad':15,
|
|
55
|
+
'axes.xmargin':0.05,
|
|
56
|
+
'axes.ymargin':0.05,
|
|
57
|
+
'axes.linewidth':2,
|
|
58
|
+
'axes.facecolor':(0.8, 0.8, 0.9, 0.5),
|
|
59
|
+
'xtick.major.pad':10,
|
|
60
|
+
'ytick.major.pad':10,
|
|
61
|
+
'lines.linewidth':3.0,
|
|
62
|
+
'grid.color':'black',
|
|
63
|
+
'grid.linestyle':':',
|
|
64
|
+
'legend.frameon':True,
|
|
65
|
+
'legend.framealpha':1,
|
|
66
|
+
'legend.shadow':True,
|
|
67
|
+
'legend.facecolor':'white',
|
|
68
|
+
'legend.edgecolor':'black',
|
|
69
|
+
'legend.title_fontsize':15,
|
|
70
|
+
'legend.fontsize':10,
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
'mpl_bar_params':{
|
|
74
|
+
'figure.dpi':100,
|
|
75
|
+
'axes.edgecolor':'black',
|
|
76
|
+
'axes.titlepad':15,
|
|
77
|
+
'axes.xmargin':0.05,
|
|
78
|
+
'axes.ymargin':0.05,
|
|
79
|
+
'axes.linewidth':2,
|
|
80
|
+
'axes.facecolor':(0.8, 0.8, 0.9, 0.5),
|
|
81
|
+
'xtick.major.pad':10,
|
|
82
|
+
'ytick.major.pad':10,
|
|
83
|
+
'lines.linewidth':3.0,
|
|
84
|
+
'grid.color':'black',
|
|
85
|
+
'grid.linestyle':':'
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'mpl_chart_params':{
|
|
89
|
+
'figure.dpi':100,
|
|
90
|
+
'axes.edgecolor':'black',
|
|
91
|
+
'axes.titlepad':5,
|
|
92
|
+
'axes.xmargin':0.05,
|
|
93
|
+
'axes.ymargin':0.05,
|
|
94
|
+
'axes.linewidth':0.5,
|
|
95
|
+
'axes.facecolor':(0.8, 0.8, 0.9, 0.3),
|
|
96
|
+
'xtick.major.pad':1,
|
|
97
|
+
'ytick.major.pad':1,
|
|
98
|
+
'lines.linewidth':2.0,
|
|
99
|
+
'grid.color':'black',
|
|
100
|
+
'grid.linestyle':':'
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
'mpl_summary_params':{
|
|
104
|
+
'figure.dpi':100,
|
|
105
|
+
'axes.edgecolor':'black',
|
|
106
|
+
'axes.titlepad':15,
|
|
107
|
+
'axes.titlesize':18,
|
|
108
|
+
'axes.titley':1.02,
|
|
109
|
+
'axes.xmargin':0.05,
|
|
110
|
+
'axes.ymargin':0.05,
|
|
111
|
+
'axes.linewidth':2,
|
|
112
|
+
'axes.facecolor':(0.8, 0.8, 0.9, 0.5),
|
|
113
|
+
#'legend.facecolor':(0.8, 0.8, 0.9, 0.5),
|
|
114
|
+
'legend.facecolor':'white',
|
|
115
|
+
'legend.edgecolor':'black',
|
|
116
|
+
'legend.title_fontsize':10,
|
|
117
|
+
'legend.fontsize':8,
|
|
118
|
+
'legend.shadow':True,
|
|
119
|
+
'legend.frameon':True,
|
|
120
|
+
'xtick.major.pad':10,
|
|
121
|
+
'xtick.major.size':12,
|
|
122
|
+
'xtick.minor.size':8,
|
|
123
|
+
'xtick.labelsize':12,
|
|
124
|
+
'ytick.major.pad':10,
|
|
125
|
+
'ytick.major.size':12,
|
|
126
|
+
'ytick.minor.size':8,
|
|
127
|
+
'ytick.labelsize':12,
|
|
128
|
+
'lines.linewidth':3.0,
|
|
129
|
+
'grid.color':'black',
|
|
130
|
+
'grid.linestyle':':'
|
|
131
|
+
},
|
|
132
|
+
'window':None,
|
|
133
|
+
'mkts':10,
|
|
134
|
+
'chart_mkts':None,
|
|
135
|
+
'trend':'strong',
|
|
136
|
+
'days':60,
|
|
137
|
+
'norm':True,
|
|
138
|
+
'chart_dimensions':(8, 5),
|
|
139
|
+
'lookback':500,
|
|
140
|
+
'ticker_limit':None,
|
|
141
|
+
'market_chart':False,
|
|
142
|
+
'indicator_name_dict':{
|
|
143
|
+
'adx':('ADX', 'ADX'),
|
|
144
|
+
'ma_cross':('MA', 'MA Crossover'),
|
|
145
|
+
'price_cross':('PX_MA', 'Price MA Crossover'),
|
|
146
|
+
'rsi':('RSI', 'RSI'),
|
|
147
|
+
'breakout':('breakout', 'Breakout')
|
|
148
|
+
},
|
|
149
|
+
'indicator_type':'adx',
|
|
150
|
+
'asset_type':'CTA',
|
|
151
|
+
'commodity_sector_levels':[
|
|
152
|
+
'Asset Class',
|
|
153
|
+
'Broad Sector',
|
|
154
|
+
'Mid Sector',
|
|
155
|
+
'Narrow Sector',
|
|
156
|
+
'Underlying'
|
|
157
|
+
],
|
|
158
|
+
'equity_sector_levels':[
|
|
159
|
+
'Sector',
|
|
160
|
+
'Industry Group',
|
|
161
|
+
'Industry',
|
|
162
|
+
'Sub-Industry',
|
|
163
|
+
'Security'
|
|
164
|
+
],
|
|
165
|
+
'ticker_types':{
|
|
166
|
+
'&':'c_', # continuous future
|
|
167
|
+
'#':'r_', # ratio
|
|
168
|
+
'@':'s_', # spot cash commodity
|
|
169
|
+
'$':'i_', # index
|
|
170
|
+
'%':'y_' # yield
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
'top_trend_params':{
|
|
174
|
+
'initial_size':50,
|
|
175
|
+
'max_per_sector':5,
|
|
176
|
+
'final_size':20
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
'sector_level':2,
|
|
180
|
+
'returns_sector_level':2,
|
|
181
|
+
'absolute':True,
|
|
182
|
+
'summary_type':'swarm',
|
|
183
|
+
'graph_ticker_types':['c', 's'],
|
|
184
|
+
'dodge':False,
|
|
185
|
+
'compact':False,
|
|
186
|
+
'marker':'^',
|
|
187
|
+
'violin':False,
|
|
188
|
+
'source':'norgate',
|
|
189
|
+
'tickers_adjusted':False,
|
|
190
|
+
'tickers':None,
|
|
191
|
+
'data_output':False,
|
|
192
|
+
'start_date':None,
|
|
193
|
+
'end_date':None,
|
|
194
|
+
'pie_tenor':50,
|
|
195
|
+
'data_types':'all'
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 GBERESEARCH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: trendvisdata
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: Data extract and manipulation functions for Trend Visualizer library.
|
|
5
|
+
Home-page: https://github.com/GBERESEARCH/trendvisdata
|
|
6
|
+
Author: GBERESEARCH
|
|
7
|
+
Author-email: gberesearch@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: numpy>=1.24.1
|
|
12
|
+
Requires-Dist: requests>=2.28.1
|
|
13
|
+
Requires-Dist: pandas>=1.5.2
|
|
14
|
+
Requires-Dist: norgatedata>=1.0.64
|
|
15
|
+
Requires-Dist: yfinance>=0.2.40
|
|
16
|
+
Requires-Dist: technicalmethods>=0.2.4
|
|
17
|
+
Requires-Dist: lxml>=4.9.2
|
|
18
|
+
|
|
19
|
+
# trendvisdata
|
|
20
|
+
## Calculate trend strength across various markets.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### The library provides methods to:
|
|
25
|
+
- Extract historical OHLC data for futures and cash commodities from Norgate Data and S&P 500 from Yahoo Finance (Norgate Data requires a subscription to the futures package:
|
|
26
|
+
https://norgatedata.com/futurespackage.php).
|
|
27
|
+
- Calculate technical indicators over a range of time periods and aggregate to determine trend strength.
|
|
28
|
+
|
|
29
|
+
Used to serve data to Frontend applications & removes dependencies on Python graphing libraries present in the trendvisualizer library.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
trendvisdata/__init__.py,sha256=LuajomKfEb1_fDnE0IQXGjfWokcNex78cQ_H2ekeptI,31
|
|
2
|
+
trendvisdata/chart_data.py,sha256=IfD7_rO1jVzFwLKoGnSYdKKNbgRXrW4U-xQp_yUC-oo,15128
|
|
3
|
+
trendvisdata/chart_prep.py,sha256=u9KTNPrHy7kkKxSx_sbTaEAkdDsnUINEHGsII4U4zJA,21522
|
|
4
|
+
trendvisdata/market_data.py,sha256=X5fsXRLj__ZUo8mJ3oJTmyy_vPQIZNZXOzE_nnZjiRI,17596
|
|
5
|
+
trendvisdata/sector_mappings.py,sha256=8G93U8vJDdlbgB04Qj2zOfnuKkEq4TMSt75iYSqXoXY,77355
|
|
6
|
+
trendvisdata/trend.py,sha256=h3J3KYZcWSRNRA0qI4NUyZCr0Qo-9xRxvSumhETSfUU,9611
|
|
7
|
+
trendvisdata/trend_data.py,sha256=N6hymRqhSGxGOQjh0_GMYUboOgGIcotabHGQE41ocLA,26903
|
|
8
|
+
trendvisdata/trend_params.py,sha256=s7bb2ZUqsqbaDMSyBGD751ugKT-QO-ak3GNj_HjIWic,6133
|
|
9
|
+
trendvisdata-1.0.4.dist-info/LICENSE,sha256=GSrwI3iXzjLduSq-9UiTIq2dobFlyrHC26eSSQlhKPI,1089
|
|
10
|
+
trendvisdata-1.0.4.dist-info/METADATA,sha256=R-GsJzXn5tPUnvOqG2ndcjLFuqrQuOS7GvKkZ78ffbo,1156
|
|
11
|
+
trendvisdata-1.0.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
12
|
+
trendvisdata-1.0.4.dist-info/top_level.txt,sha256=vwwtqAdTFn51wipfsoZEKjkdOUubhM7K7-lOi3cMU2M,13
|
|
13
|
+
trendvisdata-1.0.4.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
trendvisdata
|