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
13 changes: 13 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This repository contains Jupyter notebooks that show how to use [LUSID](https://
| [Paging and limiting LUSID's API calls.ipynb](<features/core-lusid/Paging%20and%20limiting%20LUSID%27s%20API%20calls.ipynb>) | Paging and limiting LUSID's API calls | Shows how to slice up large requests to LUSID into smaller requests using the limit and page parameters. | paging |
| [Processing Corporate Actions as input transactions.ipynb](<features/core-lusid/Processing%20Corporate%20Actions%20as%20input%20transactions.ipynb>) | Processing Corporate Actions as input transactions | Demonstration of booking corporate action transactions using LUSID's standard input transactions | cocoon - seed_data, holdings, transaction configuration, transactions |
| [Processing Corporate Actions as native LUSID transitions.ipynb](<features/core-lusid/Processing%20Corporate%20Actions%20as%20native%20LUSID%20transitions.ipynb>) | Processing Corporate Actions using LUSID transitions | Demonstration of booking corporate actions using LUSID's transitions | cocoon - seed_data, corporate actions, holdings, transaction configuration, transactions |
| [Structured Results Store for Portfolio Level Data.ipynb](<features/core-lusid/Structured%20Results%20Store%20for%20Portfolio%20Level%20Data.ipynb>) | Loading Portfolio Level data into SRS | Shows how you can load portfolio level valuation data into the Structured Results Store | Structured Result Store |
| [Sub-holding Keys.ipynb](<features/core-lusid/Sub-holding%20Keys.ipynb>) | Sub-Holding Keys | Demonstration of how to set up and use sub-holding keys | cocoon - seed_data, holdings, properties, prorated, sub-holding keys |
| [TimeVariant Properties.ipynb](<features/core-lusid/TimeVariant%20Properties.ipynb>) | Time-variant Properties (e.g. coupon schedule) in LUSID | Illustrates the use of time-variant properties, a type of property that depend on different effective dates. | coupon schedules, multi-valued properties, time-variant properties |

Expand Down Expand Up @@ -78,9 +79,15 @@ This repository contains Jupyter notebooks that show how to use [LUSID](https://
| [Safely and efficiently test changes to your system.ipynb](<use-cases/change-management/Safely%20and%20efficiently%20test%20changes%20to%20your%20system.ipynb>) | Testing system changes | Demonstration of how to safely test changes to your data in a production environment | derived portfolios, instrument definitions, instruments, set holdings, transactions |
| [Set up a sandbox trading environment.ipynb](<use-cases/change-management/Set%20up%20a%20sandbox%20trading%20environment.ipynb>) | Sandbox trading environment | Learn how to setup a virtual trading environment in LUSID. | aggregation, instruments, properties, quotes, reference portfolios, set holdings, transactions |

## examples/use-cases/data-quality-control
| filename | title | description | features |
| --- | --- | --- | --- |
| [Custom Entities.ipynb](<use-cases/data-quality-control/Custom%20Entities.ipynb>) | Custom Entities in LUSID | Illustrates the use of Custom Entities. | Custom Entities, Data Quality, Portfolios, Relationship |

## examples/use-cases/ibor
| filename | title | description | features |
| --- | --- | --- | --- |
| [Combining instrument properties with holding properties.ipynb](<use-cases/ibor/Combining%20instrument%20properties%20with%20holding%20properties.ipynb>) | Combining instrument and holdings properties | | derived properties, security master, sub holding keys |
| [Corporate Actions.ipynb](<use-cases/ibor/Corporate%20Actions.ipynb>) | Equity - Handling Corporate Actions | | bonus issue, corporate actions, dividend, equity, merger, recipes, spin-off, split, valuations |
| [Creating Portfolios With Different Tax Lot Management Methods.ipynb](<use-cases/ibor/Creating%20Portfolios%20With%20Different%20Tax%20Lot%20Management%20Methods.ipynb>) | Creating portfolios with different tax lot management methods | This notebook demonstrates how to create transaction portfolios under different tax lot accounting methodologies. | accounting, holdings, taxlots, transactions |
| [Generating Corporate actions natively in LUSID.ipynb](<use-cases/ibor/Generating%20Corporate%20actions%20natively%20in%20LUSID.ipynb>) | Corporate Actions in LUSID | Demonstrates how to create and apply a corporate action to a portfolio. | corporate actions, derived portfolios, holdings, transactions |
Expand All @@ -97,6 +104,7 @@ This repository contains Jupyter notebooks that show how to use [LUSID](https://
| [Portfolio types and portfolio groups in LUSID.ipynb](<use-cases/ibor/Portfolio%20types%20and%20portfolio%20groups%20in%20LUSID.ipynb>) | Portfolios and Portfolio Groups | Demonstrates how to do various operations with portfolios and portfolio groups. | commands, corporate actions, portfolio groups, portfolios, transactions |
| [Reporting withholding tax separately for cash dividend corporate actions.ipynb](<use-cases/ibor/Reporting%20withholding%20tax%20separately%20for%20cash%20dividend%20corporate%20actions.ipynb>) | Reporting withholding tax separately for cash dividend corporate actions | | corporate actions, tax rule sets, transaction types |
| [Running a Global Fund.ipynb](<use-cases/ibor/Running%20a%20Global%20Fund.ipynb>) | Running a global fund | Demonstration of using LUSID to run funds fed from multiple source systems across multiple regions | aggregation, cocoon, cut labels, instruments, quotes, recipes, transaction configuration, transactions |
| [Upserting a Large Payload.ipynb](<use-cases/ibor/Upserting%20a%20Large%20Payload.ipynb>) | Batch upserting Holdings | Illustrates how large payload of Holdings data that exceeds API limits can be batched. | Batch Upsert, Holdings |
| [Using cut-labels to manage your business across different time-zones.ipynb](<use-cases/ibor/Using%20cut-labels%20to%20manage%20your%20business%20across%20different%20time-zones.ipynb>) | Cut Labels | Demonstrates how to use cut labels to simplify timestamps and streamline usage of LUSID when used across multiple timezones. | cut labels, holdings, instruments, transactions |

## examples/use-cases/instruments
Expand All @@ -107,6 +115,8 @@ This repository contains Jupyter notebooks that show how to use [LUSID](https://
| [Equity Option.ipynb](<use-cases/instruments/Equity%20Option.ipynb>) | Equity Option - Booking and valuing an Equity Option with physical settlement | | P&amp;L, equity option, physical settlement, recipes, valuations |
| [Equity Options - Pricing and risk using Black-Scholes.ipynb](<use-cases/instruments/Equity%20Options%20-%20Pricing%20and%20risk%20using%20Black-Scholes.ipynb>) | Equity Option - Pricing and risk | | black scholes, equity option, exposure, inline valuations, market value, option delta |
| [FX Forward.ipynb](<use-cases/instruments/FX%20Forward.ipynb>) | FX Forward - Valuation Workflow | | FX Forwards, complex market data, recipes, valuations |
| [FX Option Vanilla.ipynb](<use-cases/instruments/FX%20Option%20Vanilla.ipynb>) | Vanilla FX Options in LUSID | Modelling and valuing Vanilla FX Options. | FX Option |
| [Forward Rate Agreement.ipynb](<use-cases/instruments/Forward%20Rate%20Agreement.ipynb>) | Modelling Forward Rate Agreement in LUSID | Shows how you can model, load, and value FRAs in LUSID | A2B, Cashflows, Complex Market Data, Discounting Valuation Model, Forward Rate Agreement, Instruments |
| [Funding Leg Swap.ipynb](<use-cases/instruments/Funding%20Leg%20Swap.ipynb>) | Variable Funding Leg + Equity or Cash Instrument | Demonstrates creation and pricing of a funding leg with <br>variable notional and constructing a related position in<br>an stock or underlying instrument. This construct can be used<br>to represent the mechanics of a total return or equity swap. | aggregation, funding leg swap, instruments, market data store, quotes, results store |
| [Interest Rate Swap.ipynb](<use-cases/instruments/Interest%20Rate%20Swap.ipynb>) | Interest Rate Swap Valuation | Demonstrates pricing of an Interest Rate Swap based on a user defined Instrument. | instruments, lifecycle events, market data store, quotes, results store, valuation |
| [Simple Equity.ipynb](<use-cases/instruments/Simple%20Equity.ipynb>) | Equity - Computing P&amp;L and Handling Dividends for Equities | | P&amp;L, dividend, equity, recipes, valuations |
Expand Down Expand Up @@ -160,11 +170,14 @@ This repository contains Jupyter notebooks that show how to use [LUSID](https://
| [Futures Valuation with Differing Cost Basis Treatments (Synthetic Cash Method).ipynb](<use-cases/valuation/Futures%20Valuation%20with%20Differing%20Cost%20Basis%20Treatments%20%28Synthetic%20Cash%20Method%29.ipynb>) | Futures Valuation Workflow | | futures, recipes, transaction types, valuations |
| [Futures Valuation with Differing Cost Basis Treatments.ipynb](<use-cases/valuation/Futures%20Valuation%20with%20Differing%20Cost%20Basis%20Treatments.ipynb>) | Futures Valuation Workflow | | futures, recipes, transaction types, valuations |
| [Futures Valuation with notional cost and variation margin.ipynb](<use-cases/valuation/Futures%20Valuation%20with%20notional%20cost%20and%20variation%20margin.ipynb>) | Futures Valuation Workflow | | futures, recipes, transaction types, valuations |
| [Fx Forward Upsert &amp; Valuation.ipynb](<use-cases/valuation/Fx%20Forward%20Upsert%20%26%20Valuation.ipynb>) | FX Forward in LUSID | Modelling, upserting and valuing FX Forward in LUSID | FX Forward |
| [Inline Valuations with Inferred FX Rates.ipynb](<use-cases/valuation/Inline%20Valuations%20with%20Inferred%20FX%20Rates.ipynb>) | Valuing inline portfolio w/ inferred fx rates | | inferred fx rates, inline portfolio |
| [Look-through valuation (multi-level).ipynb](<use-cases/valuation/Look-through%20valuation%20%28multi-level%29.ipynb>) | Look-through Valuation with Multiple Levels | The following notebook details how to compute PVs across different levels of look-through for <br>both securitised funds and Index Futures | futures, instruments, recipes, securitised portfolios, transactions, valuation |
| [Look-through valuation.ipynb](<use-cases/valuation/Look-through%20valuation.ipynb>) | Portfolio look-through in LUSID | Shows how to compute the value of a child portfolio's holding as though they were directly held by the parent portfolio. | holdings, look through, portfolios, securitised portfolios, valuations |
| [SRS csv Example.ipynb](<use-cases/valuation/SRS%20csv%20Example.ipynb>) | Structured Results Store for storage of Portfolio data | | luminesce, structured_results_store, virtual_document |
| [Simple Valuation.ipynb](<use-cases/valuation/Simple%20Valuation.ipynb>) | Simple valuation with default recipes | This notebook shows how to value a portfolio using defatul recipes, for an out of the box look at positions and valuations | manifests, recipes, transactions, valuation |
| [Valuation Analysis.ipynb](<use-cases/valuation/Valuation%20Analysis.ipynb>) | Valuation Debugging | | instruments, recipes, transactions, valuation, valuation manifest |
| [Valuations with Inferred FX Rates.ipynb](<use-cases/valuation/Valuations%20with%20Inferred%20FX%20Rates.ipynb>) | Inferred FX Rates in LUSID | Valuing Portfolio in LUSID using inferred FX rates | inferred fx rates |
| [Valuations with recipes.ipynb](<use-cases/valuation/Valuations%20with%20recipes.ipynb>) | Valuation with recipes | This notebook shows how to value a portfolio using recipes with different pricing sources | manifests, recipes, transactions, valuation |

## examples/use-cases/wealth-management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
"source": [
"from lusidtools.jupyter_tools import toggle_code\n",
"\n",
"\"\"\"Loading Portfolio Level data into SRS\n",
"\n",
"Shows how you can load portfolio level valuation data into the Structured Results Store\n",
"\n",
"Attributes\n",
"----------\n",
"Structured Result Store\n",
"\"\"\"\n",
"\n",
"toggle_code(\"Toggle Docstring\")\n"
]
},
Expand Down
26 changes: 14 additions & 12 deletions examples/use-cases/data-quality-control/Custom Entities.ipynb
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using Custom Entities to track Portfolio data quality\n",
"\n",
"In this Notebook, we demonstrate how Custom Entities can be used to support Data Quality check on Portfolios.\n",
"We will create a new Custom Entity type named Portfolio_DataQuality which stores a list of attributes defining the 'Quality' of a Portfolio.\n",
"Each Portfolio will be linked ([Relationship feature](https://support.lusid.com/knowledgebase/article/KA-01679/)) to one or many Portfolio_DataQuality entities."
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -54,12 +43,25 @@
"Custom Entities\n",
"Portfolios\n",
"Data Quality\n",
"RelationShip\n",
"Relationship\n",
"\"\"\"\n",
"\n",
"toggle_code(\"Toggle Docstring\")"
]
},
{
"cell_type": "markdown",
"source": [
"# Using Custom Entities to track Portfolio data quality\n",
"\n",
"In this Notebook, we demonstrate how Custom Entities can be used to support Data Quality check on Portfolios.\n",
"We will create a new Custom Entity type named Portfolio_DataQuality which stores a list of attributes defining the 'Quality' of a Portfolio.\n",
"Each Portfolio will be linked ([Relationship feature](https://support.lusid.com/knowledgebase/article/KA-01679/)) to one or many Portfolio_DataQuality entities."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from lusidtools.jupyter_tools import toggle_code\n",
"\n",
"\"\"\"Combining instrument and holdings properties\n",
"\n",
"Attributes\n",
"----------\n",
"security master\n",
"derived properties\n",
"sub holding keys\n",
"\"\"\"\n",
"\n",
"toggle_code(\"Toggle Docstring\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
36 changes: 31 additions & 5 deletions examples/use-cases/ibor/Upserting a Large Payload.ipynb
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{
"cells": [
{
"attachments": {},
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"from lusidtools.jupyter_tools import toggle_code\n",
"\n",
"\"\"\"Batch upserting Holdings\n",
"\n",
"Illustrates how large payload of Holdings data that exceeds API limits can be batched.\n",
"\n",
"Attributes\n",
"----------\n",
"Holdings\n",
"Batch Upsert\n",
"\"\"\"\n",
"\n",
"toggle_code(\"Toggle Docstring\")"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Upserting a Large Payload of Holdings\n",
"\n",
Expand All @@ -13,12 +34,14 @@
"- 1. [Creating Sample Holdings Data](#1.-Creating-Sample-Holdings-Data)\n",
"- 2. [Dividing the Data](#2.-Dividing-the-Data)\n",
"- 3. [Upserting the Parts](#3.-Upserting-the-Parts)"
]
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -77,7 +100,10 @@
" \"LUSID API Version :\",\n",
" api_factory.build(lu.api.ApplicationMetadataApi).get_lusid_versions().build_version,\n",
")\n"
]
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
Expand Down
Loading