PyQuantimClient 1.0.77__tar.gz → 1.0.80__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQuantimClient
3
- Version: 1.0.77
3
+ Version: 1.0.80
4
4
  Summary: Python client to access quantIM services
5
5
  Author: Daniel Velasquez
6
6
  Author-email: daniel.velasquez@sura-im.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyQuantimClient
3
- Version: 1.0.77
3
+ Version: 1.0.80
4
4
  Summary: Python client to access quantIM services
5
5
  Author: Daniel Velasquez
6
6
  Author-email: daniel.velasquez@sura-im.com
@@ -4,7 +4,7 @@ setup(
4
4
  name='PyQuantimClient',
5
5
  packages=['PyQuantimClient'],
6
6
  package_dir={'PyQuantimClient': 'src'},
7
- version='1.0.77',
7
+ version='1.0.80',
8
8
  description='Python client to access quantIM services',
9
9
  author='Daniel Velasquez',
10
10
  author_email='daniel.velasquez@sura-im.com',
@@ -151,4 +151,40 @@ class risk_data(quantim):
151
151
  resp = self.upload_with_presigned_url(file_path_performance, "condor-sura", "inputs/benchmarks/performance/cl/performance.csv")
152
152
  if file_path_peers is not None:
153
153
  resp = self.upload_with_presigned_url(file_path_peers, "condor-sura", "inputs/benchmarks/peers/cl/peers.csv")
154
- return resp
154
+ return resp
155
+
156
+ def load_pat_co(self, file_path):
157
+ '''
158
+ Load series Chile to s3.
159
+ '''
160
+ # Load data
161
+ resp = self.upload_with_presigned_url(file_path, "condor-pat", "inputs/asulado/BD_Isin.csv")
162
+ return resp
163
+
164
+ def port_contrib(self, start_date, end_date, names, groupers=["secType"], subgroup=False):
165
+ '''
166
+ Portfolio risk an return ex-post contribution.
167
+ '''
168
+ hist_class = True
169
+ return_all_dates = True
170
+ data = {'start_date': start_date,'end_date':end_date,"groupers":groupers ,'portfolioNames':names, "hist_class":hist_class, "subgroup":subgroup, "return_all_dates":return_all_dates}
171
+ resp = self.api_call('port_pat', method="post", data=data, verify=False)
172
+ metrics = pd.DataFrame(resp['metrics'])
173
+ ref_dates = resp['ref_dates']
174
+
175
+ return metrics, ref_dates
176
+
177
+ def port_alpha(self, start_date, end_date, name, groupers=["secType"], subgroup=False):
178
+ '''
179
+ Portfolio risk an return ex-post attribution.
180
+ '''
181
+ hist_class = True
182
+ verbose = False
183
+ return_all_dates = True
184
+
185
+ data = {'start_date': start_date,'end_date':end_date,"groupers":groupers ,'portfolioName':name, 'benchmarkName':f"{name}_BMK", "verbose":verbose, "hist_class":hist_class, "subgroup":subgroup, "return_all_dates":return_all_dates}
186
+ resp = self.api_call('port_alpha', method="post", data=data, verify=False)
187
+ metrics = pd.DataFrame(resp['attribution'])
188
+ ref_dates = resp['ref_dates']
189
+
190
+ return metrics, ref_dates