-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
307 lines (280 loc) · 13.6 KB
/
Copy pathsettings.py
File metadata and controls
307 lines (280 loc) · 13.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#Settings
class settings:
FMP_data = 'fmp_data'
Yahoo_Data_Path = 'yahoo_data'
info_file_path = 'tickers_info.csv'
yahoo_close = 'Adj Close'
yahoo_date = 'Date'
FMP_close = 'close'
FMP_date = 'date'
date0 = '1999-01-01'
RiskFree_Rate=0.02
budget = 1000
cppi_floor = 0.9
multiplier = 4
no_values = ['BKR','BRK.B','BF.B','PEAK','NLOK', 'OMAM']
exchange_year = 2.5
etf_transaction_fee = 2
etf_fee = 0.038
portugal_tax = 0.28
etf_tickers = {
'^GSPC':
{
'Description': 'S&P 500 Indice'},
##########-----WORLD-----##########
'SWRD.AS':
{
'Description': 'SPDR MSCI World UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.12},
'SPPW.DE':
{
'Description': 'SPDR MSCI World UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.12},
'IWDA.AS':
{'Description': 'iShares Core MSCI World UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': True,
'Fee': 0.20},
'EUNL.DE':
{'Description': 'iShares Core MSCI World UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.20},
'CSPX.AS':
{'Description': 'iShares Core S&P 500 UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.07},
'SXR8.DE':
{'Description': 'iShares Core S&P 500 UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.07},
'IJPA.AS':
{'Description': 'iShares Core MSCI Japan IMI UCITS ETF USD',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.15},
'EUNN.DE':
{'Description': 'iShares Core MSCI Japan IMI UCITS ETF USD',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.15},
'IKRA.AS':
{'Description': 'iShares MSCI Korea UCITS ETF USD',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.74},
'IQQK.DE':
{'Description': 'iShares MSCI Korea UCITS ETF USD',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.74
},
'SXRG.DE':
{'Description': 'iShares MSCI USA Small Cap UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.43},
'IUSN.DE':
{'Description': 'iShares MSCI World Small Cap UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.35},
'IQQ0.DE':
{'Description': 'iShares Edge MSCI World Minimum Volatility UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.30},
'QDVE.DE':
{'Description': 'iShares S&P 500 Information Technology Sector UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.15},
'QDVG.DE':
{'Description': 'iShares S&P 500 Health Care Sector UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.15},
##########-----EUROPE-----##########
'CSX5.AS':
{'Description': 'iShares Core EURO STOXX 50 ETF EUR',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.10},
'SXRT.DE':
{'Description': 'iShares Core EURO STOXX 50 ETF EUR',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.10},
'CEMU.AS':
{'Description': 'iShares Core MSCI EMU UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.12},
'SXR7.DE':
{'Description': 'iShares Core MSCI EMU UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.12},
'EUNA.AS':
{'Description': 'iShares STOXX Europe 50 UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.35},
'EUN1.DE':
{'Description': 'iShares STOXX Europe 50 UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.35},
'SXRJ.DE':
{'Description': 'iShares MSCI EMU Small Cap UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.58},
##########-----EMERGING MARKETS-----##########
'EMIM.AS':
{'Description': 'iShares Core MSCI EM IMI UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.18},
'IS3N.DE':
{'Description': 'iShares Core MSCI EM IMI UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.18},
'IBZL.AS':
{'Description': 'iShares MSCI Brazil UCITS ETF Eur',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.74},
'IQQB.DE':
{'Description': 'iShares MSCI Brazil UCITS ETF Eur',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.74},
'CEBL.DE':
{'Description': 'iShares MSCI EM Asia UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.65},
'IQQC.DE':
{'Description': 'iShares China Large Cap UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.74},
'FXC.AS':
{'Description': 'iShares China Large Cap UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.74},
'EUNI.DE':
{'Description': 'iShares MSCI EM Small Cap UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.74},
##########-----BONDS-----##########
'ICOV.AS':
{'Description': 'iShares € Covered Bond UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.20},
'IUS6.DE':
{'Description': 'iShares € Covered Bond UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.20},
'LQDA.AS':
{'Description': 'iShares $ Corp Bond UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.20},
'IBCD.DE':
{'Description': 'iShares $ Corp Bond UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.20},
#### -----0.07%-----####
'IBCC.DE':
{'Description': 'iShares $ Treasury Bond 0-1yr UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.07},
'IBTS.AS':
{'Description': 'iShares $ Treasury Bond 1-3yr UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.07},
'IUSU.DE':
{'Description': 'iShares $ Treasury Bond 1-3yr UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.07},
'CBU7.AS':
{'Description': 'iShares $ Treasury Bond 3-7yr UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.07},
'SXRL.DE':
{'Description': 'iShares $ Treasury Bond 3-7yr UCITS ETF',
'Exchange': 'XETR',
'Type': 'Acc',
'Degiro Free': False,
'Fee': 0.07},
'BTMA.AS':
{'Description': 'iShares $ Treasury Bond 7-10yr UCITS ETF',
'Exchange': 'XAMS',
'Type': 'Dist',
'Degiro Free': True,
'Fee': 0.07},
'IUSM.DE':
{'Description': 'iShares $ Treasury Bond 7-10yr UCITS ETF',
'Exchange': 'XETR',
'Type': 'Dist',
'Degiro Free': False,
'Fee': 0.07}
}
yahoo_drop_columns = ['index', 'Open', 'High', 'Low', 'Close', 'Volume']
fmp_drop_columns = ['index','open','high','low','volume','unadjustedVolume','change','changePercent','vwap','label','changeOverTime']