Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions examples/use-cases/instruments/Forward Rate Agreement.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,30 @@
"print(f\"Configuration recipe loaded into LUSID at time {response.value}.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# For environments that have instrument events configured, we also need to set the instrument events recipe on the portfolio.\n",
"patch_document = [\n",
" {\n",
" \"value\": {\n",
" \"scope\": market_data_scope,\n",
" \"code\": recipe_code\n",
" },\n",
" \"path\": \"/instrumentEventConfiguration/recipeId\",\n",
" \"op\": \"add\"\n",
" }\n",
"]\n",
"\n",
"patch_response = transaction_portfolios_api.patch_portfolio_details(\n",
" scope=scope,\n",
" code=portfolio_code,\n",
" operation=patch_document)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
24 changes: 24 additions & 0 deletions examples/use-cases/instruments/Interest Rate Swap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,30 @@
"print(f\"Configuration recipe for ConstantTimeValueOfMoney Model loaded into LUSID at time {response.value}.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# For environments that have instrument events configured, we also need to set the instrument events recipe on the portfolio.\n",
"patch_document = [\n",
" {\n",
" \"value\": {\n",
" \"scope\": market_data_scope,\n",
" \"code\": ctvm_recipe_code\n",
" },\n",
" \"path\": \"/instrumentEventConfiguration/recipeId\",\n",
" \"op\": \"add\"\n",
" }\n",
"]\n",
"\n",
"patch_response = transaction_portfolios_api.patch_portfolio_details(\n",
" scope=portfolio_scope,\n",
" code=portfolio_code,\n",
" operation=patch_document)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
29 changes: 29 additions & 0 deletions examples/use-cases/instruments/Mortgage Backed Securities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,35 @@
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# For environments that have instrument events configured, we also need to set the instrument events recipe on the portfolios.\n",
"patch_document = [\n",
" {\n",
" \"value\": {\n",
" \"scope\": scope,\n",
" \"code\": recipe_code\n",
" },\n",
" \"path\": \"/instrumentEventConfiguration/recipeId\",\n",
" \"op\": \"add\"\n",
" }\n",
"]\n",
"\n",
"patch_response = transaction_portfolios_api.patch_portfolio_details(\n",
" scope=scope,\n",
" code=portfolio_1_code,\n",
" operation=patch_document)\n",
"\n",
"patch_response = transaction_portfolios_api.patch_portfolio_details(\n",
" scope=scope,\n",
" code=portfolio_2_code,\n",
" operation=patch_document)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down