Skip to content

Commit df37c14

Browse files
Update EX-2.08.01-IPA-CurvesAndSurfaces-ForwardCurve.ipynb with valuation_date parameter for SwapZcCurveParameters
1 parent 1143b43 commit df37c14

File tree

1 file changed

+58
-69
lines changed

1 file changed

+58
-69
lines changed

Examples/2-Content/2.08-IPA-CurvesAndSurfaces/EX-2.08.01-IPA-CurvesAndSurfaces-ForwardCurve.ipynb

Lines changed: 58 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@
4949
},
5050
{
5151
"cell_type": "code",
52-
"execution_count": null,
53-
"metadata": {},
52+
"execution_count": 1,
53+
"metadata": {
54+
"ExecuteTime": {
55+
"end_time": "2024-01-10T13:53:02.955343100Z",
56+
"start_time": "2024-01-10T13:53:02.364273700Z"
57+
}
58+
},
5459
"outputs": [],
5560
"source": [
5661
"import os\n",
@@ -66,8 +71,13 @@
6671
},
6772
{
6873
"cell_type": "code",
69-
"execution_count": 1,
70-
"metadata": {},
74+
"execution_count": 2,
75+
"metadata": {
76+
"ExecuteTime": {
77+
"end_time": "2024-01-10T13:53:09.223531600Z",
78+
"start_time": "2024-01-10T13:53:02.374307300Z"
79+
}
80+
},
7181
"outputs": [],
7282
"source": [
7383
"import refinitiv.data as rd\n",
@@ -85,16 +95,31 @@
8595
},
8696
{
8797
"cell_type": "code",
88-
"execution_count": 2,
89-
"metadata": {},
98+
"execution_count": 3,
99+
"metadata": {
100+
"ExecuteTime": {
101+
"end_time": "2024-01-10T13:53:11.151202500Z",
102+
"start_time": "2024-01-10T13:53:08.378545500Z"
103+
}
104+
},
90105
"outputs": [
106+
{
107+
"name": "stderr",
108+
"output_type": "stream",
109+
"text": [
110+
"C:\\Users\\UX501327\\PycharmProjects\\lseg-data\\refinitiv\\data\\_access_layer\\session.py:71:FutureWarning: \n",
111+
"You open a platform session using the default value of the signon_control parameter (signon_control=True).\n",
112+
"In future library version v2.0, this default will be changed to False.\n",
113+
"If you want to keep the same behavior as today, you will need to set the signon_control parameter to True either in the library configuration file\n",
114+
"({'sessions':{'platform':{'your_session_name':{'signon_control':true}}}}) or in your code where you create the Platform Session.\n",
115+
"These alternative options are already supported in the current version of the library.\n"
116+
]
117+
},
91118
{
92119
"data": {
93-
"text/plain": [
94-
"<refinitiv.data.session.Definition object at 0x7fa6a3b1c9d0 {name='workspace'}>"
95-
]
120+
"text/plain": "<refinitiv.data.session.Definition object at 0x22c9b282a50 {name='rdp'}>"
96121
},
97-
"execution_count": 2,
122+
"execution_count": 3,
98123
"metadata": {},
99124
"output_type": "execute_result"
100125
}
@@ -112,65 +137,20 @@
112137
},
113138
{
114139
"cell_type": "code",
115-
"execution_count": 3,
116-
"metadata": {},
140+
"execution_count": 4,
141+
"metadata": {
142+
"ExecuteTime": {
143+
"end_time": "2024-01-10T13:53:13.597918300Z",
144+
"start_time": "2024-01-10T13:53:11.152199800Z"
145+
}
146+
},
117147
"outputs": [
118148
{
119149
"data": {
120-
"text/html": [
121-
"<div>\n",
122-
"<style scoped>\n",
123-
" .dataframe tbody tr th:only-of-type {\n",
124-
" vertical-align: middle;\n",
125-
" }\n",
126-
"\n",
127-
" .dataframe tbody tr th {\n",
128-
" vertical-align: top;\n",
129-
" }\n",
130-
"\n",
131-
" .dataframe thead th {\n",
132-
" text-align: right;\n",
133-
" }\n",
134-
"</style>\n",
135-
"<table border=\"1\" class=\"dataframe\">\n",
136-
" <thead>\n",
137-
" <tr style=\"text-align: right;\">\n",
138-
" <th></th>\n",
139-
" <th>endDate</th>\n",
140-
" <th>startDate</th>\n",
141-
" <th>discountFactor</th>\n",
142-
" <th>ratePercent</th>\n",
143-
" <th>tenor</th>\n",
144-
" </tr>\n",
145-
" </thead>\n",
146-
" <tbody>\n",
147-
" <tr>\n",
148-
" <th>0</th>\n",
149-
" <td>2021-02-01</td>\n",
150-
" <td>2021-02-01</td>\n",
151-
" <td>1.0</td>\n",
152-
" <td>0.744861</td>\n",
153-
" <td>0D</td>\n",
154-
" </tr>\n",
155-
" <tr>\n",
156-
" <th>1</th>\n",
157-
" <td>2021-02-04</td>\n",
158-
" <td>2021-02-01</td>\n",
159-
" <td>0.999939</td>\n",
160-
" <td>0.744861</td>\n",
161-
" <td>1D</td>\n",
162-
" </tr>\n",
163-
" </tbody>\n",
164-
"</table>\n",
165-
"</div>"
166-
],
167-
"text/plain": [
168-
" endDate startDate discountFactor ratePercent tenor\n",
169-
"0 2021-02-01 2021-02-01 1.0 0.744861 0D\n",
170-
"1 2021-02-04 2021-02-01 0.999939 0.744861 1D"
171-
]
150+
"text/plain": " endDate startDate discountFactor ratePercent tenor\n0 2021-02-01 2021-02-01 1.0 -0.556761 0D\n1 2021-02-04 2021-02-01 1.000046 -0.556761 1D",
151+
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>endDate</th>\n <th>startDate</th>\n <th>discountFactor</th>\n <th>ratePercent</th>\n <th>tenor</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>2021-02-01</td>\n <td>2021-02-01</td>\n <td>1.0</td>\n <td>-0.556761</td>\n <td>0D</td>\n </tr>\n <tr>\n <th>1</th>\n <td>2021-02-04</td>\n <td>2021-02-01</td>\n <td>1.000046</td>\n <td>-0.556761</td>\n <td>1D</td>\n </tr>\n </tbody>\n</table>\n</div>"
172152
},
173-
"execution_count": 3,
153+
"execution_count": 4,
174154
"metadata": {},
175155
"output_type": "execute_result"
176156
}
@@ -192,7 +172,7 @@
192172
" forward_start_tenor=\"some_start_tenor\",\n",
193173
" )\n",
194174
" ],\n",
195-
" curve_parameters=forward_curves.SwapZcCurveParameters(),\n",
175+
" curve_parameters=forward_curves.SwapZcCurveParameters(valuation_date=\"2021-02-01\"),\n",
196176
" curve_tag=\"some_tag\",\n",
197177
").get_data()\n",
198178
"\n",
@@ -208,10 +188,14 @@
208188
},
209189
{
210190
"cell_type": "code",
211-
"execution_count": 4,
191+
"execution_count": 5,
212192
"metadata": {
213193
"pycharm": {
214194
"name": "#%%\n"
195+
},
196+
"ExecuteTime": {
197+
"end_time": "2024-01-10T13:53:15.956716800Z",
198+
"start_time": "2024-01-10T13:53:13.598915800Z"
215199
}
216200
},
217201
"outputs": [],
@@ -221,8 +205,13 @@
221205
},
222206
{
223207
"cell_type": "code",
224-
"execution_count": null,
225-
"metadata": {},
208+
"execution_count": 5,
209+
"metadata": {
210+
"ExecuteTime": {
211+
"end_time": "2024-01-10T13:53:15.965169700Z",
212+
"start_time": "2024-01-10T13:53:15.959264600Z"
213+
}
214+
},
226215
"outputs": [],
227216
"source": []
228217
}

0 commit comments

Comments
 (0)