Skip to content

Commit f860633

Browse files
committed
Merge branch 'QPR-12433-2' into 'master'
remove portfolio output, not relevant for ex 2 Closes QPR-12433 See merge request qs/oreswig!65
2 parents 62e31fe + 5f01a4f commit f860633

1 file changed

Lines changed: 19 additions & 104 deletions

File tree

  • OREAnalytics-SWIG/Python/Examples/Notebooks/Example_2

OREAnalytics-SWIG/Python/Examples/Notebooks/Example_2/ore.ipynb

Lines changed: 19 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,24 @@
108108
},
109109
"source": [
110110
"Kick off a process in ORE, loading all inputs from Input/ore.xml and the files referenced therein. \n",
111-
"This is equivalent to using the ORE command line application."
111+
"This is equivalent to using the ORE command line application.\n",
112+
"\n",
113+
"Running the following cells loads all inputs (portfolio, configurations) and kicks of a **Monte Carlo simulation**: \n",
114+
"- It evolves today's market into the future along alternative paths\n",
115+
"- ages the portfolio on each path\n",
116+
"- revalues the portfolio through its life and across all paths.\n",
117+
"\n",
118+
"This requires a \"model\" of the market. The \"Cross Asset Model\" in ORE covers the evolution of the market across six asset/risk classes, it evolves\n",
119+
"- yield curves\n",
120+
"- fx rates\n",
121+
"- inflation rates\n",
122+
"- equity prices\n",
123+
"- commodity prices\n",
124+
"- credit spreads\n",
125+
"\n",
126+
"and there are a few choices of the model components in ORE (LGM-1f vs Hull-White-1f/2f for yield curves, Dodgson-Kainth or Jarrow-Yildirim for Inflation, etc.).\n",
127+
"\n",
128+
"This process takes about a minute. Run-time generally depends on the number of paths we want to generate, portfolio size/complexity and number of time grid points."
112129
]
113130
},
114131
{
@@ -143,108 +160,6 @@
143160
"ore = OREApp(params)"
144161
]
145162
},
146-
{
147-
"cell_type": "markdown",
148-
"metadata": {
149-
"extensions": {
150-
"jupyter_dashboards": {
151-
"version": 1,
152-
"views": {
153-
"grid_default": {
154-
"col": 0,
155-
"height": 4,
156-
"hidden": true,
157-
"row": 12,
158-
"width": 12
159-
},
160-
"report_default": {
161-
"hidden": false
162-
}
163-
}
164-
}
165-
}
166-
},
167-
"source": [
168-
"This should have loaded the main inputs\n",
169-
"- portfolio\n",
170-
"- today's market configuration\n",
171-
"- conventions\n",
172-
"- curve configrations\n",
173-
"- pricing engine configuration"
174-
]
175-
},
176-
{
177-
"cell_type": "code",
178-
"execution_count": null,
179-
"metadata": {
180-
"extensions": {
181-
"jupyter_dashboards": {
182-
"version": 1,
183-
"views": {
184-
"grid_default": {
185-
"hidden": true
186-
},
187-
"report_default": {
188-
"hidden": true
189-
}
190-
}
191-
}
192-
},
193-
"tags": []
194-
},
195-
"outputs": [],
196-
"source": [
197-
"portfolio = ore.getInputs().portfolio()\n",
198-
"print(\"Trades:\", portfolio.size())\n",
199-
"for id in portfolio.ids():\n",
200-
" trade = portfolio.get(id)\n",
201-
" print(\"Trade: id=%s type=%s\" % (id, trade.tradeType()))\n",
202-
"\n",
203-
"#portfolioXML = portfolio.toXMLString()\n",
204-
"#print()\n",
205-
"#print(portfolioXML)"
206-
]
207-
},
208-
{
209-
"cell_type": "markdown",
210-
"metadata": {
211-
"extensions": {
212-
"jupyter_dashboards": {
213-
"version": 1,
214-
"views": {
215-
"grid_default": {
216-
"col": 0,
217-
"height": 2,
218-
"hidden": false,
219-
"row": 7,
220-
"width": 12
221-
},
222-
"report_default": {
223-
"hidden": false
224-
}
225-
}
226-
}
227-
}
228-
},
229-
"source": [
230-
"Running the following cell kicks of a **Monte Carlo simulation**: \n",
231-
"- It evolves today's market into the future along alternative paths\n",
232-
"- ages the portfolio on each path\n",
233-
"- revalues the portfolio through its life and across all paths.\n",
234-
"\n",
235-
"This requires a \"model\" of the market. The \"Cross Asset Model\" in ORE covers the evolution of the market across six asset/risk classes, it evolves\n",
236-
"- yield curves\n",
237-
"- fx rates\n",
238-
"- inflation rates\n",
239-
"- equity prices\n",
240-
"- commodity prices\n",
241-
"- credit spreads\n",
242-
"\n",
243-
"and there are a few choices of the model components in ORE (LGM-1f vs Hull-White-1f/2f for yield curves, Dodgson-Kainth or Jarrow-Yildirim for Inflation, etc.).\n",
244-
"\n",
245-
"This process takes about a minute. Run-time generally depends on the number of paths we want to generate, portfolio size/complexity and number of time grid points."
246-
]
247-
},
248163
{
249164
"cell_type": "code",
250165
"execution_count": null,
@@ -1388,7 +1303,7 @@
13881303
"name": "python",
13891304
"nbconvert_exporter": "python",
13901305
"pygments_lexer": "ipython3",
1391-
"version": "3.11.4"
1306+
"version": "3.9.6"
13921307
},
13931308
"widgets": {
13941309
"state": {

0 commit comments

Comments
 (0)