goldhand 15.4__py3-none-any.whl → 15.5__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.
Potentially problematic release.
This version of goldhand might be problematic. Click here for more details.
- goldhand/backtest.py +6 -1
- goldhand/stocks.py +127 -86
- goldhand/tw.py +49 -0
- {goldhand-15.4.dist-info → goldhand-15.5.dist-info}/METADATA +7 -4
- goldhand-15.5.dist-info/RECORD +11 -0
- goldhand-15.4.dist-info/RECORD +0 -11
- {goldhand-15.4.dist-info → goldhand-15.5.dist-info}/WHEEL +0 -0
- {goldhand-15.4.dist-info → goldhand-15.5.dist-info}/top_level.txt +0 -0
goldhand/backtest.py
CHANGED
|
@@ -57,7 +57,12 @@ class Backtest:
|
|
|
57
57
|
'max_gain(%)' : round(((self.trades['result'].max()-1)*100),2),
|
|
58
58
|
'max_lost(%)' : round(((self.trades['result'].min()-1)*100),2),
|
|
59
59
|
|
|
60
|
-
'first_trade_buy' : min(self.trades['buy_date'])
|
|
60
|
+
'first_trade_buy' : min(self.trades['buy_date']),
|
|
61
|
+
'first_close_price' : self.data['close'].iloc[0],
|
|
62
|
+
'first_date' : self.data['date'].iloc[0],
|
|
63
|
+
'last_price' : self.data['close'].iloc[-1],
|
|
64
|
+
'hold_result' : round(((self.data['close'].iloc[-1] / self.data['close'].iloc[0])-1)*100,2)
|
|
65
|
+
|
|
61
66
|
|
|
62
67
|
}
|
|
63
68
|
self.trades_summary.update(self.additional_params)
|
goldhand/stocks.py
CHANGED
|
@@ -11,6 +11,15 @@ import cloudscraper
|
|
|
11
11
|
|
|
12
12
|
class GoldHand:
|
|
13
13
|
def __init__(self, ticker, ad_ticker=True, range='18y', interval='1d'):
|
|
14
|
+
"""
|
|
15
|
+
GoldHand class to download and analyze stock data
|
|
16
|
+
params:
|
|
17
|
+
ticker: str, ticker symbol
|
|
18
|
+
ad_ticker: bool, add ticker column to the dataframe
|
|
19
|
+
range: str, time range to download data
|
|
20
|
+
interval: str, interval to download data
|
|
21
|
+
|
|
22
|
+
"""
|
|
14
23
|
self.scraper = cloudscraper.create_scraper()
|
|
15
24
|
self.ad_ticker = ad_ticker
|
|
16
25
|
self.range = range
|
|
@@ -23,6 +32,7 @@ class GoldHand:
|
|
|
23
32
|
def get_olhc(self):
|
|
24
33
|
"""
|
|
25
34
|
Download historical stock data for the last year
|
|
35
|
+
# https://cryptocointracker.com/yahoo-finance/yahoo-finance-api
|
|
26
36
|
"""
|
|
27
37
|
#scraper = cloudscraper.create_scraper()
|
|
28
38
|
response = self.scraper.get(f"https://query1.finance.yahoo.com/v8/finance/chart/{self.ticker}?interval={self.interval}&range={self.range}")
|
|
@@ -37,6 +47,12 @@ class GoldHand:
|
|
|
37
47
|
def smma(self, data, window, colname):
|
|
38
48
|
"""
|
|
39
49
|
Calculate Smoothed Moving Average (SMMA)
|
|
50
|
+
params:
|
|
51
|
+
data: dataframe
|
|
52
|
+
window: int, window size
|
|
53
|
+
colname: str, name of the column to add to the dataframe
|
|
54
|
+
return:
|
|
55
|
+
data: dataframe with added column
|
|
40
56
|
"""
|
|
41
57
|
hl2 = data['hl2'].values
|
|
42
58
|
smma_values = [hl2[0]]
|
|
@@ -51,105 +67,120 @@ class GoldHand:
|
|
|
51
67
|
|
|
52
68
|
|
|
53
69
|
def download_historical_data(self):
|
|
70
|
+
"""
|
|
71
|
+
Download historical stock data of 18 years
|
|
72
|
+
"""
|
|
54
73
|
# Download historical stock data for the last year
|
|
55
74
|
self.df = self.get_olhc()
|
|
56
75
|
self.df.columns = self.df.columns.str.lower()
|
|
57
76
|
self.df['hl2'] = (self.df['high'] + self.df['low'])/2
|
|
58
77
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
78
|
+
try:
|
|
79
|
+
# Rsi
|
|
80
|
+
self.df['rsi'] = ta.rsi(self.df['close'], 14)
|
|
81
|
+
|
|
82
|
+
# SMAS
|
|
83
|
+
self.df['sma_50']= ta.sma(self.df['close'], 50)
|
|
84
|
+
self.df['diff_sma50'] = (self.df['close']/self.df['sma_50'] -1)*100
|
|
85
|
+
self.df['sma_100']= ta.sma(self.df['close'], 100)
|
|
86
|
+
self.df['diff_sma100'] = (self.df['close']/self.df['sma_100'] -1)*100
|
|
87
|
+
self.df['sma_200']= ta.sma(self.df['close'], 200)
|
|
88
|
+
self.df['diff_sma200'] = (self.df['close']/self.df['sma_200'] -1)*100
|
|
89
|
+
|
|
90
|
+
#Bolinger bands
|
|
91
|
+
bb = ta.bbands(self.df['close'])
|
|
92
|
+
bb.columns = ['bb_lower', 'bb_mid', 'bb_upper', 'bandwidth', 'percent']
|
|
93
|
+
self.df['bb_lower'] = bb['bb_lower']
|
|
94
|
+
self.df['bb_upper'] = bb['bb_upper']
|
|
95
|
+
self.df['diff_upper_bb'] = (self.df['bb_upper']/self.df['close'] -1)*100
|
|
96
|
+
self.df['diff_lower_bb'] = (self.df['bb_lower']/self.df['close'] -1)*100
|
|
97
|
+
|
|
98
|
+
#local min maxs
|
|
99
|
+
self.df['local'] = ''
|
|
100
|
+
self.df['local_text'] = ''
|
|
101
|
+
max_ids = list(argrelextrema(self.df['high'].values, np.greater, order=30)[0])
|
|
102
|
+
min_ids = list(argrelextrema(self.df['low'].values, np.less, order=30)[0])
|
|
103
|
+
self.df.loc[min_ids, 'local'] = 'minimum'
|
|
104
|
+
self.df.loc[max_ids, 'local'] = 'maximum'
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
states = self.df[self.df['local']!='']['local'].index.to_list()
|
|
108
|
+
problem = []
|
|
109
|
+
for i in range(0, (len(states)-1) ):
|
|
110
|
+
|
|
111
|
+
if (self.df.loc[states[i], 'local'] != self.df.loc[states[i+1], 'local']):
|
|
112
|
+
if (len(problem)==0):
|
|
113
|
+
continue
|
|
114
|
+
else:
|
|
115
|
+
problem.append(states[i])
|
|
116
|
+
text = self.df.loc[states[i], 'local']
|
|
117
|
+
if(text=='minimum'):
|
|
118
|
+
real_min = self.df.loc[problem, 'low'].idxmin()
|
|
119
|
+
problem.remove(real_min)
|
|
120
|
+
self.df.loc[problem, 'local']=''
|
|
121
|
+
else:
|
|
122
|
+
real_max = self.df.loc[problem, 'high'].idxmax()
|
|
123
|
+
problem.remove(real_max)
|
|
124
|
+
self.df.loc[problem, 'local']=''
|
|
125
|
+
|
|
126
|
+
problem = []
|
|
95
127
|
else:
|
|
96
128
|
problem.append(states[i])
|
|
97
|
-
text = self.df.loc[states[i], 'local']
|
|
98
|
-
if(text=='minimum'):
|
|
99
|
-
real_min = self.df.loc[problem, 'low'].idxmin()
|
|
100
|
-
problem.remove(real_min)
|
|
101
|
-
self.df.loc[problem, 'local']=''
|
|
102
|
-
else:
|
|
103
|
-
real_max = self.df.loc[problem, 'high'].idxmax()
|
|
104
|
-
problem.remove(real_max)
|
|
105
|
-
self.df.loc[problem, 'local']=''
|
|
106
|
-
|
|
107
|
-
problem = []
|
|
108
|
-
else:
|
|
109
|
-
problem.append(states[i])
|
|
110
|
-
|
|
111
|
-
states = self.df[self.df['local']!='']['local'].index.to_list()
|
|
112
129
|
|
|
113
|
-
|
|
114
|
-
if self.df.loc[states[0], 'local']== 'minimum':
|
|
115
|
-
self.df.loc[states[0],'local_text'] = f"${round(self.df.loc[states[0], 'low'], 2)}"
|
|
116
|
-
else:
|
|
117
|
-
self.df.loc[states[0],'local_text'] = f"${round(self.df.loc[states[0], 'high'], 2)}"
|
|
130
|
+
states = self.df[self.df['local']!='']['local'].index.to_list()
|
|
118
131
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
self.df.loc[last_min_id , 'local'] = 'minimum'
|
|
123
|
-
|
|
124
|
-
states = self.df[self.df['local']!='']['local'].index.to_list()
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
for i in range(1,len(states)):
|
|
128
|
-
prev = self.df.loc[states[i-1], 'local']
|
|
129
|
-
current= self.df.loc[states[i], 'local']
|
|
130
|
-
prev_high = self.df.loc[states[i-1], 'high']
|
|
131
|
-
prev_low = self.df.loc[states[i-1], 'low']
|
|
132
|
-
current_high = self.df.loc[states[i], 'high']
|
|
133
|
-
current_low = self.df.loc[states[i], 'low']
|
|
134
|
-
if current == 'maximum':
|
|
135
|
-
# rise
|
|
136
|
-
rise = (current_high/ prev_low -1)*100
|
|
137
|
-
if rise>100:
|
|
138
|
-
self.df.loc[states[i], 'local_text'] = f'🚀🌌{round(((rise+100)/100), 2)}x<br>${round(current_high, 2)}'
|
|
139
|
-
else:
|
|
140
|
-
self.df.loc[states[i], 'local_text'] = f'🚀{round(rise, 2)}%<br>${round(current_high, 2)}'
|
|
132
|
+
# if first is min ad the price
|
|
133
|
+
if self.df.loc[states[0], 'local']== 'minimum':
|
|
134
|
+
self.df.loc[states[0],'local_text'] = f"${round(self.df.loc[states[0], 'low'], 2)}"
|
|
141
135
|
else:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
self.df.loc[states[0],'local_text'] = f"${round(self.df.loc[states[0], 'high'], 2)}"
|
|
137
|
+
|
|
138
|
+
# add last fall if last local is max
|
|
139
|
+
if list(self.df[self.df['local']!='']['local'])[-1]=='maximum':
|
|
140
|
+
last_min_id = self.df.loc[self.df['low']==min(self.df['low'][-3:] )].index.to_list()[0]
|
|
141
|
+
self.df.loc[last_min_id , 'local'] = 'minimum'
|
|
142
|
+
|
|
143
|
+
states = self.df[self.df['local']!='']['local'].index.to_list()
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
for i in range(1,len(states)):
|
|
147
|
+
prev = self.df.loc[states[i-1], 'local']
|
|
148
|
+
current= self.df.loc[states[i], 'local']
|
|
149
|
+
prev_high = self.df.loc[states[i-1], 'high']
|
|
150
|
+
prev_low = self.df.loc[states[i-1], 'low']
|
|
151
|
+
current_high = self.df.loc[states[i], 'high']
|
|
152
|
+
current_low = self.df.loc[states[i], 'low']
|
|
153
|
+
if current == 'maximum':
|
|
154
|
+
# rise
|
|
155
|
+
rise = (current_high/ prev_low -1)*100
|
|
156
|
+
if rise>100:
|
|
157
|
+
self.df.loc[states[i], 'local_text'] = f'🚀🌌{round(((rise+100)/100), 2)}x<br>${round(current_high, 2)}'
|
|
158
|
+
else:
|
|
159
|
+
self.df.loc[states[i], 'local_text'] = f'🚀{round(rise, 2)}%<br>${round(current_high, 2)}'
|
|
147
160
|
else:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
161
|
+
fall = round((1-(current_low / prev_high))*100, 2)
|
|
162
|
+
if fall < 30:
|
|
163
|
+
temj = '💸'
|
|
164
|
+
elif fall < 50:
|
|
165
|
+
temj = '💸'
|
|
166
|
+
else:
|
|
167
|
+
temj = '😭💔'
|
|
168
|
+
self.df.loc[states[i], 'local_text'] = f'{temj}{fall}%<br>${round(current_low, 2)}'
|
|
169
|
+
self.df.reset_index(inplace=True, drop=True)
|
|
170
|
+
except:
|
|
171
|
+
pass
|
|
151
172
|
|
|
152
173
|
def plotly_last_year(self, plot_title, plot_height=900, ndays=500, ad_local_min_max=True):
|
|
174
|
+
"""
|
|
175
|
+
Plot last year interactive plot of a stock analyzing the local minimums and maximums
|
|
176
|
+
params:
|
|
177
|
+
plot_title: str, title of the plot
|
|
178
|
+
plot_height: int, height of the plot
|
|
179
|
+
ndays: int, number of days to plot
|
|
180
|
+
ad_local_min_max: bool, add local min max to the plot
|
|
181
|
+
return:
|
|
182
|
+
fig: plotly figure
|
|
183
|
+
"""
|
|
153
184
|
tdf = self.df.tail(ndays)
|
|
154
185
|
|
|
155
186
|
fig = go.Figure(data=go.Ohlc(x=tdf['date'], open=tdf['open'], high=tdf['high'], low=tdf['low'],close=tdf['close']))
|
|
@@ -176,6 +207,16 @@ class GoldHand:
|
|
|
176
207
|
return(fig)
|
|
177
208
|
|
|
178
209
|
def plot_goldhand_line(self, plot_title, plot_height=900, ndays=800, ad_local_min_max=True):
|
|
210
|
+
"""
|
|
211
|
+
Plot last year interactive plot of a stock analyzing the local minimums and maximums using the goldhand line indicator
|
|
212
|
+
params:
|
|
213
|
+
plot_title: str, title of the plot
|
|
214
|
+
plot_height: int, height of the plot
|
|
215
|
+
ndays: int, number of days to plot
|
|
216
|
+
ad_local_min_max: bool, add local min max to the plot
|
|
217
|
+
return:
|
|
218
|
+
fig: plotly figure
|
|
219
|
+
"""
|
|
179
220
|
|
|
180
221
|
data = self.df.copy()
|
|
181
222
|
# Apply SMMA to the dataframe
|
goldhand/tw.py
CHANGED
|
@@ -9,13 +9,21 @@ import json
|
|
|
9
9
|
|
|
10
10
|
class Tw:
|
|
11
11
|
def __init__(self):
|
|
12
|
+
"""
|
|
13
|
+
Get all stocks, cryptos and etfs from TradingView
|
|
14
|
+
"""
|
|
12
15
|
self.stock = pd.DataFrame()
|
|
13
16
|
self.crypto = pd.DataFrame()
|
|
17
|
+
self.etf = pd.DataFrame()
|
|
14
18
|
|
|
15
19
|
self.get_all_stock()
|
|
16
20
|
self.get_all_crypto()
|
|
21
|
+
self.get_all_etf()
|
|
17
22
|
|
|
18
23
|
def get_all_stock(self):
|
|
24
|
+
"""
|
|
25
|
+
Get all stocks from TradingView
|
|
26
|
+
"""
|
|
19
27
|
data_query = '{"filter":[{"left":"type","operation":"in_range","right":["stock","dr","fund"]},{"left":"subtype","operation":"in_range","right":["common","foreign-issuer","","etf","etf,odd","etf,otc","etf,cfd"]},{"left":"exchange","operation":"in_range","right":["AMEX","NASDAQ","NYSE"]},{"left":"is_primary","operation":"equal","right":true},{"left":"active_symbol","operation":"equal","right":true}],"options":{"lang":"en"},"markets":["america"],"symbols":{"query":{"types":[]},"tickers":[]},"columns":["logoid","name","close","change","change_abs","Recommend.All","volume","Value.Traded","market_cap_basic","price_earnings_ttm","earnings_per_share_basic_ttm","number_of_employees","sector","High.3M","Low.3M","Perf.3M","Perf.5Y","High.1M","Low.1M","High.6M","Low.6M","Perf.6M","beta_1_year","price_52_week_high","price_52_week_low","High.All","Low.All","BB.lower","BB.upper","change|1M","change_abs|1M","change|1W","change_abs|1W","change|240","country","EMA50","EMA100","EMA200","MACD.macd","MACD.signal","Mom","Perf.1M","RSI7","SMA50","SMA100","SMA200","Stoch.RSI.K","Stoch.RSI.D","Perf.W","Perf.Y","Perf.YTD","industry","Perf.All","description","type","subtype","update_mode","pricescale","minmov","fractional","minmove2","Mom[1]","RSI7[1]","Rec.Stoch.RSI","currency","fundamental_currency_code"],"sort":{"sortBy":"market_cap_basic","sortOrder":"desc"},"range":[0,8000]}'
|
|
20
28
|
response = requests.post('https://scanner.tradingview.com/america/scan', data=data_query)
|
|
21
29
|
data = response.json()
|
|
@@ -26,6 +34,9 @@ class Tw:
|
|
|
26
34
|
|
|
27
35
|
|
|
28
36
|
def get_all_crypto(self):
|
|
37
|
+
"""
|
|
38
|
+
Get all cryptos from TradingView
|
|
39
|
+
"""
|
|
29
40
|
data_query = '{"columns":["base_currency","base_currency_desc","base_currency_logoid","update_mode","type","typespecs","exchange","crypto_total_rank","close","pricescale","minmov","fractional","minmove2","currency","24h_close_change|5","market_cap_calc","fundamental_currency_code","24h_vol_cmc","circulating_supply","crypto_common_categories","crypto_blockchain_ecosystems"],"ignore_unknown_fields":false,"options":{"lang":"en"},"range":[0,300],"sort":{"sortBy":"crypto_total_rank","sortOrder":"asc"},"markets":["coin"]}'
|
|
30
41
|
response = requests.post('https://scanner.tradingview.com/coin/scan', data=data_query)
|
|
31
42
|
data = response.json()
|
|
@@ -36,8 +47,25 @@ class Tw:
|
|
|
36
47
|
self.crypto = self.crypto.loc[filter, ]
|
|
37
48
|
self.crypto['ticker'] = self.crypto['base_currency'] + '-USD'
|
|
38
49
|
|
|
50
|
+
def get_all_etf(self):
|
|
51
|
+
"""
|
|
52
|
+
Get all etfs from TradingView
|
|
53
|
+
"""
|
|
54
|
+
data_query = '{"columns":["name","description","logoid","update_mode","type","typespecs","close","pricescale","minmov","fractional","minmove2","currency","change","Value.Traded","relative_volume_10d_calc","aum","fundamental_currency_code","nav_total_return.5Y","expense_ratio","asset_class.tr","focus.tr","nav_discount_premium","category.tr","brand.tr","niche.tr"],"ignore_unknown_fields":false,"options":{"lang":"en"},"price_conversion":{"to_symbol":true},"range":[0,3000],"sort":{"sortBy":"aum","sortOrder":"desc"},"markets":["america"],"filter2":{"operator":"and","operands":[{"operation":{"operator":"or","operands":[{"operation":{"operator":"and","operands":[{"expression":{"left":"typespecs","operation":"has","right":["etn"]}}]}},{"operation":{"operator":"and","operands":[{"expression":{"left":"typespecs","operation":"has","right":["etf"]}}]}}]}}]}}'
|
|
55
|
+
response = requests.post('https://scanner.tradingview.com/america/scan', data=data_query)
|
|
56
|
+
data = response.json()
|
|
57
|
+
list_elements = list(map(lambda x:x['d'], data['data'] ))
|
|
58
|
+
self.etf = pd.DataFrame(list_elements)
|
|
59
|
+
self.etf.columns = json.loads(data_query)['columns']
|
|
60
|
+
self.etf = self.etf[self.etf['name'].str.contains('\\.')!=True]
|
|
61
|
+
|
|
39
62
|
|
|
40
63
|
def get_one_stock_info(self, ticker):
|
|
64
|
+
"""
|
|
65
|
+
Get info about one stock
|
|
66
|
+
param: ticker
|
|
67
|
+
return: dict
|
|
68
|
+
"""
|
|
41
69
|
ticker = ticker.upper()
|
|
42
70
|
one_row = self.stock.loc[self.stock['name']==ticker,].iloc[0]
|
|
43
71
|
tsec = self.stock.loc[self.stock['sector']==one_row['sector']].reset_index(drop=True)
|
|
@@ -61,6 +89,11 @@ class Tw:
|
|
|
61
89
|
|
|
62
90
|
|
|
63
91
|
def get_top_n_stocks_by_sector(self,percent=10):
|
|
92
|
+
"""
|
|
93
|
+
Get top n % stocks by sector
|
|
94
|
+
param: percent
|
|
95
|
+
return: pandas dataframe
|
|
96
|
+
"""
|
|
64
97
|
return(
|
|
65
98
|
(
|
|
66
99
|
self.stock.groupby('sector')
|
|
@@ -71,6 +104,11 @@ class Tw:
|
|
|
71
104
|
|
|
72
105
|
|
|
73
106
|
def get_plotly_title(self, ticker):
|
|
107
|
+
"""
|
|
108
|
+
Get plotly title for stock or crypto
|
|
109
|
+
param: ticker
|
|
110
|
+
return: str
|
|
111
|
+
"""
|
|
74
112
|
|
|
75
113
|
if '-USD' in ticker:
|
|
76
114
|
coin = self.crypto.loc[self.crypto['ticker']==ticker].iloc[0]
|
|
@@ -81,6 +119,11 @@ class Tw:
|
|
|
81
119
|
return(plotly_title)
|
|
82
120
|
|
|
83
121
|
def get_sec_plot(self, ticker):
|
|
122
|
+
"""
|
|
123
|
+
Get plotly figure for a ticker showing the sector location of the ticker
|
|
124
|
+
param: ticker
|
|
125
|
+
return: plotly figure
|
|
126
|
+
"""
|
|
84
127
|
row_df = self.stock.loc[self.stock['name']==ticker]
|
|
85
128
|
row_df.rename(columns = {'description': 'Company'}, inplace=True)
|
|
86
129
|
secdf = self.stock.loc[ (self.stock['sector'] ==row_df['sector'].iloc[0] ) ].reset_index(drop=True)
|
|
@@ -101,6 +144,12 @@ class Tw:
|
|
|
101
144
|
return (fig)
|
|
102
145
|
|
|
103
146
|
def get_ind_plot(self, ticker):
|
|
147
|
+
"""
|
|
148
|
+
Get plotly figure for a ticker showing the industry location of the ticker
|
|
149
|
+
param: ticker
|
|
150
|
+
return: plotly figure
|
|
151
|
+
"""
|
|
152
|
+
|
|
104
153
|
row_df = self.stock.loc[self.stock['name']==ticker]
|
|
105
154
|
inddf = self.stock.loc[ (self.stock['industry'] ==row_df['industry'].iloc[0] ) ].reset_index(drop=True)
|
|
106
155
|
row_df.rename(columns = {'description': 'Company'}, inplace=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: goldhand
|
|
3
|
-
Version: 15.
|
|
3
|
+
Version: 15.5
|
|
4
4
|
Summary: A package working with financial data
|
|
5
5
|
Home-page: https://github.com/misrori/goldhand
|
|
6
6
|
Author: Mihaly
|
|
@@ -25,7 +25,6 @@ pip install goldhand
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
# TradingView
|
|
30
29
|
|
|
31
30
|
|
|
@@ -40,11 +39,15 @@ tw.stock
|
|
|
40
39
|
|
|
41
40
|
# data frame of the top 300 crypto currency
|
|
42
41
|
tw.crypto
|
|
42
|
+
|
|
43
|
+
# data frame of the top 3000 etf
|
|
44
|
+
tw.etf
|
|
45
|
+
|
|
43
46
|
```
|
|
44
47
|
|
|
45
48
|
```python
|
|
46
49
|
# Get a plot of the stock to see the location in the sector
|
|
47
|
-
tw.get_sec_plot('AMD')
|
|
50
|
+
tw.get_sec_plot('AMD').show()
|
|
48
51
|
|
|
49
52
|
```
|
|
50
53
|

|
|
@@ -52,7 +55,7 @@ tw.get_sec_plot('AMD')
|
|
|
52
55
|
|
|
53
56
|
```python
|
|
54
57
|
# Get a plot of the stock to see the location in the industry
|
|
55
|
-
tw.get_sec_plot('AMD')
|
|
58
|
+
tw.get_sec_plot('AMD').show()
|
|
56
59
|
|
|
57
60
|
```
|
|
58
61
|

|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
goldhand/__init__.py,sha256=2D68nqSZuv6sqyLJbOXnWIeeFpNgpYc90rHa2Fo70lk,152
|
|
2
|
+
goldhand/backtest.py,sha256=IJ0Pi3vxFb_tLkPEmjCuZhBxHOpP0p-5tXPyn9s9KyM,6736
|
|
3
|
+
goldhand/helpers.py,sha256=l9yn0kVTiwfUR8sI5nH1QFx6dYikaUQgRA227Ox7hs0,6130
|
|
4
|
+
goldhand/stocks.py,sha256=2fmhAw9dBXIhJbHY70LCdSBo_Gr24wRiy1IF3r8nyXA,13640
|
|
5
|
+
goldhand/strategy_goldhand_line.py,sha256=TEb16PvaoX07bjtTRVMYlz2ilJ_YlQ2Q6_o-sAC60QQ,12056
|
|
6
|
+
goldhand/strategy_rsi.py,sha256=JhmefDm-PXmIT2tQNeLFjaDb0SpR1yln33wuDPt1Zp4,9540
|
|
7
|
+
goldhand/tw.py,sha256=XrCkWeLt-Qny9As9eC9s45aqP-90TeACugGe_GFB3ws,10727
|
|
8
|
+
goldhand-15.5.dist-info/METADATA,sha256=GSP4UpikjvKqiegB-LVoHrSOmLJQfdgTHl4jU9O1QDM,2007
|
|
9
|
+
goldhand-15.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
10
|
+
goldhand-15.5.dist-info/top_level.txt,sha256=siEJ2_a_Fx_7hqRI4Ms6SzCelbXrK_1H_eOF8KAaMdA,9
|
|
11
|
+
goldhand-15.5.dist-info/RECORD,,
|
goldhand-15.4.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
goldhand/__init__.py,sha256=2D68nqSZuv6sqyLJbOXnWIeeFpNgpYc90rHa2Fo70lk,152
|
|
2
|
-
goldhand/backtest.py,sha256=haK0c7wbUv02DUU5LcrvDSC1i0h1nDX7HHYzD9abhb8,6456
|
|
3
|
-
goldhand/helpers.py,sha256=l9yn0kVTiwfUR8sI5nH1QFx6dYikaUQgRA227Ox7hs0,6130
|
|
4
|
-
goldhand/stocks.py,sha256=rQmcBo6cwu8mXmVSqT9PJhHCHJ9X1laPwhqX5sDHS6E,11886
|
|
5
|
-
goldhand/strategy_goldhand_line.py,sha256=TEb16PvaoX07bjtTRVMYlz2ilJ_YlQ2Q6_o-sAC60QQ,12056
|
|
6
|
-
goldhand/strategy_rsi.py,sha256=JhmefDm-PXmIT2tQNeLFjaDb0SpR1yln33wuDPt1Zp4,9540
|
|
7
|
-
goldhand/tw.py,sha256=Rv0oy9QjX3FC_7Rxiv_oUftQhkvrq65LUgbrhwXhWDE,8460
|
|
8
|
-
goldhand-15.4.dist-info/METADATA,sha256=OAiDn38e4u0l9lorFyMv1yali-oDlvdXL1upFholHRE,1952
|
|
9
|
-
goldhand-15.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
10
|
-
goldhand-15.4.dist-info/top_level.txt,sha256=siEJ2_a_Fx_7hqRI4Ms6SzCelbXrK_1H_eOF8KAaMdA,9
|
|
11
|
-
goldhand-15.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|