azapyGUI 0.0.1__tar.gz → 0.0.2__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.
- {azapyGUI-0.0.1 → azapygui-0.0.2}/PKG-INFO +1 -1
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/AppSettingsPage.py +6 -6
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/AppSettingsPageMisc.py +4 -4
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/BacktestEntryWindow.py +2 -5
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/EditPortfolioWindow.py +6 -2
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/GetMktData.py +5 -4
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/PortAnalyseWindow.py +4 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/config.py +1 -1
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configSettings.py +2 -2
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI.egg-info/PKG-INFO +1 -1
- {azapyGUI-0.0.1 → azapygui-0.0.2}/setup.py +1 -1
- {azapyGUI-0.0.1 → azapygui-0.0.2}/LICENSE +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/README.md +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/AppSettingsWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/BacktestComputation.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/BacktestMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/CloneMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/CrossHairBCursor.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/DF_Window.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/DF_table.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/EditMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/EntryClonePortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/EntryNameWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/EntryRenamePortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/MenuApp.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/MktDataFrame.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/MktDataNode.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/ModelParamEditWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/NrShares_table.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/PortDataNode.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/PortfolioFrame.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/RebalanceMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/RemoveMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/SaveMenuPortfolioWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/Scrollable.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/SelectOneWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/SymbAnalyseWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/SymbExtractWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/SymbTableEntry.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/TimeSeriesViewWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/ViewTip.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/WeightsWindow.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/__init__.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/azHelper.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/azapyApp.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configHelps.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configMSG.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configModels.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configPlot.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/configTips.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/mktDataValidation.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/modelParametersValidation.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/serviceMasterUserConfig.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI/tkHelper.py +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI.egg-info/SOURCES.txt +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI.egg-info/dependency_links.txt +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI.egg-info/requires.txt +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/azapyGUI.egg-info/top_level.txt +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/pyproject.toml +0 -0
- {azapyGUI-0.0.1 → azapygui-0.0.2}/setup.cfg +0 -0
|
@@ -36,7 +36,8 @@ class AppSettingsPage(tk.Frame):
|
|
|
36
36
|
|
|
37
37
|
# on frm_set
|
|
38
38
|
self._setDef = configSettings.settings_model[self._category]
|
|
39
|
-
self.settings = deepcopy(configSettings.MasterApplicationSettings)
|
|
39
|
+
#self.settings = deepcopy(configSettings.MasterApplicationSettings)
|
|
40
|
+
self.settings = {key: configSettings.MasterApplicationSettings[key] for key in self._setDef.keys()}
|
|
40
41
|
row = 0
|
|
41
42
|
self._chk_val = {}
|
|
42
43
|
self._chk_btn = {}
|
|
@@ -156,7 +157,7 @@ class AppSettingsPage(tk.Frame):
|
|
|
156
157
|
if vpar is None:
|
|
157
158
|
msg = (configMSG._validate_provider_key_msg
|
|
158
159
|
+'\n'
|
|
159
|
-
+ configSettings.
|
|
160
|
+
+ configSettings.get_envkey_vriable_name(pp))
|
|
160
161
|
tk.messagebox.showwarning(title="Warning", message=msg, parent=self._window)
|
|
161
162
|
del self.settings[param][pp]
|
|
162
163
|
self._chk_btn[param][pp].deselect()
|
|
@@ -189,10 +190,9 @@ class AppSettingsPage(tk.Frame):
|
|
|
189
190
|
|
|
190
191
|
|
|
191
192
|
def _btn_save_func(self):
|
|
192
|
-
configSettings.MasterApplicationSettings
|
|
193
|
-
_saveMasterUserConfig(configSettings.MasterApplicationSettings)
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
configSettings.MasterApplicationSettings.update(self.settings)
|
|
194
|
+
_saveMasterUserConfig(configSettings.MasterApplicationSettings)
|
|
195
|
+
|
|
196
196
|
|
|
197
197
|
def _btn_reset_func(self):
|
|
198
198
|
for kk, vv in self._setDef.items():
|
|
@@ -26,7 +26,8 @@ class AppSettingsPageMisc(tk.Frame):
|
|
|
26
26
|
|
|
27
27
|
# on frm
|
|
28
28
|
self._setDef = configSettings.settings_model[self._category]
|
|
29
|
-
self.settings = deepcopy(configSettings.MasterApplicationSettings)
|
|
29
|
+
#self.settings = deepcopy(configSettings.MasterApplicationSettings)
|
|
30
|
+
self.settings = {key: configSettings.MasterApplicationSettings[key] for key in self._setDef.keys()}
|
|
30
31
|
row = 0
|
|
31
32
|
self._chk_val = {}
|
|
32
33
|
self._chk_btn = {}
|
|
@@ -92,9 +93,8 @@ class AppSettingsPageMisc(tk.Frame):
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
def _btn_save_func(self):
|
|
95
|
-
for
|
|
96
|
-
|
|
97
|
-
configSettings.MasterApplicationSettings = deepcopy(self.settings)
|
|
96
|
+
self.settings.update({key: self._chk_val[key].get() for key in self._chk_val.keys()})
|
|
97
|
+
configSettings.MasterApplicationSettings.update(self.settings)
|
|
98
98
|
_saveMasterUserConfig(configSettings.MasterApplicationSettings)
|
|
99
99
|
config.tiptil.turned(on=configSettings.MasterApplicationSettings["ShowTips"])
|
|
100
100
|
|
|
@@ -150,11 +150,8 @@ class BacktestEntryWindow:
|
|
|
150
150
|
|
|
151
151
|
self._btn_start = tk.Button(master=frm_btn, text='Start', width=12, command=self._btn_start_func)
|
|
152
152
|
self._btn_start.pack(side=tk.RIGHT, padx=5, pady=5,)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
# self._frm_progress.pack(fill=tk.X, expand=False, padx=5, pady=5)
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
|
|
154
|
+
|
|
158
155
|
def _destroy_all_windows(self):
|
|
159
156
|
for widget in self._window.winfo_children():
|
|
160
157
|
if isinstance(widget, tk.Toplevel):
|
|
@@ -147,13 +147,17 @@ class EditPortfolioWindow:
|
|
|
147
147
|
def _tree_model_write(self):
|
|
148
148
|
for name, selector in self.portfolio.selectors.items():
|
|
149
149
|
item = self._tree_model.insert("", selector['index'], text=name, tags=("m_selector",))
|
|
150
|
+
invisible = configModels.param_default(name, visible=False)
|
|
150
151
|
for kk, vv in selector['param'].items():
|
|
151
|
-
|
|
152
|
+
if kk in invisible: continue
|
|
153
|
+
self._tree_model.insert(item, tk.END, text=kk +" = "+ str(vv))
|
|
152
154
|
|
|
153
155
|
for name, optimizer in self.portfolio.optimizer.items():
|
|
154
156
|
item = self._tree_model.insert("", tk.END, text=name, tags=("m_optimizer",))
|
|
157
|
+
invisible = configModels.param_default(name, visible=False)
|
|
155
158
|
for kk, vv in optimizer['param'].items():
|
|
156
|
-
|
|
159
|
+
if kk in invisible: continue
|
|
160
|
+
self._tree_model.insert(item, tk.END, text=kk +" = "+ str(vv))
|
|
157
161
|
|
|
158
162
|
|
|
159
163
|
def _set_tree_menu_selector(self):
|
|
@@ -19,18 +19,19 @@ class GetMktData():
|
|
|
19
19
|
param[kk] = vv
|
|
20
20
|
|
|
21
21
|
file_dir = configSettings.MasterApplicationSettings["UserMktDataDirectory"]
|
|
22
|
+
fsave, fforce = (False, True) if file_dir is None else (True, force)
|
|
22
23
|
|
|
23
24
|
self._symb_req_default = {"symbol": None,
|
|
24
25
|
"sdate": None,
|
|
25
26
|
"edate": None,
|
|
26
27
|
"output_format": 'dict',
|
|
27
28
|
"source": source,
|
|
28
|
-
"force":
|
|
29
|
-
"save":
|
|
29
|
+
"force": fforce,
|
|
30
|
+
"save": fsave,
|
|
30
31
|
"file_dir": file_dir,
|
|
31
32
|
"file_format": 'csv',
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
"api_key": api_key,
|
|
34
|
+
"param": param,
|
|
34
35
|
}
|
|
35
36
|
self._mktr = az.MkTreader(verbose=False)
|
|
36
37
|
|
|
@@ -56,6 +56,8 @@ class PortAnalyseWindow(TimeSeriesViewWindow):
|
|
|
56
56
|
rep = pp.port_perf()
|
|
57
57
|
cols = ['RR', 'DD', 'RoMaD']
|
|
58
58
|
rep[cols] = (rep[cols] * 100).round(2)
|
|
59
|
+
rep.index = pd.Categorical(rep.index, categories=rep.index, ordered=True)
|
|
60
|
+
rep.index.name = 'Symbols'
|
|
59
61
|
|
|
60
62
|
return rep, f'{pname} Summary', '400x200'
|
|
61
63
|
|
|
@@ -89,6 +91,7 @@ class PortAnalyseWindow(TimeSeriesViewWindow):
|
|
|
89
91
|
rep = pp.port_quarterly_returns(withcomp=True)
|
|
90
92
|
rep = (rep * 100).round(2)
|
|
91
93
|
rep.rename(columns={'close': pname}, inplace=True)
|
|
94
|
+
rep.columns = pd.Categorical(rep.columns, categories=rep.columns, ordered=True)
|
|
92
95
|
rep.columns.name = 'Symbols'
|
|
93
96
|
|
|
94
97
|
rep.index = pd.MultiIndex.from_arrays(
|
|
@@ -106,6 +109,7 @@ class PortAnalyseWindow(TimeSeriesViewWindow):
|
|
|
106
109
|
rep = pp.port_monthly_returns(withcomp=True)
|
|
107
110
|
rep = (rep * 100).round(2)
|
|
108
111
|
rep.rename(columns={'close': pname}, inplace=True)
|
|
112
|
+
rep.columns = pd.Categorical(rep.columns, categories=rep.columns, ordered=True)
|
|
109
113
|
rep.columns.name = 'Symbols'
|
|
110
114
|
|
|
111
115
|
rep.index = pd.MultiIndex.from_arrays(
|
|
@@ -127,12 +127,12 @@ def get_settings_default_all():
|
|
|
127
127
|
return rout
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
def
|
|
130
|
+
def get_envkey_vriable_name(provider):
|
|
131
131
|
return settings_model["MkTData"]["Provider"]["values"][provider]["key"]["envkey"]
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
def get_envkey(provider):
|
|
135
|
-
return os.getenv(
|
|
135
|
+
return os.getenv(get_envkey_vriable_name(provider))
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
MasterApplicationSettings = None
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as readme:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="azapyGUI",
|
|
8
|
-
version="0.0.
|
|
8
|
+
version="0.0.2",
|
|
9
9
|
author="Mircea Marinescu",
|
|
10
10
|
author_email="mircea.marinescu@outlook.com",
|
|
11
11
|
description="GUI for azapy library - Financial Portfolio Optimization Algorithms",
|
|
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
|
|
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
|