Introduction
Welcome to the Developer Guide for Analyze Re PRIME. This guide is intended to be the only resource developers need to reference when building applications or writing scripts that use the PRIME API.
We currently provide client libraries in Python and C#, but are looking to expand our offerings in this area. You can view code examples in the dark area to the right, and you can change the programming languages the examples are displayed in by clicking one of the tabs to the top right.
Authentication
GET / HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Host: api.analyzere.net
Accept: */*
import analyzere
analyzere.base_url = 'https://api.analyzere.net/'
analyzere.username = '<userid>'
analyzere.password = '<password>'
using AnalyzeRe;
using AnalyzeRe.Authentication;
// Set server URL and login credentials
API.ServerURL = "https://api.analyzere.net/";
BasicAuthenticationToken auth = new BasicAuthenticationToken("username", "password");
// Note: You don't have to hard-code your credentials.
// If you handle the AuthenticationRequested event, you can prompt the user as needed
API.AuthenticationRequested += (ref IAccessToken toAuth, string authType) =>
{
string username = null, password = null; // TODO: Prompt for username and password
((BasicAuthenticationToken)toAuth).GenerateAccessToken(username, password);
};
Analyze Re PRIME uses the HTTP Basic Authentication Scheme to authenticate users and authorize access to the platform. This form of authentication should only be used via HTTPS over an encrypted SSL/TLS connection. The Analyze Re PRIME API enforces HTTPS for all requests.
In order to connect to the Analyze Re PRIME server you
will need the API Base-URL (e.g. https://api.analyzere.net), a userid
and
password
.
Connection Pool
catalogs = analyzere.EventCatalog.list(search='AIR',
ordering='-created')
simulations = analyzere.Simulation.list(search='AIR',
ordering='-created')
loss_filters = analyzere.LossFilter.list(search='EQ',
ordering='-created')
fx_profiles = analyzere.ExchangeRateProfile.list(search='default',
ordering='-created')
Example debugged output
2024-03-05 14:28:39,578 DEBUG Starting new HTTPS connection (1): test-api.analyzere.net:443
2024-03-05 14:28:40,034 DEBUG https://test-api.analyzere.net:443 "GET /event_catalogs/?search=AIR&ordering=-created HTTP/1.1" 200 4424
2024-03-05 14:28:40,144 DEBUG https://test-api.analyzere.net:443 "GET /simulations/?search=AIR&ordering=-created HTTP/1.1" 200 6370
2024-03-05 14:28:40,662 DEBUG https://test-api.analyzere.net:443 "GET /loss_filters/?search=EQ&ordering=-created HTTP/1.1" 200 6779
2024-03-05 14:28:40,784 DEBUG https://test-api.analyzere.net:443 "GET /exchange_rate_profiles/?search=default&ordering=-created HTTP/1.1" 200 802
From the debugged example output above, it is evident that a new connection is established only once and then utilized for subsequent requests to the server.
The Python client (from version 0.7.0) supports session usage to reuse existing connections rather than initiating new ones for each request, leading to improved performance.
Note that no configuration changes are needed to utilize this feature as long as the analyzere
Python client is >= 0.7.0
.
Configure Connection Pool
import requests.adapters
from analyzere.requestor import session as analyzere_session
analyzere_session.mount("https://", requests.adapters.HTTPAdapter(pool_maxsize=50))
In a multi-threaded environment where concurrent requests are made from multiple threads, the maximum number of connections
to be reused can be configured by using the session
object from analyzere.requestor
and mounting it to a custom HTTPAdapter.
HTTPAdapter supports different configurations for different requests based on the target URL. For HTTPAdapter settings, refer: HTTPAdapter.
For more information on what these settings mean, refer: Customizing Pool Behaviour.
The HTTPAdapter supports pool_maxsize
parameter which is essentially the maximum number of connections to save in the pool.
The default value of pool_maxsize
is 10, which means a maximum of 10 connections will be saved in the connection pool.
This default behaviour can be changed by updating the value of the parameter to the desired number.
NOTE: It is recommended to set the value of pool_maxsize
parameter “equal to” or “greater than” the number
of threads used, in order to avoid encountering WARNING Connection pool is full, discarding connection
message.
API Conventions
At its foundation, Analyze Re PRIME is a RESTful API that uses HTTP to transfer data between the PRIME API server and a client. The PRIME API differentiates between collection objects, resource objects and embedded objects. All objects in PRIME are represented as JSON when transported over HTTP.
The PRIME API uses a type-based object model to distinguish between types of objects that are being communicated between the client and the API server.
Collections
Collections are groups of objects of a certain type. Some collections contain
polymorphic resources. Typically PRIME collections support
REST operations using the HTTP verbs POST
and GET
.
Collections:
- Event Catalogs
- Simulations
- Loss Attributes
- Loss Filters
- Exchange Rate Tables
- Exchange Rate Profiles
- Analysis Profiles
- Distributions
- Loss Sets
- Layers
- Portfolios
Resource Objects
Resource objects are types of objects that are represented as resources by the API. They can be individually saved to and loaded from the PRIME API. A resource object is always associated with a unique identifier (ID), which is determined by PRIME when the object is created. The unique identifier, typically a UUID, can be used to retrieve the object from the API and to otherwise refer to the object in another context. Resource objects are managed in collections and each base type of a resource object is associated with a unique collection.
For example, at the HTTP REST level, resource objects of type Layer
are
associated with the /layers/
collection endpoint and resource objects of type
AnalysisProfile
are associated with the /analysis_profiles/
collection
endpoint.
Embedded Objects
Embedded objects are types of objects that are embedded within the definition of other objects. Embedded objects cannot be saved to the API as stand-alone objects and must always be assigned as a value to either another embedded object or a resource object.
For example, an embedded object that captures a monetary value and its associated currency is typically a member of some other composite type.
Monetary Unit
All monetary values in the system are represented by the MonetaryUnit
embedded object. This allows information about the monetary value to be
captured to ensure proper handling of the value when currency conversions
are required.
Attribute | Required | Description |
---|---|---|
currency | yes | a valid 3-character ISO 4217 currency code (default=‘USD’) |
value | yes | the amount of money in the given currency |
value_date | no | the date to be used for currency conversion |
rate1 | no | the rate to be used for currency conversion |
rate_currency1 | no | the currency of the rate , to be used for currency conversion |
Fee Reference
Examples of fee references for premium sources:
{"ref": ["Layer", "Premium"]}
{"ref": ["Layer", "ReinstatementPremium"]}
Examples of fee references for loss sources:
{"ref": ["Layer", "Losses"]}
{"ref": ["Layer", "ReinstatementBrokerage"]}
Examples of fee references for fee sources:
{"ref": ["Layer", "Fees", "MyFixedExpense"]}
{"ref": ["Layer", "Fees", "Arbitrary Fee Name"]}
Example of fee references included in a fee:
{
"_type": "ProfitCommmission",
"name": "MyProfitCommission",
"payout_date": "2017-08-08T00:00:00Z",
"rate": 0.01,
"premiums": [
{"ref": ["Layer", "Premium"]},
{"ref": ["Layer", "ReinstatementPremium"]}
],
"losses": [
{"ref": ["Layer", "Losses"]},
{"ref": ["Layer", "ReinstatementBrokerage"]}
],
"fees": [
{"ref": ["Layer", "Fees", "MyFixedExpense"]}
{"ref": ["Layer", "Fees", "MyProportionalExpense"]}
]
}
Fee References are used to explicitly define the dependencies of a particular fee. There are three dependency categories: premiums, losses, and fees. The fee type defines which of these categories are meaningful. For instance, Fixed Expense has no dependencies, so none of these categories are meaningful. Contrastingly, all categories are meaningful for Profit Commission.
Meaningful dependency categories appear as attributes on the fee object. Each of these attributes accept a list of Fee References.
Fee References define a path from the layer to the type of resource to be considered as a source.
For fee sources, only the specific fee defined by the Fee Reference is
considered. The dependencies of the fee source are not considered. For
instance, if you have Fee B
that is dependent on Fee A
, and Fee C
that is dependent on both Fee A
and Fee B
, you must explicity include
both Fee A
and Fee B
as Fee References when defining Fee C
.
See Fees for C#/Python examples of creating Fee References.
Pagination
To get a list of layers containing only the first entry of the
layers
collection:
from analyzere import Layer
layers = Layer.list(limit=1, offset=0)
GET /layers/?limit=1&offset=0 HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<Layer> layers = API.GetResourceList<Layer>(
API.Parameters.Page(offset: 0, limit: 1)).items;
Responses include the pagination information in a
meta
section of the response:
{
"items": [],
"meta": {
"total_count": 0,
"limit": 1,
"offset": 0
}
}
Depending on the resource, a collection within PRIME can store a large number of objects and it is infeasible to return all of the stored objects to the client. Thus, the PRIME API uses pagination to limit the number of objects that are being returned in a single listing request.
PRIME resources support two query parameters that can be used independently or combined.
Parameter | Description |
---|---|
offset | (zero-based) index of the first record to return (default=0) |
limit | the number of records to return (starting at offset ) (default=100) |
When lists of resources are requested (even without specifying offset
or
limit
) the response objects includes the property meta
with the following
pagination information:
Attribute | Description |
---|---|
total_count | the total number of records in the collection |
offset | (zero-based) the index of the first record returned |
limit | the number of records returned in the response |
Batch Resource Retrieval
GET /layers/?ids=4c2608d7-6f87-4f77-b470-d65d39d1b950,c25618e5-dcb3-4592-8ece-9d7926a1f3ab HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
from analyzere import Layer
layers = Layer.list(ids='4c2608d7-6f87-4f77-b470-d65d39d1b950,c25618e5-dcb3-4592-8ece-9d7926a1f3ab')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<string> ids = new []
{
"4c2608d7-6f87-4f77-b470-d65d39d1b950",
"c25618e5-dcb3-4592-8ece-9d7926a1f3ab"
}; // Can be any list, array, or other enumerable of strings
// Retrieve a list of items using the static collection instance:
IEnumerable<Layer> layers = API.Layers.GetItems( ids );
// Alternatively, using generic type arguments, any resource type or subtype can be used:
layers = API.BatchGet<QuotaShare>( ids );
Response includes the two layers requested and pagination information in a
meta
property:
{
"items": [
{
"_type": "QuotaShare",
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
},
{
"_type": "AggregateQuotaShare",
"id": "c25618e5-dcb3-4592-8ece-9d7926a1f3ab",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
},
"aggregate_limit": {
"value": 1000000,
"currency": "USD"
}
}
],
"meta": {
"total_count": 2,
"limit": 100,
"offset": 0
}
}
Multiple specific resources may be retrieved in a single listing request by specifying a list of UUIDs for the resources to be retrieved. This request is more similar to a search than a GET request. If the provided list contains UUIDs that do not exist, the returned list will simply not contain resources corresponding to those UUIDs. No error will be raised.
Batch requests only support up to 100 UUIDs.
Parameter | Description |
---|---|
ids | a list of UUIDs for the resources to be retrieved |
The response object includes the same meta
property described in
Pagination.
Errors
At the HTTP level, there are a few errors that can be returned by the API. Client modules (Python and C#) typically abstract these HTTP level error codes to more meaningful error objects.
HTTP Status Code | Description |
---|---|
503 | For long-running operations, the Retry-After header will indicate when the resource is expected to be available. |
Polymorphism
Some types of resource objects have polymorphic properties and in fact are
represented by different types which share a common interface. Polymorphic
objects can be recognized by their _type
attribute which indicates the
specific specialized type of the object.
The Layer
resource basic type, for example, has a number of sub-types which
are used to represent different types of contractual structures such as CatXL
for Excess of Loss structures or QuotaShare
for Quota Share structures.
References
Response containing references:
{
"_type": "AndFilter",
"id": "cc97fdcf-9132-4fe0-969f-12d833d869d3",
"name": "North America",
"description": "North American All Peril",
"invert": false,
"expressions": [
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/de265859-4a91-4a2f-b63f-e493e3e4046e",
"ref_id": "de265859-4a91-4a2f-b63f-e493e3e4046e"
},
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/a3a502c6-6a83-460e-9bf6-a80dc20d221e",
"ref_id": "a3a502c6-6a83-460e-9bf6-a80dc20d221e"
}
]
}
References are a construct used by the PRIME API to “link” objects together without the need of creating multiple copies of one object. References are only supported for resource objects which can be uniquely identified using their basis type and ID. The representation of a reference consists of the type of object it refers to and the object’s unique identifier. However, most client-side bindings that utilize the PRIME API abstract the concept of a reference from the user and either eagerly or lazily fetch referenced objects automatically.
When references are included in a response, an additional href
attribute is
included as part of every reference object. The href
URL takes you directly
to the referenced resource.
Expanding References
Request with server-side expansion of references:
GET /loss_filters/cc97fdcf-9132-4fe0-969f-12d833d869d3 HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
References: expand
Response with references expanded:
{
"_type": "AndFilter",
"id": "cc97fdcf-9132-4fe0-969f-12d833d869d3",
"name": "North America",
"description": "North American All Peril",
"invert": false,
"expressions": [
{
"_type": "AnyOfFilter",
"id": "de265859-4a91-4a2f-b63f-e493e3e4046e",
"name": "NA",
"description": "North America",
"invert": false,
"attribute": "Region",
"values": [
"US"
]
},
{
"_type": "AnyFilter",
"id": "a3a502c6-6a83-460e-9bf6-a80dc20d221e",
"name": "All Perils",
"description": "All Perils",
"invert": false
}
]
}
References can be resolved automatically in responses by including the
References: expand
HTTP header.
Filtering on Metadata Fields
The API supports a query language for filtering against keys and values with matching and logical operators.
A query string can be added to your GET requests via the metaquery
GET parameter to send a field filtering request to the server. If the
endpoint supports data filtering, the results will be taken from a
filtered subset of the endpoint’s data.
Currently, field filtering exclusively targets the meta_data
field.
Supported Operations and Example Queries
Given a set of key
and value
pairs by which you’d like to
filter, you can submit the following sample queries as the content of
the 'metaquery’ GET parameter. (e.g. ?metaquery=<query>
)
exact match
meta_data[key]="value"
meta_data[key]!="value"
substring match
meta_data[key]~"value"
(“contains”)
comparison match (lexicographic or numeric)
If quoted, value
will be compared lexicographically. If not quoted,
the query engine will attempt to convert value
to a number and
perform numerical comparison.
meta_data[key]<"value"
meta_data[key]>"value"
meta_data[key]<="value"
meta_data[key]>="value"
logical operators
Queries against keys and values may be logically combined using AND, OR and NOT.
NOT meta_data[key]="value"
meta_data[key1]="value1" AND meta_data[key2]="value2"
meta_data[key1]="value1" OR NOT meta_data[key2]="value2" AND meta_data[key3]="value3"
grouping via parentheses
Parentheses change the order of logical evaluation in the query.
meta_data[key]="value" AND (meta_data[key2]="value2" OR meta_data[key3]="value3")
filtering by key presence
meta_data[key]
meta_data[key1] AND meta_data[key2]
case sensitivity
By default, queries are case insensitive. Any value may be prefixed with the symbol
@CASE_SENSITIVE@
to activate case sensitivity. e.g.
meta_data[key]="@CASE_SENSITIVE@value"
quoting keys and values
Keys and values need not be double-quoted. However, unquoted keys and values may not contain certain characters including but not limited to whitespace. Surround keys and values with double-quotation marks for safety. See right for the full list of characters disallowed in unquoted keys/values.
Core Syntax of a Field Filtering Query:
{field}[{key}]{op}{value}
{field}
must be the string “meta_data”.
{key}
must be a string, representing a key in your field.
{op}
is an operator from the following list: "!=", "<=", ">=", ">", "<", "=", "~"
{value}
is an integer, real number or string representing a value in your field.
Furthermore, query elements may be combined using parentheses and logical operators which include:
"(", ")", AND, OR, NOT
Unquoted keys and values may not contain the following tokens:
whitespace "AND" "NOT" "OR" "__" ! " [ ] ( ) = ~ < >
Quoted keys and values may contain any character except unescaped quotes. Quotes may be escaped by repetition. e.g. a query for a value containing double-quotes:
meta_data[key]="The question was ""to be or not to be""."
or a query with a key containing quotes
meta_data["key_with_""quoted portion"""]=value
Resources/Objects
The PRIME platform forms the basis for Analyze Re’s advanced solutions to strategic planning, pricing, and portfolio analytics. In order to support this, the PRIME API exposes a number of concepts and functions that allow the user to control the the platform and perform varying types of analyses.
Event Catalogs
Event Catalogs are a concept used in PRIME to describe stochastic event sets. They represent a mapping of stochastic events to meta-information about that event, such as peril type, vendor model, magnitude, etc. PRIME users can also construct their own event catalogs which may be combinations of event sets from multiple vendors. Event catalogs may contain arbitrary meta fields, which can be used for filtering.
Event Catalog data is provided to PRIME as a CSV file. In order to upload an Event Catalog to the PRIME server the CSV file must contain two mandatory columns: “Rate” and “EventId”. Additional columns in the CSV file will be collected as Loss Attributes. The event attributes collected as Loss Attributes will be available for building Loss Filters.
An example of a (blended RMS + AIR) Event Catalog might look like:
EventId | Peril | Region | Rate | Vendor |
---|---|---|---|---|
101217 | “EQ” | “CA” | 0.00182766850727944 | RMS |
101218 | “EQ” | “CA” | 0.00318487802791267 | RMS |
101219 | “EQ” | “CA” | 0.00869657632513287 | RMS |
101220 | “EQ” | “CA” | 0.0235000702667579 | RMS |
340001 | “HU” | “US” | 0.00001 | AIR |
340002 | “HU” | “US” | 0.00001 | AIR |
340003 | “HU” | “US” | 0.00001 | AIR |
340004 | “HU” | “US” | 0.00001 | AIR |
340005 | “HU” | “US” | 0.00001 | AIR |
Event Catalogs form one of the key ingredients in performing simulation analysis of Layers and Portfolios.
Definition
{
"id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
"description": "Combined RMS + AIR Catalog Jan 2015",
"tags": ["2015", "Version 12"],
"source": "Combined RMS + AIR catalog"
}
Event Catalogs in PRIME are composed of two data sets. The first data set is an
object created within the /event_catalogs/
collection, which holds the unique
ID of the catalog as well as additional meta data. The second data set is
the list of events in CSV format as described above.
The Event Catalog object is defined as follows:
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
description | string | a short description of the Event Catalog |
meta_data | dictionary | any custom metadata - can be used when searching for catalogs. |
source | string | (optional) the source (typically Vendor model) of the events |
tags | list(strings) | (optional) a list of string tags that can be associated with the catalog |
Create an Event Catalog
POST /event_catalogs/ HTTP/1.1
Host: api.analyzere.net
Content-Type: application/json
{
"description": "Combined RMS + AIR Catalog Jan 2015",
"tags": ["2015", "Version 12"],
"source": "Combined RMS + AIR catalog"
}
from analyzere import EventCatalog
# Create the Catalog
catalog = EventCatalog(description='Combined RMS + AIR Catalog Jan 2015',
tags=['2015', 'Version 12'],
source='Combined RMS + AIR catalog').save()
# Upload Catalog data
with open('files/catalogs/RMS+AIR_Catalog-2015.csv', 'rb') as catalog_data:
catalog.upload_data(catalog_data)
// 1. Create the catalog definition
EventCatalog catalog = new EventCatalog
{
description = "AIR v17 2019",
meta_data = new Dictionary<string, object>
{
{ "Vendor", "AIR" },
{ "ModelVersion", 17 },
}
}.Post();
// 2. Upload Catalog data
// 2 a) You can upload from a string
catalog.data.UploadString("Event,Rate,Peril,ModelId\n27000001,0.00001,HU,27");
// 2 b) You can upload from a file path
catalog.data.LargeFileUpload("C:/files/catalogs/AIR_Catalog_2019.csv");
// 2 c) You can stream data from a file, database, or other source
catalog.data.LargeStreamUpload(someExternalStream);
// See https://docs.analyzere.net/csharp/d6/d4b/classAnalyzeRe_1_1LargeDataUpload__ExtensionMethods.html for more details.
Example response body
{
"id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
"created": "2018-08-21T17:49:07.833485Z",
"modified": "2018-08-21T17:49:07.899960Z",
"data": {
"href": "https://api.analyzere.net/78094fad-af1f-43de-b12b-f9ddd0b43259",
"ref_id": "78094fad-af1f-43de-b12b-f9ddd0b43259"
},
"source": "Combined RMS + AIR catalog",
"status": "processing_succeeded",
"status_message": null,
"tags": ["2015", "Version 12"],
"meta_data": {},
"description": "Combined RMS + AIR Catalog Jan 2015"
}
In order to create an Event Catalog on the PRIME platform, you must first create a new Event Catalog object and then upload the event list associated with that catalog in CSV format.
Arguments
Name | Traits | Description |
---|---|---|
name | required | |
description | required | |
source | required | |
tags | required | The list is required but can be an empty list. |
Retrieve an Event Catalog
GET /event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051 HTTP/1.1
Host: api.analyzere.net
from analyzere import EventCatalog
catalog = EventCatalog.retrieve('fb5257d4-a9e8-4539-b305-dd4f33b10051')
using AnalyzeRe;
EventCatalog catalog = API.Get<EventCatalog>("fb5257d4-a9e8-4539-b305-dd4f33b10051");
Example response body
{
"id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
"created": "2018-08-21T17:49:07.833485Z",
"modified": "2018-08-21T17:49:07.899960Z",
"data": {
"href": "https://api.analyzere.net/78094fad-af1f-43de-b12b-f9ddd0b43259",
"ref_id": "78094fad-af1f-43de-b12b-f9ddd0b43259"
},
"source": "Combined RMS + AIR catalog",
"status": "processing_succeeded",
"status_message": null,
"tags": ["2015", "Version 12"],
"meta_data": {},
"description": "Combined RMS + AIR Catalog Jan 2015"
}
Event Catalogs are retrieved by ID.
Retrieve an Event Catalog Profile
from analyzere import EventCatalog
catalog = EventCatalog.retrieve('fb5257d4-a9e8-4539-b305-dd4f33b10051')
catalog.profile()
GET /event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051/profile HTTP/1.1
Host: api.analyzere.net
Example response body
{
"attributes": [
{
"_type": "str",
"name": "Peril",
"values": [
"TH",
"EQ"
]
},
{
"_type": "str",
"name": "Region",
"values": [
"US",
"EU"
]
}
]
}
The profile provides extra metadata information collected from the csv file at upload time. Each attribute, if it is of type string, provides the list of unique values for that column ordered by most common to least common.
Download Event Catalog Data
GET /event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051/data HTTP/1.1
Host: api.analyzere.net
from analyzere import EventCatalog
catalog = EventCatalog.retrieve('fb5257d4-a9e8-4539-b305-dd4f33b10051')
csv = catalog.download_data()
using AnalyzeRe;
EventCatalog catalog = API.Get<EventCatalog>("fb5257d4-a9e8-4539-b305-dd4f33b10051");
string csv = catalog.data.Get();
Example response body
"EventId","PerilCode","RegionCode","Rate","Vendor"
101217,"EQ","CA",0.00182766850727944,RMS
101218,"EQ","CA",0.00318487802791267,RMS
101219,"EQ","CA",0.00869657632513287,RMS
101220,"EQ","CA",0.0235000702667579,RMS
101221,"HU","US",0.00001,AIR
101222,"HU","US",0.00001,AIR
101223,"HU","US",0.00001,AIR
101224,"HU","US",0.00001,AIR
101225,"HU","US",0.00001,AIR
...
You can retrieve the original CSV data associated with an Event Catalog by asking for the CSV data.
List Event Catalogs
GET /event_catalogs/?search=RMS&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import EventCatalog
catalogs = EventCatalog.list(search='RMS',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<EventCatalog> eventCatalogs = API.SearchResourceList<EventCatalog>(
"RMS", API.Parameters.Order("-created")).items;
Example response body
{
"items": [
{
"id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
"created": "2018-08-21T17:49:07.833485Z",
"modified": "2018-08-21T17:49:07.899960Z",
"data": {
"href": "https://api.analyzere.net/78094fad-af1f-43de-b12b-f9ddd0b43259",
"ref_id": "78094fad-af1f-43de-b12b-f9ddd0b43259"
},
"source": "Combined RMS + AIR catalog",
"status": "processing_succeeded",
"status_message": null,
"tags": ["2015", "Version 12"],
"meta_data": {},
"description": "Combined RMS + AIR Catalog Jan 2015"
},
{
"id": "939c12be-7fd5-4b0e-b601-aaa9597325cc",
"created": "2017-07-17T13:16:24.559432Z",
"modified": "2017-11-01T16:45:58.700242Z",
"data": {
"href": "https://api.analyzere.net/files/94b7846a-b8d8-433b-86d3-8d653a48601b",
"ref_id": "94b7846a-b8d8-433b-86d3-8d653a48601b"
},
"source": "RMS",
"status": "processing_succeeded",
"status_message": null,
"tags": ["2012", "Version 10"],
"meta_data": {},
"description": "RMS Catalog"
},
],
"meta": {
"total_count": 2,
"limit": 100,
"offset": 0
}
}
Event Catalogs are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Event Catalogs to return (default 100) |
offset | optional | the number of Event Catalogs to skip before returning the limit |
fields | optional | a list of the Event Catalog fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Event Catalog fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Event Catalogs to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Event Catalogs by description (case-insensitive substring match) |
description | optional | filters the list of Event Catalogs by description (case-sensitive exact match) |
status | optional | filters the list of Event Catalogs by status (case-sensitive exact match) |
ordering | optional | orders the list of Event Catalogs |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
status
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Simulations
Simulations are a concept used in PRIME to describe a set of possible realizations of next year as described by a sequence of events. The events that appear in the trials (years) of a Simulation must reference events from an Event Catalog.
Simulations in PRIME support model blending, by allowing trials to contain events from multiple sources (RMS, AIR, EQE, etc).
The data that defines a Simulation is typically stored and uploaded to the PRIME server via a csv file. An example of a Simulation definition:
Trial | Day | Event | Quantile |
---|---|---|---|
1 | 1.23 | 100 | 0.4 |
1 | 14.34 | 200 | 0.3 |
1 | 16.45 | 300 | 0.3 |
1 | 32.14 | 400 | 0.4 |
1 | 32.98 | 500 | 0.3 |
… | … | … | … |
10000 | 345.34 | 100 | 0.5 |
10000 | 355.44 | 400 | 0.3 |
10000 | 361.41 | 200 | 0.3 |
10000 | 364.87 | 300 | 0.3 |
Simulation files can be sparse, meaning they do not have to have rows for every trial. Trials that do not have any rows will be treated as empty trials.
Sequence
The sequence
or day
of an event occurrence in a
simulation is a time-offset in fractional days from the
start_date
of the simulation. It can only be considered a
“sequence” if the absolute temporal properties of the occurrence are not
relevant for the analysis. However, as soon as layer inception or expiry,
or reporting period are used for analysis the sequence
or
day
column should be strictly considered time-offsets from
the start_date
.
Sequence Numbering
The sequence numbering begins at 0
by default, which means an occurrence with a
day
value of 0.0
will occur at the
start_date
of the simulation (typically January 1st midnight
UTC of some year). Likewise, an occurrence with a day
of
1.0
or greater will occur one or more days after the
start_date
of the simulation (e.g. January 2nd midnight UTC).
Sequence Adjustment
If your sequence numbering begins at 1
instead of 0
, (starting at a sequence
or day
value of
1.0
, instead of 0.0
), use one of the following options when uploading the simulation data:
Option 1 (recommended)
Set the one_based_sequencing
flag to true
to adjust the sequence numbering.
Option 2 (legacy)
Offset the simulation start_date
by -1
day to correctly model the actual real time. For example, if the original
start_date
of a simulation is January 1st midnight UTC
of some year, but the sequence in the simulation considers January 1st
midnight UTC to be day 1
, then the start_date
of the simulation must be corrected by an offset of -1
day
to December 31st midnight UTC of the previous year.
Leap year adjustment
Set the adjust_leap_years
flag to true
when uploading the simulation data.
Feb 29th of each leap year will be skipped by shifting sequence values on or after Feb 29th one day forward, and there will be no difference between the leap year and common year simulations.
Definition
Static Simulation
{
"id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"_type": "StaticSimulation",
"created": "2022-08-16T16:42:27.990370Z",
"modified": "2022-08-16T16:42:30.579629Z",
"name": "RMS Simulation 100000 Trials",
"data": {
"href": "https://api.analyzere.net/files/7bd1f290-1986-433d-99c8-e37c1196d206",
"ref_id": "7bd1f290-1986-433d-99c8-e37c1196d206"
},
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"meta_data": {},
"notes": {},
"start_date": "2022-01-01T00:00:00Z",
"status": "processing_succeeded",
"status_message": null,
"trial_count": 100000,
"description": "RMS Simulation 100000 Trials",
"one_based_sequencing": "false",
"adjust_leap_years": "false"
}
A Static Simulation is user-managed: users control the set of trials and corresponding event sequences.
Attributes
Name | Type | Description |
---|---|---|
id | string | A server-generated UUID. |
_type | Type | StaticSimulation |
name | string | The name of the Simulation. |
description | string | A short description of the Simulation. |
event_catalogs1 | References (EventCatalog) | The Event Catalogs that are part of the Simulation. |
trial_count2 | int | The number of trials in the Simulation. |
notes | string | Any notes that should be associated with the Simulation. |
one_based_sequencing | bool | Default value is false. Set this flag to true if your loss sequence values begin at 1 (rather than 0), where 1 represents the beginning of the trial/year. |
adjust_leap_years | bool | Default value is false. Set this flag to true if your loss sequence values do not account for leap years. |
Create a Simulation
Static Simulation
POST /simulations/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "StaticSimulation",
"name": "RMS Simulation 100000 Trials",
"description": "RMS Simulation 100000 Trials",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"start_date": "2022-01-01T00:00:00Z",
"trial_count": 100000,
"one_based_sequencing": "false",
"adjust_leap_years": "false"
}
from analyzere import EventCatalog, Simulation
from datetime import datetime, timezone
import pytz
# Get the Event Catalog to associate with the Simulation
catalog = EventCatalog.retrieve('fb5257d4-a9e8-4539-b305-dd4f33b10051')
simulation = Simulation(name='Combined ARE + AIR Simulation',
description='RMS 12 + AIR 3.0 Simulations',
event_catalogs=[catalog],
start_date=datetime(2022, 1, 1, tzinfo=pytz.utc),
trial_count=10000).save()
# upload Simulation data from csv file
with open('files/simulations/RMS+AIR-Simgrid.csv') as simulation_data:
simulation.upload_data(simulation_data)
using AnalyzeRe;
// Get the Event Catalog to associate with the Simulation
EventCatalog catalog = API.Get<EventCatalog>("fb5257d4-a9e8-4539-b305-dd4f33b10051");
// Create the a new StaticSimulation
StaticSimulation static_simulation = new StaticSimulation();
static_simulation.name = "Combined ARE + AIR Simulation";
static_simulation.description = "RMS 12 + AIR 3.0 Simulations";
static_simulation.event_catalogs.Add(catalog.ToReference());
static_simulation.trial_count = 10000;
static_simulation = static_simulation.Save();
// upload Simulation data from CSV file
static_simulation.data.LargeFileUpload("files/simulations/RMS+AIR-Simgrid.csv");
Response Body:
{
"id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"_type": "StaticSimulation",
"created": "2022-08-16T16:42:27.990370Z",
"modified": "2022-08-16T16:42:30.579629Z",
"name": "RMS Simulation 100000 Trials",
"data": {
"href": "https://api.analyzere.net/files/7bd1f290-1986-433d-99c8-e37c1196d206",
"ref_id": "7bd1f290-1986-433d-99c8-e37c1196d206"
},
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"meta_data": {},
"notes": {},
"start_date": "2022-01-01T00:00:00Z",
"status": "processing_succeeded",
"status_message": null,
"trial_count": 100000,
"one_based_sequencing": false,
"adjust_leap_years": false,
"description": "RMS Simulation 100000 Trials"
}
Arguments
Name | Traits | Description |
---|---|---|
_type | required | StaticSimulation |
name | required | |
description | required | |
event_catalogs | required | |
trial_count | required | |
notes | optional | |
one_based_sequencing | optional | |
adjust_leap_years | optional |
Retrieve a Simulation
GET /simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa HTTP/1.1
Host: api.analyzere.net
from analyzere import Simulation
# The base Simulation class can be used here
simulation = Simulation.retrieve('c8918b81-6d4e-41b8-8594-e5d4c765b4fa')
using AnalyzeRe;
StaticSimulation simulation = API.Get<StaticSimulation>("c8918b81-6d4e-41b8-8594-e5d4c765b4fa");
Response Body
{
"id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"_type": "StaticSimulation",
"created": "2022-08-16T16:42:27.990370Z",
"modified": "2022-08-16T16:42:30.579629Z",
"name": "RMS Simulation 100000 Trials",
"data": {
"href": "https://api.analyzere.net/files/7bd1f290-1986-433d-99c8-e37c1196d206",
"ref_id": "7bd1f290-1986-433d-99c8-e37c1196d206"
},
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"meta_data": {},
"notes": {},
"start_date": "2022-01-01T00:00:00Z",
"status": "processing_succeeded",
"status_message": null,
"trial_count": 100000,
"one_based_sequencing": false,
"adjust_leap_years": false,
"description": "RMS Simulation 100000 Trials"
}
Simulations are retrieved by ID.
Arguments
Name | Traits | Description |
---|---|---|
id | required |
List Simulations
GET /simulations?search=RMS&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import Simulation
simulations = Simulation.list(search='RMS',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<Simulation> simulations = API.SearchResourceList<Simulation>(
"RMS", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"_type": "StaticSimulation",
"created": "2022-08-16T16:42:27.990370Z",
"modified": "2022-08-16T16:42:30.579629Z",
"name": "RMS Simulation 100000 Trials",
"data": {
"href": "https://api.analyzere.net/files/7bd1f290-1986-433d-99c8-e37c1196d206",
"ref_id": "7bd1f290-1986-433d-99c8-e37c1196d206"
},
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"meta_data": {},
"notes": {},
"start_date": "2022-01-01T00:00:00Z",
"status": "processing_succeeded",
"status_message": null,
"trial_count": 100000,
"one_based_sequencing": false,
"adjust_leap_years": false,
"description": "RMS Simulation 100000 Trials"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Simulations of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Simulations to return (default 100) |
offset | optional | the number of Simulations to skip before returning the limit |
fields | optional | a list of the Simulation fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Simulation fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Simulations to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Simulations by name (case-insensitive substring match) |
name | optional | filters the list of Simulations by name (case-sensitive exact match) |
trial_count | optional | filters the list of Simulations by trial_count (exact match) |
status | optional | filters the list of Simulations by status (case-sensitive exact match) |
ordering | optional | orders the list of Simulations |
ordering
accepts the following values (case-sensitive):
id
created
modified
name
trial_count
status
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. name,-created
will sort results by name
in ascending order
and then sort by created
in descending order (for duplicate names).
Loss Filters
Loss Filters are used to specify the grouping of losses by event attribute, for the purpose of viewing loss output.
Loss Filters can be defined against any of the Loss Attributes.
The PRIME platform supports the following types of Loss Filters:
- Any Filter
- Any Of Filter
- Record Type Any Of Filter
- Less Than Filter
- Greater Than Filter
- Range Filter
- And Filter
- Or Filter
Record Types
Every occurrence in a YELT has an associated RecordType
categorizing its record type.
Use Record Type Any Of Filters to filter losses by their types.
Currently supported record types:
Loss
FixedExpense
ProportionalExpense
ProfitCommission
Definition
Any Filter
{
"id": "855e80b0-d19c-11e4-ace7-9fc9f67fd390",
"_type": "AnyFilter",
"name": "WW_AP",
"description": "Match Everything"
}
Special filter that matches every Event. This filter will match Events from all sources, including Parametric LossSets.
Any Of Filter
{
"id": "855ed42a-d19c-11e4-acf3-67b062f6b3b7",
"_type": "AnyOfFilter",
"name": "WS",
"description": "Windstorm",
"attribute": "Peril",
"values": ["HU", "CY", "TY"],
"invert": false
}
Filter used to match values using a “contains” operation. Event attribute must have an exact match for the values.
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | AnyOfFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
attribute | string | the name of the Event attribute to match on |
values | list(string or number) | the set of values that should be matched (exact match) |
Record Type Any Of Filter
{
"id": "855ed42a-d19c-11e4-acf3-4b2eb6f6b716",
"_type": "RecordTypeAnyOfFilter",
"name": "PC",
"description": "Profit Commission",
"values": ["ProfitCommission"],
"invert": false
}
Filter used to match occurrences based on specified record types. See Record Types for a list of supported record types.
Each string in values
must match a supported record type exactly.
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | RecordTypeAnyOfFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
values | list(string) (choices) | the set of values that should be matched (exact match) |
Less Than Filter
{
"id": "855f0b34-d19c-11e4-a341-9f79de8aac82",
"_type": "LTFilter",
"name": "Small-EQ",
"description": "Small Earthquakes",
"attribute": "Magnitude",
"value": 6.0,
"inclusive": true
}
Filter used to match Events with attribute values that are less-than the specified value
. The optional inclusive
flag allows uses to switch between <
and <=
(inclusive==true).
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | AnyOfFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
attribute | string | the name of the Event attribute to match on |
value | string or number | the value that of the Event attribute is compared against |
inclusive | bool | boolean flag that indicates < v.s. <= (default=false) |
Greater Than Filter
{
"id": "855f416c-d19c-11e4-adb6-af2bd5dc69b4",
"_type": "GTFilter",
"created": "2018-07-31T23:08:07.632210Z",
"modified": "2018-07-31T23:08:07.632210Z",
"name": "Large-EQ",
"invert": false,
"attribute": "Magnitude",
"value": 8.5,
"inclusive": true,
"meta_data": {},
"description": "Large Earthquakes"
}
Filter used to match Events with attribute values that are greater-than the specified value
. The optional inclusive
flag allows uses to switch between >
and >=
(inclusive==true).
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | AnyOfFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
attribute | string | the name of the Event attribute to match on |
value | number | the value that of the Event attribute is compared against |
inclusive | bool | boolean flag that indicates > v.s. >= ( default=false) |
Range Filter
{
"id": "855f7420-d19c-11e4-95fe-4b2eb6de13e2",
"_type": "RangeFilter",
"name": "Med-EQ",
"description": "Medium Earthquakes",
"attribute": "Magnitude",
"begin_value": 6.0,
"begin_inclusive": false,
"end_value": 8.5
}
Filter used to match Events with attribute values that are within the specified range
of values. The begin
and end
values of the range can be flagged separately to indicate inclusiveness (i.e. [1,10]
(begin + end are inclusive), versus [1,10)
(begin is inclusive, end is exclusive))
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | RangeFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
attribute | string | the name of the Event attribute to match on |
begin_value | number | the value that marks the beginning of the range of values to match |
begin_inclusive | bool | flag that indicates ( == exclusive v.s. [ == inclusive (default=true)* |
end_value | number | the value that marks the end of the range of values to match |
end_inclusive | bool | flag that indicates ) == exclusive v.s. ] == inclusive (default=false)* |
And Filter
{
"id": "855fa512-d19c-11e4-a683-cfc2f4cc4716",
"_type": "AndFilter",
"name": "US-HU",
"description": "US Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "e1957ab6-ac41-4bd5-b46e-a334aee658e8",
"href_id": "http://api.analyzere.net/loss_filters/e1957ab6-ac41-4bd5-b46e-a334aee658e8"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b",
"href_id": "http://api.analyzere.net/loss_filters/c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b"
},
]
}
Used to join (AND) filters together. Typically a number of constituent Loss Filters are created, then combined using either the AndFilter
of the OrFilter
.
Attributes
Attribute | Type | Decription |
---|---|---|
id | string | a server-generated UUID |
_type | Type | AnyOfFilter |
name | string | a human readable “short” identifier for the filter |
description | string | a human readable description of the purpose of the filter |
invert | bool | flag that indicates that behaviour of the filter should be inverted |
attribute | string | the name of the Event attribute to match on |
expressions | List(Filters) | a list of Filters to be combined using the AND operator |
Or Filter
{
"id": "bbe2797a-d19c-11e4-b3f2-ffb232df5532",
"_type": "OrFilter",
"name": "US | HU",
"description": "US -or- Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "83a15a5a-c65b-11e4-b2e0-00219b17747b",
"href_id": "http://api.analyzere.net/loss_filters/83a15a5a-c65b-11e4-b2e0-00219b17747b"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "96596660-c65b-11e4-b002-53e20651f4c8",
"href_id": "http://api.analyzere.net/loss_filters/96596660-c65b-11e4-b002-53e20651f4c8"
},
]
}
Used to join (OR) filters together. Typically a number of constituent Loss Filters are created, then combined using either the AndFilter
of the OrFilter
.
Attribute | decription |
---|---|
expressions | a list of Filters to be combined using the OR operator |
Create
Any Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyFilter",
"name": "WW_AP",
"description": "Match Everything"
}
from analyzere import LossFilter
any_filter = LossFilter(type='AnyFilter',
name='WW_AP',
description='Match Everything').save()
using AnalyzeRe.LossFilters;
any_filter = new AnyFilter();
any_filter.name = "WW_AP";
any_filter.description = "Match Everything";
any_filter = any_filter.Save();
Response Body:
{
"id": "855e80b0-d19c-11e4-ace7-9fc9f67fd390",
"_type": "AnyFilter",
"name": "WW_AP",
"description": "Match Everything"
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | AnyFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
attribute | required |
Any Of Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyOfFilter",
"name": "WS",
"description": "Windstorm",
"attribute": "Peril",
"values": ["HU", "CY", "TY"],
}
from analyzere import LossFilter
any_of_filter = LossFilter(type='AnyOfFilter',
name='WS',
description='Windstorm',
attribute='Peril',
values=['HU', 'CY', 'TY']).save()
using AnalyzeRe.LossFilters;
any_of_filter = new AnyOfFilter();
any_of_filter.name = "WS";
any_of_filter.description = "Windstorm";
any_of_filter.attribute = "Peril";
any_of_filter.values.AddRange(new string[]{ "HU", "CY", "TY" });
any_of_filter = any_of_filter.Save();
Response Body:
{
"id": "855ed42a-d19c-11e4-acf3-67b062f6b3b7",
"_type": "AnyOfFilter",
"name": "WS",
"description": "Windstorm",
"attribute": "Peril",
"values": ["HU", "CY", "TY"],
"invert": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | AnyOfFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
attribute | required | |
values | required |
Record Type Any Of Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "RecordTypeAnyOfFilter",
"name": "PC",
"description": "Profit Commission",
"values": ["ProfitCommission"],
}
from analyzere import LossFilter
record_type_any_of_filter = LossFilter(type='RecordTypeAnyOfFilter',
name='PC',
description='Profit Commission',
values=['ProfitCommission']).save()
using AnalyzeRe;
using AnalyzeRe.LossFilters;
RecordTypeAnyOfFilter record_type_filter = new RecordTypeAnyOfFilter();
record_type_filter.name = "Loss Filter";
record_type_filter.description = "Filters out Fees";
record_type_filter.values.AddRange(new RecordType[]{ RecordType.Loss });
record_type_filter = any_of_filter.Save();
Response Body:
{
"id": "855ed42a-d19c-11e4-acf3-4b2eb6f6b716",
"_type": "RecordTypeAnyOfFilter",
"name": "PC",
"description": "Profit Commission",
"values": ["ProfitCommission"],
"invert": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | RecordTypeAnyOfFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
values | required |
Less Than Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "LTFilter",
"name": "Small-EQ",
"description": "Small Earthquakes",
"attribute": "Magnitude",
"value": 6.0,
"inclusive": true
}
from analyzere import LossFilter
small_quake_filter = LossFilter(type='LTFilter',
name='Small Earthquake',
description='Small Earthquakes',
attribute='Magnitude',
value=6.0,
inclusive=True).save()
using AnalyzeRe.LossFilters;
small_quake_filter = new LTFilter();
small_quake_filter.name = "Small-EQ";
small_quake_filter.description = "Small Earthquakes";
small_quake_filter.attribute = "Magnitude";
small_quake_filter.value = 6.0;
small_quake_filter = small_quake_filter.Save();
Response Body:
{
"id": "855f0b34-d19c-11e4-a341-9f79de8aac82",
"_type": "LTFilter",
"name": "Small-EQ",
"description": "Small Earthquakes",
"attribute": "Magnitude",
"value": 6.0,
"inclusive": true
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | LTFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
attribute | required | |
value | requried | |
inclusive | optional | (default=false) |
Greater Than Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "GTFilter",
"name": "Large-EQ",
"description": "Large Earthquakes",
"attribute": "Magnitude",
"value": 8.5,
"inclusive": true
}
from analyzere import LossFilter
big_quake_filter = LossFilter(type='GTFilter',
name='BIG Earthquake',
description='Big Earthquakes',
attribute='Magnitude',
value=8.5,
inclusive=True).save()
using AnalyzeRe.LossFilters;
big_quake_filter = new GTFilter();
big_quake_filter.name = "Large-EQ";
big_quake_filter.description = "Large Earthquakes";
big_quake_filter.attribute = "Magnitude";
big_quake_filter.value = 8.5;
big_quake_filter.inclusive = true;
big_quake_filter = big_quake_filter.Save();
Response Body:
{
"id": "855f416c-d19c-11e4-adb6-af2bd5dc69b4",
"_type": "GTFilter",
"created": "2018-07-31T23:08:07.632210Z",
"modified": "2018-07-31T23:08:07.632210Z",
"name": "Large-EQ",
"invert": false,
"attribute": "Magnitude",
"value": 8.5,
"inclusive": true,
"meta_data": {},
"description": "Large Earthquakes"
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | GTFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
attribute | required | |
value | requried | |
inclusive | optional | (default=false) |
Range Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
{
"_type": "RangeFilter",
"name": "Med-EQ",
"description": "Medium Earthquakes",
"attribute": "Magnitude",
"begin_value": 6.0,
"begin_inclusive": false,
"end_value": 8.5
}
from analyzere import LossFilter
range_filter = LossFilter(type='RangeFilter',
name='Med EQ',
description='Medium sized Earthquakes',
invert=False,
attribute='Magnitude',
begin_value=6.0,
begin_inclusive=False,
end_value=8.5,
end_inclusive=False).save()
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
range_filter = api.save(range_filter)
using AnalyzeRe.LossFilters;
range_filter = new RangeFilter();
range_filter.name = "Med-EQ";
range_filter.description = "Medium Earthquakes";
range_filter.attribute = "Magnitude";
range_filter.begin_value = 6.0;
range_filter.begin_inclusive = false;
range_filter.end_value = 8.5;
range_filter.end_inclusive = false;
range_filter = range_filter.Save();
Response Body:
{
"id": "855f7420-d19c-11e4-95fe-4b2eb6de13e2",
"_type": "RangeFilter",
"name": "Med-EQ",
"description": "Medium Earthquakes",
"attribute": "Magnitude",
"invert": false,
"begin_value": 6.0,
"begin_inclusive": false,
"end_value": 8.5,
"end_inclusive": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | RangeFilter |
name | required | |
description | required | |
invert | optional | (default=false) |
attribute | required | |
begin_value | required | |
begin_inclusive | optional | (default=true) |
end_value | required | |
end_inclusive | optional | (default=false) |
And Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyOfFilter",
"name": "US",
"description": "United States",
"attribute": "Region",
"values": ['US']
}
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyOfFilter",
"name": "HU",
"description": "Hurricane",
"attribute": "Peril",
"values": ['HU']
}
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AndFilter",
"name": "US-HU",
"description": "US Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "e1957ab6-ac41-4bd5-b46e-a334aee658e8"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b"
},
]
}
from analyzere import LossFilter
us = LossFilter(type='AnyOfFilter',
name='US',
description=' United States',
attribute='Region',
values=['US']).save()
hu = LossFilter(type='AnyOfFilter',
name='HU',
description='Hurricane',
attribute='Peril',
values=['HU']).save()
us_hu = LossFilter(type='AndFilter',
name='US-HU',
description='US Hurricane',
expressions=[us, hu]).save()
using AnalyzeRe.LossFilters;
us = new AnyOfFilter();
us.name = "US";
us.description = "United States";
us.attribute = "Region";
us.values.Add("US" );
us = us.Save();
hu = new AnyOfFilter();
hu.name = "HU";
hu.description = "Hurricane";
hu.attribute = "Peril";
hu.values.Add("HU" );
hu = hu.Save();
us_hu = new AndFilter();
us_hu.name = "US-HU";
us_hu.description = "US Hurricane";
us_hu.expressions.Add(us.ToReference());
us_hu.expressions.Add(hu.ToReference());
us_hu = us_hu.Save();
Response Body:
{
"id": "855fa512-d19c-11e4-a683-cfc2f4cc4716",
"_type": "AndFilter",
"name": "US-HU",
"description": "US Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "e1957ab6-ac41-4bd5-b46e-a334aee658e8",
"href": "https://api.analyzere.net/loss_filters/e1957ab6-ac41-4bd5-b46e-a334aee658e8"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b",
"href": "https://api.analyzere.net/loss_filters/c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b"
},
]
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | RangeFilter |
name | required | |
description | required | |
expressions | required |
Or Filter
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyOfFilter",
"name": "US",
"description": "United States",
"attribute": "Region",
"values": ['US']
}
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "AnyOfFilter",
"name": "HU",
"description": "Hurricane",
"attribute": "Peril",
"values": ['HU']
}
POST /loss_filters HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
{
"_type": "OrFilter",
"name": "US | HU",
"description": "US -or- Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "83a15a5a-c65b-11e4-b2e0-00219b17747b"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "96596660-c65b-11e4-b002-53e20651f4c8"
},
]
}
from analyzere import LossFilter
us = LossFilter(type='AnyOfFilter',
name='US',
description='United States',
attribute='Region',
values=['US']).save()
hu = LossFilter(type='AnyOfFilter',
name='HU',
description='Hurricane',
attribute='Peril',
values=['HU']).save()
us_or_hu = LossFilter(type='OrFilter',
name='US | HU',
description='US -or- Hurricane',
expressions=[us, hu]).save()
us = new AnyOfFilter();
us.name = "US";
us.description = "United States";
us.attribute = "Region";
us.values.Add("US");
us = us.Save();
hu = new AnyOfFilter();
hu.name = "HU";
hu.description = "Hurricane";
hu.attribute = "Peril";
hu.values.Add("HU");
hu = hu.Save();
us_or_hu = new OrFilter();
us_or_hu.name = "US | HU";
us_or_hu.description = "US -or- Hurricane";
us_or_hu.expressions.Add(us.ToReference());
us_or_hu.expressions.Add(hu.ToReference());
us_or_hu = us_or_hu.Save();
Response Body:
{
"id": "bbe2797a-d19c-11e4-b3f2-ffb232df5532",
"_type": "OrFilter",
"name": "US | HU",
"description": "US -or- Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "83a15a5a-c65b-11e4-b2e0-00219b17747b",
"href": "https://api.analyzere.net/loss_filters/83a15a5a-c65b-11e4-b2e0-00219b17747b"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "96596660-c65b-11e4-b002-53e20651f4c8",
"href": "https://api.analyzere.net/loss_filters/96596660-c65b-11e4-b002-53e20651f4c8"
},
]
}
Arguments
Attribute | Traits | Decription |
---|---|---|
_type | required | RangeFilter |
name | required | |
description | required | |
expressions | required |
Retrieve
Any Filter
GET /loss_filters/855e80b0-d19c-11e4-ace7-9fc9f67fd390 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
any_filter = LossFilter.retrieve('855e80b0-d19c-11e4-ace7-9fc9f67fd390')
using AnalyzeRe.LossFilters;
AnyFilter any_filter = API.Get<AnyFilter>("855e80b0-d19c-11e4-ace7-9fc9f67fd390");
Response Body:
{
"id": "855e80b0-d19c-11e4-ace7-9fc9f67fd390",
"_type": "AnyFilter",
"name": "WW_AP",
"description": "Match Everything"
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Any Of Filter
GET /loss_filters/855ed42a-d19c-11e4-acf3-67b062f6b3b7 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
any_of_filter = LossFilter.retrieve('855ed42a-d19c-11e4-acf3-67b062f6b3b7')
using AnalyzeRe.LossFilters;
AnyOfFilter any_of_filter = API.Get<AnyOfFilter>("855ed42a-d19c-11e4-acf3-67b062f6b3b7");
Response Body:
{
"id": "855ed42a-d19c-11e4-acf3-67b062f6b3b7",
"_type": "AnyOfFilter",
"name": "WS",
"description": "Windstorm",
"attribute": "Peril",
"values": ["HU", "CY", "TY"],
"invert": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Record Type Any Of Filter
GET /loss_filters/855ed42a-d19c-11e4-acf3-4b2eb6f6b716 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
record_type_any_of_filter = LossFilter.retrieve('855ed42a-d19c-11e4-acf3-4b2eb6f6b716')
using AnalyzeRe.LossFilters;
RecordTypeAnyOfFilter record_type_filter = API.Get<RecordTypeAnyOfFilter>("855ed42a-d19c-11e4-acf3-4b2eb6f6b716");
Response Body:
{
"id": "855ed42a-d19c-11e4-acf3-4b2eb6f6b716",
"_type": "RecordTypeAnyOfFilter",
"name": "PC",
"description": "Profit Commission",
"values": ["ProfitCommission"],
"invert": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Less Than Filter
GET /loss_filters/855f0b34-d19c-11e4-a341-9f79de8aac82 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
small_quake_filter = LossFilter.retrieve('855f0b34-d19c-11e4-a341-9f79de8aac82')
using AnalyzeRe.LossFilters;
LTFilter small_quake_filter = API.Get<>("855f0b34-d19c-11e4-a341-9f79de8aac82");
Response Body:
{
"id": "855f0b34-d19c-11e4-a341-9f79de8aac82",
"_type": "LTFilter",
"name": "Small-EQ",
"description": "Small Earthquakes",
"attribute": "Magnitude",
"value": 6.0,
"inclusive": true
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Greater Than Filter
GET /loss_filters/855f416c-d19c-11e4-adb6-af2bd5dc69b4 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
big_quake_filter = LossFilter.retrieve('855f416c-d19c-11e4-adb6-af2bd5dc69b4')
using AnalyzeRe.LossFilters;
GTFilter big_quake_filter = API.Get<GTFilter>("855f416c-d19c-11e4-adb6-af2bd5dc69b4");
Response Body:
{
"id": "855f416c-d19c-11e4-adb6-af2bd5dc69b4",
"_type": "GTFilter",
"created": "2018-07-31T23:08:07.632210Z",
"modified": "2018-07-31T23:08:07.632210Z",
"name": "Large-EQ",
"invert": false,
"attribute": "Magnitude",
"value": 8.5,
"inclusive": true,
"meta_data": {},
"description": "Large Earthquakes"
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Range Filter
GET /loss_filters/855f7420-d19c-11e4-95fe-4b2eb6de13e2 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
range_filter = LossFilter.retrieve('855f7420-d19c-11e4-95fe-4b2eb6de13e2')
using AnalyzeRe.LossFilters;
RangeFilter range_filter = API.Get<RangeFilter>("855f7420-d19c-11e4-95fe-4b2eb6de13e2");
Response Body:
{
"id": "855f7420-d19c-11e4-95fe-4b2eb6de13e2",
"_type": "RangeFilter",
"name": "Med-EQ",
"description": "Medium Earthquakes",
"attribute": "Magnitude",
"invert": false,
"begin_value": 6.0,
"begin_inclusive": false,
"end_value": 8.5,
"end_inclusive": false
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
And Filter
GET /loss_filters/855fa512-d19c-11e4-a683-cfc2f4cc4716 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
and_filter = LossFilter.retrieve('855fa512-d19c-11e4-a683-cfc2f4cc4716')
import AnalyzeRe.LossFilters;
AndFilter and_filter = API.Get<AndFilter>("855fa512-d19c-11e4-a683-cfc2f4cc4716");
Response Body:
{
"id": "855fa512-d19c-11e4-a683-cfc2f4cc4716",
"_type": "AndFilter",
"name": "US-HU",
"description": "US Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "e1957ab6-ac41-4bd5-b46e-a334aee658e8",
"href_id": "http://api.analyzere.net/loss_filters/e1957ab6-ac41-4bd5-b46e-a334aee658e8"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b",
"href_id": "http://api.analyzere.net/loss_filters/c8a952c7-4e5c-4d9e-aa40-d63e3f1d2d0b"
},
]
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
Or Filter
GET /loss_filters/855fa512-d19c-11e4-a683-cfc2f4cc4716 HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
or_filter = LossFilter.retrieve('bbe2797a-d19c-11e4-b3f2-ffb232df5532')
import AnalyzeRe.LossFilters;
OrFilter or_filter = API.Get<OrFilter>("bbe2797a-d19c-11e4-b3f2-ffb232df5532");
Response Body:
{
"id": "bbe2797a-d19c-11e4-b3f2-ffb232df5532",
"_type": "OrFilter",
"name": "US | HU",
"description": "US -or- Hurricane",
"expressions": [
{
"ref_type": "AnyOfFilter",
"ref_id": "83a15a5a-c65b-11e4-b2e0-00219b17747b",
"href_id": "http://api.analyzere.net/loss_filters/83a15a5a-c65b-11e4-b2e0-00219b17747b"
},
{
"ref_type": "AnyOfFilter",
"ref_id": "96596660-c65b-11e4-b002-53e20651f4c8",
"href_id": "http://api.analyzere.net/loss_filters/96596660-c65b-11e4-b002-53e20651f4c8"
},
]
}
Arguments
Attribute | Traits | Decription |
---|---|---|
id | required |
List Loss Filters
GET /loss_filters?search=EQ&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import LossFilter
loss_filters = LossFilter.list(search='EQ',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<LossFilter> lossFilters = API.SearchResourceList<LossFilter>(
"EQ", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "855f416c-d19c-11e4-adb6-af2bd5dc69b4",
"_type": "GTFilter",
"created": "2018-07-31T23:08:07.632210Z",
"modified": "2018-07-31T23:08:07.632210Z",
"name": "Large-EQ",
"invert": false,
"attribute": "Magnitude",
"value": 8.5,
"inclusive": true,
"meta_data": {},
"description": "Large Earthquakes"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Loss Filters of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Loss Filters to return (default 100) |
offset | optional | the number of Loss Filters to skip before returning the limit |
fields | optional | a list of the Loss Filter fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Loss Filter fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Loss Filters to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Loss Filters by name and description (case-insensitive substring match) |
ordering | optional | orders the list of Loss Filters |
ordering
accepts the following values (case-sensitive):
id
created
modified
name
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Exchange Rate Tables
The Exchange Rate Table collection contains a set of ISO 4217 currencies with associated exchange rates. Exchange Rate Tables are used to perform currency conversions during simulations.
Exchange Rate data can be obtained from a number of free services. Customers are able to upload rate tables as needed, and can provide only those currencies that are relevant for the deals being simulated.
The Exchange Rate Table expects that rates are provide in base_currency per unit
of foreign currency. For example, if the Exchange Rate Table has a base currency
of USD
and the rate corresponding to EUR
is 1.5, this denotes that one
EUR
is equivalent to 1.5 USD
.
Exchange Rate Table data is typically represented by a csv file. In order to upload an Exchange Rate Table to the PRIME server, the csv file must contain three mandatory columns: “currency”, “date”, and “rate”. An example of an Exchange Rate Table csv file:
currency | date | rate |
---|---|---|
CUC | 2014-09-28T00:00:00Z | 0.99 |
EUR | 2014-09-28T00:00:00Z | 2.00 |
CAD | 2014-09-28T00:00:00Z | 1.05 |
JPY | 2014-09-28T00:00:00Z | 0.50 |
CAD | 2014-09-27T00:00:00Z | 0.89 |
EUR | 2014-09-27T00:00:00Z | 1.26 |
Definition
{
"id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa",
"created": "2015-02-05T17:27:55.663000Z",
"modified": "2015-02-05T17:27:55.804640Z",
"base_currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/893aeb0e-e018-49b4-a4fb-456a70be9422",
"ref_id": "893aeb0e-e018-49b4-a4fb-456a70be9422"
},
"status": "processing_succeeded",
"status_message": null,
"description": "Default Exchange Rate Table"
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
created | datetime string | the datetime the resource was created |
base_currency | ISO 4217 currency code | rates in the table are relative to this currency |
description | string | a short description of the Portfolio |
Create an Exchange Rate Table
POST /exchange_rate_tables/ HTTP/1.1
Host: api.analyzere.net
{
"base_currency": "USD",
"description": "Default Exchange Rate Table"
}
from analyzere import ExchangeRateTable
table = ExchangeRateTable(base_currency='USD',
description='Default Exchange Rate Table').save()
# upload the csv file that contains the rates
with open('files/exchange-rate-tables/USD-Feb-01-2017.csv') as table_data:
table.upload_data(table_data)
using AnalyzeRe;
ExchangeRateTable table = new ExchangeRateTable();
table.base_currency = "USD";
table.description = "Default Exchange Rate Table";
table = table.Save();
// upload the csv file that contains the rates
table.data.LargeFileUpload("files/exchange-rate-tables/USD-Feb-05-2015.csv");
Response Body
{
"id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa",
"created": "2015-02-05T17:27:55.663000Z",
"modified": "2015-02-05T17:27:55.804640Z",
"base_currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/893aeb0e-e018-49b4-a4fb-456a70be9422",
"ref_id": "893aeb0e-e018-49b4-a4fb-456a70be9422"
},
"status": "processing_succeeded",
"status_message": null,
"description": "Default Exchange Rate Table"
}
Arguments
Name | Traits | Description |
---|---|---|
description | required | |
base_currency | required |
Retrieve an Exchange Rate Table
GET /exchange_rate_tables/e37ffc8d-9235-4aa5-bc02-f68de558f2fa HTTP/1.1
Host: api.analyzere.net
from analyzere import ExchangeRateTable
table = ExchangeRateTable.retrieve('e37ffc8d-9235-4aa5-bc02-f68de558f2fa')
using AnalyzeRe;
ExchangeRateTable table = API.Get<ExchangeRateTable>("e37ffc8d-9235-4aa5-bc02-f68de558f2fa");
Response Body:
{
"id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa",
"created": "2015-02-05T17:27:55.663000Z",
"modified": "2015-02-05T17:27:55.804640Z",
"base_currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/893aeb0e-e018-49b4-a4fb-456a70be9422",
"ref_id": "893aeb0e-e018-49b4-a4fb-456a70be9422"
},
"status": "processing_succeeded",
"status_message": null,
"description": "Default Exchange Rate Table"
}
Arguments
Name | Traits | Description |
---|---|---|
id | required |
List Exchange Rate Tables
GET /exchange_rate_tables/?search=default&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import ExchangeRateTable
tables = ExchangeRateTable.list(search='default',
ordering='-created')
using AnalyzeRe;
using AnalyzeRe.ExchangeRates;
using System.Collections.Generic;
IEnumerable<ExchangeRateTable> tables = API.SearchResourceList<ExchangeRateTable>(
"default", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa",
"created": "2015-02-05T17:27:55.663000Z",
"modified": "2015-02-05T17:27:55.804640Z",
"base_currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/893aeb0e-e018-49b4-a4fb-456a70be9422",
"ref_id": "893aeb0e-e018-49b4-a4fb-456a70be9422"
},
"status": "processing_succeeded",
"status_message": null,
"description": "Default Exchange Rate Table"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Exchange Rate Tables to return (default 100) |
offset | optional | the number of Exchange Rate Tables to skip before returning the limit |
fields | optional | a list of the Exchange Rate Table fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Exchange Rate Table fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Exchange Rate Tables to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Exchange Rate Tables by description (case-insensitive substring match) |
description | optional | filters the list of Exchange Rate Tables by description (case-sensitive exact match) |
base_currency | optional | filters the list of Exchange Rate Tables by base_currency (case-sensitive exact match) |
status | optional | filters the list of Exchange Rate Tables by status (case-sensitive exact match) |
ordering | optional | orders the list of Exchange Rate Tables |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
base_currency
status
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Retrieve Unique Currencies List
The list of unique currencies from the exchange rate table returned. The request does not accept any additional arguments.
If the exchange rate table CSV has not been uploaded, an empty list will be returned. If the CSV file is still being processed, an HTTP 503 response will be returned with a Retry-After header. The client may wish to “poll” the server using this mechanism until the currency codes are returned.
GET /exchange_rate_tables/e37ffc8d-9235-4aa5-bc02-f68de558f2fa/currencies HTTP/1.1
Host: api.analyzere.net
from analyzere import ExchangeRateTable
fx_table = ExchangeRateTable.retrieve('e37ffc8d-9235-4aa5-bc02-f68de558f2fa')
fx_table.currencies()
using AnalyzeRe;
using AnalyzeRe.ExchangeRates;
using System.Collections.Generic;
ExchangeRateTable table = API.Get<ExchangeRateTable>("e37ffc8d-9235-4aa5-bc02-f68de558f2fa");
//To get a unique currencies object that is a representation of the response JSON body
ExchangeRateTable.CurrenciesEndpointResponse uniqueCurrencies = table.currencies.Get();
//Helper function to get only a HashSet of unique currencies codes
HashSet<string> currenciesSet = table.GetUniqueCurrencies();
Response Body
{
"currencies": [
{
"code": "JPY"
},
{
"code": "CUC"
},
{
"code": "CAD"
},
{
"code": "EUR"
}
]
}
Exchange Rate Profiles
In order to have the PRIME server make use of an Exchange Rate Table, users must first define an Exchange Rate Profile. Exchange Rate Profiles provide rules on how exchange rates should be applied to Monetary Unit values during simulation.
Definition
{
"_type": "ExchangeRateProfile",
"id": "25c50127-1d2c-480f-86c8-f0db478ddd2b",
"created": "2018-03-19T16:08:25.944000Z",
"modified": "2018-03-19T16:08:25.945000Z",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"href": "https://api.analyzere.net/exchange_rate_tables/d113368b-3961-4fe6-bfcc-77624d534c93",
"ref_id": "d113368b-3961-4fe6-bfcc-77624d534c93"
},
"rate_selection_order": [
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": ["Date"],
"date": "2017-01-01T00:00:00Z"
},
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": ["Rate"]
}
]
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
exchange_rate_table | Reference(ExchangeRateTable) | the Exchange Rate Table that contains the currency rates |
rate_selection_order | List(ExchangeRateLatestRule or ExchangeRateDateRule) | ordered list of Exchange Rate Selection Rules |
description | string | a short description of the Exchange Rate Profile |
created | datetime string | the datetime when the resource was created |
modified | datetime string | the datetime when the resource was last modified |
Embedded Objects
Exchange Rate Profiles are an ordered list of embedded “Exchange Rate Selection
Rule” objects. When performing exchange rate conversions, the system will apply
the rules in order. In the absence of an associated override flag, if a
MonetaryUnit specifies a value_date
or rate
, the
specification in the MonetaryUnit will be used. If none of
the rules match, or the value_date
specified in the MonetaryUnit can not be
found in the Exchange Rate Table, an error will be
returned.
An example of a chain of rules that you might define:
ExchangeRateDateRule
with date = “2017-01-01T00:00:00Z”ExchangeRateLatestRule
Given the rules above the system will:
- First search for an exchange rate on the date specified by any
MonetaryUnits.value_date, or use the
date
specified in the Rule if novalue_date
is specified in the MonetaryUnit. - Second, if no exchange rate is found for the date specified in the first rule,
search for the latest exchange rate in the associated
Exchange Rate Table.
Any
value_date
orrate
values in MonetaryUnit will be respected.
There are two types of exchange rate selection rules: ExchangeRateLatestRule and ExchangeRateDateRule.
These two (polymorphic) types of Exchange Rate Selection Rule objects share a
common, optional, monetary_unit_overrides
attribute.
Exchange Rate Latest Rule
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
The default Exchange Rate Selection Rule. This will result in the most recent
exchange rate being selected from the associated
Exchange Rate Table for each currency being converted
(unless a MonetaryUnit specifies the value_date
for which
the exchange rate should be used, in which case that date is used.)
Attributes
Name | Type | Description |
---|---|---|
_type | Type | ExchangeRateLatestRule |
monetary_unit_overrides | List(string) | (optional) override flags (valid values: ‘Date’, 'Rate’) |
Exchange Rate Date Rule
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": [],
"date": "2017-01-01T00:00:00Z"
}
Specify a preferred date to be used when selecting rates from the associated Exchange Rate Table.
Attributes
Name | Type | Description |
---|---|---|
_type | Type | ExchangeRateDateRule |
monetary_unit_overrides | List(string) | (optional) override flags (valid values: 'Date’, 'Rate’) |
date | datetime string | the preferred exchange rate date |
Monetary Unit Override Flags
The (optional) Monetary Unit Override flags ('Date’ and 'Rate’) dictate what
field(s) of the MonetaryUnit
should be overridden as part
of applying the associated Exchange Rate Selection Rule.
'Date’ Override Flag
Indicates that when applying the Exchange Rate Selection Rule, the value_date
field of MonetaryUnit
values should be overridden with the
date indicated by the associated Exchange Rate Selection Rule.
'Rate’ Override Flag
Indicates that when applying the Exchange Rate Selection Rule, the rate
field
of MonetaryUnit
values should be overridden with the rate
indicated by the associated Exchange Rate Selection Rule.
Combining Override Flags
It is possible to override both value_date
and rate
fields of
MonetaryUnit
values by specifying both 'Date’ and 'Rate’
Override Flags.
Listed below are the possible combinations of 'Date’ and 'Rate’ override flags,
and the resulting order of MonetaryUnit
field overriding:
Empty
monetary_unit_overrides
(default)- Use
rate
fromMonetaryUnit
(iff supplied). - Use rate from the associated Exchange Rate Table
for the
date
specified in theMonetaryUnit
(iff supplied). - If neither
date
norrate
are specified in aMonetaryUnit
- use the rate in the associated Exchange Rate Table based on the Exchange Rate Selection Rule type (Latest or Date).
- Use
Date
monetary_unit_overrides
- Use
rate
fromMonetaryUnit
(iff specified). - Use rate from the associated Exchange Rate Table based on Exchange Rate Selection type (Latest or Date).
- Use
Rate
monetary_unit_overrides
- Find rate for the
date
specified in theMonetaryUnit
(iff supplied). - Find rate from the associated Exchange Rate Table based on Exchange Rate Selection type (Latest or Date)
- Find rate for the
Date and Rate
monetary_unit_overrides
- Find rate based on Exchange Rate Selection type (Latest or Date)
Create an Exchange Rate Profile
POST /exchange_rate_profiles/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "ExchangeRateProfile",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"ref_id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa"
},
"rate_selection_order": [
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": [],
"date": "2017-01-01T00:00:00Z"
},
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
]
}
from analyzere import (
ExchangeRateSelectionRule,
ExchangeRateProfile,
ExchangeRateTable
)
fx_table = ExchangeRateTable.retrieve('e37ffc8d-9235-4aa5-bc02-f68de558f2fa')
# create a preferred date rule
date_rule = ExchangeRateSelectionRule(type='ExchangeRateDateRule', date='2017-01-01T00:00:00Z')
# fall back to latest available date
latest_rule = ExchangeRateSelectionRule(type='ExchangeRateLatestRule')
fx_profile = ExchangeRateProfile(description='Default Exchange Rate Profile',
exchange_rate_table=fx_table,
rate_selection_order=[date_rule, latest_rule]).save()
using AnalyzeRe;
ExchangeRateProfile fx_profile = new ExchangeRateProfile();
fx_profile.description = "Default Exchange Rate Profile";
fx_profile.exchange_rate_table = new Reference<ExchangeRateTable>("e37ffc8d-9235-4aa5-bc02-f68de558f2fa");
// create a preferred date rule
fx_profile.rate_selection_order.Add(new ExchangeRateProfile.ExchangeRateDateRule
{
date = new DateTime(2017, 01, 01),
});
// fall back to latest available date
fx_profile.rate_selection_order.Add(new ExchangeRateProfile.ExchangeRateLatestRule());
fx_profile = fx_profile.Save();
Response Body
{
"_type": "ExchangeRateProfile",
"id": "25c50127-1d2c-480f-86c8-f0db478ddd2b",
"created": "2018-01-3T16:08:25.944000Z",
"modified": "2018-01-4T16:08:25.945000Z",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"href": "https://api.analyzere.net/exchange_rate_tables/d113368b-3961-4fe6-bfcc-77624d534c93",
"ref_id": "d113368b-3961-4fe6-bfcc-77624d534c93"
},
"rate_selection_order": [
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": [],
"date": "2017-01-01T00:00:00Z"
},
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
]
}
Arguments
Name | Type | Description |
---|---|---|
exchange_rate_table | Reference(ExchangeRateTable) | the Exchange Rate Table that contains the currency rates |
rate_selection_order | List(ExchangeRateLatestRule or ExchangeRateDateRule) | ordered list of Exchange Rate Selection Rules |
description | string | a short description of the Exchange Rate Profile |
Retrieve an Exchange Rate Profile
GET /exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b HTTP/1.1
Host: api.analyzere.net
from analyzere import ExchangeRateProfile
fx_profile = ExchangeRateProfile.retrieve('25c50127-1d2c-480f-86c8-f0db478ddd2b')
using AnalyzeRe;
ExchangeRateProfile profile = API.Get<ExchangeRateProfile>("25c50127-1d2c-480f-86c8-f0db478ddd2b");
Response Body
{
"_type": "ExchangeRateProfile",
"id": "25c50127-1d2c-480f-86c8-f0db478ddd2b",
"created": "2018-01-02T16:08:25.944000Z",
"modified": "2018-01-02T16:08:25.945000Z",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"href": "https://api.analyzere.net/exchange_rate_tables/d113368b-3961-4fe6-bfcc-77624d534c93",
"ref_id": "d113368b-3961-4fe6-bfcc-77624d534c93"
},
"rate_selection_order": [
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": [],
"date": "2017-01-01T00:00:00Z"
},
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
]
}
Exchange Rate Profiles are retrieved by ID.
Arguments
Name | Traits | Description |
---|---|---|
id | required |
List Exchange Rate Profiles
GET /exchange_rate_profiles/?search=default&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import ExchangeRateProfile
fx_profiles = ExchangeRateProfile.list(search='default',
ordering='-created')
using AnalyzeRe;
using AnalyzeRe.ExchangeRates;
using System.Collections.Generic;
IEnumerable<ExchangeRateProfile> profiles = API.SearchResourceList<ExchangeRateProfile>(
"default", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"_type": "ExchangeRateProfile",
"id": "25c50127-1d2c-480f-86c8-f0db478ddd2b",
"created": "2018-01-02T16:08:25.944000Z",
"modified": "2018-01-02T16:08:25.945000Z",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"href": "https://api.analyzere.net/exchange_rate_tables/d113368b-3961-4fe6-bfcc-77624d534c93",
"ref_id": "d113368b-3961-4fe6-bfcc-77624d534c93"
},
"rate_selection_order": [
{
"_type": "ExchangeRateDateRule",
"monetary_unit_overrides": [],
"date": "2017-01-01T00:00:00Z"
},
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
]
},
{
"_type": "ExchangeRateProfile",
"id": "0a7efefc-1090-46f1-a78e-0f0f72866ba6",
"created": "2017-01-02T16:08:26.566000Z",
"modified": "2017-01-02T16:08:26.568000Z",
"description": "Default Profile",
"exchange_rate_table": {
"ref_type": "ExchangeRateTable",
"href": "https://api.analyzere.net/exchange_rate_tables/c077a48f-27dc-4d19-91ee-01321e5c7121",
"ref_id": "c077a48f-27dc-4d19-91ee-01321e5c7121"
},
"rate_selection_order": [
{
"_type": "ExchangeRateLatestRule",
"monetary_unit_overrides": []
}
]
}
],
"meta": {
"total_count": 2,
"limit": 100,
"offset": 0
}
}
Exchange Rate Profiles are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Exchange Rate Profiles to return (default 100) |
offset | optional | the number of Exchange Rate Profiles to skip before returning the limit |
fields | optional | a list of the Exchange Rate Profile fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Exchange Rate Profile fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Exchange Rate Profiles to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Exchange Rate Profiles by description (case-insensitive substring match) |
description | optional | filters the list of Exchange Rate Profiles by description (case-sensitive exact match) |
ordering | optional | orders the list of Exchange Rate Profiles |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Analysis Profiles
In order to perform simulation-based analyses of Layers
, the PRIME
platform needs to know the context under which to perform the analysis.
Typically the goal is to perform simulation analyses on a large set of
Layers
using a common context. Given that the context under which
this large number of Layers
is to be performed is rather static
in nature, the PRIME platform uses the concept of an Analysis Profile to capture
those common attributes of the simulations.
Analysis Profiles are used to bundle together the set of components that are
required to perform simulation analyses, and provide a convenient wrapper that
allows clients to simply reference the set of components such that each
Layers
is analyzed using the same context. Analysis Profiles
consist of four components:
-
The Event Catalog provides the details (attributes/values) about each event. The simulated losses are collected into buckets that correspond to the set of Loss Filters. When an event occurs during a trial in the simulation, the event attributes/values are matched against the set of LossFilter in order to determine where the losses should be accumulated for the purposes of reporting losses.
-
The Simulation that defines the set of Trials to use during the simulation. When analyzing/comparing Layers, it is important to use the same Simulation to analyze all Layers.
-
The set of attribute/value based Event attributes that group losses together in a meaningful way for reporting purposes.
-
The Exchange Rate Profile defines the set of rules and an Exchange Rate Table that are to be used when determining the exchange rates to use during simulation.
All four of these components need to be created on the PRIME server before an Analysis Profile can be created.
Definition
{
"id": "b815736b-9607-4e64-8e96-1aecf137a30e",
"created": "2018-08-16T16:42:32.774094Z",
"modified": "2018-08-16T16:42:33.370012Z",
"loss_filters": [
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/e89d952a-e137-45c1-b0b0-f8ba36472142",
"ref_id": "e89d952a-e137-45c1-b0b0-f8ba36472142"
},
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/89975af0-b056-4308-af72-8948c3431fdb",
"ref_id": "89975af0-b056-4308-af72-8948c3431fdb"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/20fcd86c-5ca2-4ac2-850c-4823e4afc385",
"ref_id": "20fcd86c-5ca2-4ac2-850c-4823e4afc385"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/3db2f7e0-59e2-4969-a5df-8e72f0a21927",
"ref_id": "3db2f7e0-59e2-4969-a5df-8e72f0a21927"
}
],
"exchange_rate_profile": {
"ref_type": "ExchangeRateProfile",
"href": "https://api.analyzere.net/exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b",
"ref_id": "25c50127-1d2c-480f-86c8-f0db478ddd2b"
},
"simulation": {
"ref_type": "StaticSimulation",
"href": "https://api.analyzere.net/simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"ref_id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa"
},
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"status": "processing_succeeded",
"status_message": null,
"meta_data": {},
"description": "My 2018 Analysis Profile - V1",
"yelt_loss_set_simulation_filtering": false
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | AnalysisProfile |
loss_filters | List(Reference LossFilter) | the list of LossFilter into which losses will be bucketed |
exchange_rate_profile | Reference ExchangeRateProfile | the ExchangeRateProfile that defines exchange rate rules |
simulation | Reference Simulation | the Simulation to perform |
event_catalogs | List(Reference EventCatalog) | the Event Catalog which define event attributes that are filtered on |
yelt_loss_set_simulation_filtering | Boolean | (optional) Indicate whether YELTs used with this Analysis Profile should be filtered by occurrences in the associated Simulation. If set true then occurrences in the YELT that do not occur in the Simulation will be discarded. The default value is false . |
Create an Analysis Profile
POST /analysis_profiles/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "AnalysisProfile",
"loss_filters": [
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/e89d952a-e137-45c1-b0b0-f8ba36472142",
"ref_id": "e89d952a-e137-45c1-b0b0-f8ba36472142"
},
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/89975af0-b056-4308-af72-8948c3431fdb",
"ref_id": "89975af0-b056-4308-af72-8948c3431fdb"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/20fcd86c-5ca2-4ac2-850c-4823e4afc385",
"ref_id": "20fcd86c-5ca2-4ac2-850c-4823e4afc385"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/3db2f7e0-59e2-4969-a5df-8e72f0a21927",
"ref_id": "3db2f7e0-59e2-4969-a5df-8e72f0a21927"
}
],
"exchange_rate_profile": {
"ref_type": "ExchangeRateProfile",
"href": "https://api.analyzere.net/exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b",
"ref_id": "25c50127-1d2c-480f-86c8-f0db478ddd2b"
},
"simulation": {
"ref_type": "StaticSimulation",
"href": "https://api.analyzere.net/simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"ref_id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa"
},
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
]
}
from analyzere import (
AnalysisProfile,
ExchangeRateProfile,
EventCatalog,
LossFilter,
Simulation
)
// Get the set of Filters
all_regions_all_perils = LossFilter.retrieve('cbe2744d-bd02-42e1-95a3-476404cf4e88')
all_perils = LossFilter.retrieve('3c164222-6fc6-4604-b536-3ec8fd4bbd22')
us_eq = LossFilter.retrieve('9f2644f3-4510-4cc2-babd-34234d7b3f98')
us_hu = LossFilter.retrieve('f69e6a92-f413-4402-b05d-0e0386cfce3d')
profile = AnalysisProfile(event_catalogs=[EventCatalog.retrieve('fb5257d4-a9e8-4539-b305-dd4f33b10051')],
simulation=Simulation.retrieve('c8918b81-6d4e-41b8-8594-e5d4c765b4fa'),
exchange_rate_profile=ExchangeRateProfile.retrieve('25c50127-1d2c-480f-86c8-f0db478ddd2b)',
loss_filters=[all_regions_all_perils, all_perils, us_eq, us_hu]).save()
using AnalyzeRe;
using AnalyzeRe.LossFilters;
AnalysisProfile profile = new AnalysisProfile();
profile.event_catalogs.Add(new Reference<EventCatalog>("fb5257d4-a9e8-4539-b305-dd4f33b10051"));
profile.simulation = new Reference<StaticSimulation>("c8918b81-6d4e-41b8-8594-e5d4c765b4fa");
profile.exchange_rate_profile = new Reference<ExchangeRateProfile>("25c50127-1d2c-480f-86c8-f0db478ddd2b");
// Get the set of Filters
AnyFilter all_regions_all_perils = API.Get<AnyFilter>("");
AnyOfFilter all_perils = API.Get<AnyOfFilter>("");
AndFilter us_eq = API.Get<AndFilter>("");
AndFilter us_hu = API.Get<AndFilter>("");
profile.loss_filters.AddRange(new IReference<LossFilter>[]
{
all_regions_all_perils.ToReference(),
all_perils.ToReference(),
us_eq.ToReference(),
us_hu.ToReference()
});
profile = profile.Save();
Response Body
{
"id": "b815736b-9607-4e64-8e96-1aecf137a30e",
"created": "2018-08-16T16:42:32.774094Z",
"modified": "2018-08-16T16:42:33.370012Z",
"loss_filters": [
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/e89d952a-e137-45c1-b0b0-f8ba36472142",
"ref_id": "e89d952a-e137-45c1-b0b0-f8ba36472142"
},
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/89975af0-b056-4308-af72-8948c3431fdb",
"ref_id": "89975af0-b056-4308-af72-8948c3431fdb"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/20fcd86c-5ca2-4ac2-850c-4823e4afc385",
"ref_id": "20fcd86c-5ca2-4ac2-850c-4823e4afc385"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/3db2f7e0-59e2-4969-a5df-8e72f0a21927",
"ref_id": "3db2f7e0-59e2-4969-a5df-8e72f0a21927"
}
],
"exchange_rate_profile": {
"ref_type": "ExchangeRateProfile",
"href": "https://api.analyzere.net/exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b",
"ref_id": "25c50127-1d2c-480f-86c8-f0db478ddd2b"
},
"simulation": {
"ref_type": "StaticSimulation",
"href": "https://api.analyzere.net/simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"ref_id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa"
},
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"status": "processing_succeeded",
"status_message": null,
"meta_data": {},
"description": "My 2018 Analysis Profile - V1"
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | AnalysisProfile |
loss_filters | List(Reference LossFilter) | the list of LossFilter |
exchange_rate_profile | Reference ExchangeRateProfile | the ExchangeRateProfile |
simulation | Reference Simulation | the Simulation |
event_catalogs | List(Reference EventCatalog) | the Event Catalog |
yelt_loss_set_simulation_filtering | Boolean | (optional) Indicate whether YELTs used with this Analysis Profile should be filtered by occurrences in the associated Simulation. If set true then occurrences in the YELT that do not occur in the Simulation will be discarded. The default value is false . |
Retrieve an Analysis Profile
GET /analysis_profiles/b815736b-9607-4e64-8e96-1aecf137a30e HTTP/1.1
Host: api.analyzere.net
from analyzere import AnalysisProfile
profile = AnalysisProfile.retrieve('b815736b-9607-4e64-8e96-1aecf137a30e')
using AnalyzeRe;
AnalysisProfile profile = API.Get<AnalysisProfile>("b815736b-9607-4e64-8e96-1aecf137a30e");
Response Body
{
"id": "b815736b-9607-4e64-8e96-1aecf137a30e",
"created": "2018-08-16T16:42:32.774094Z",
"modified": "2018-08-16T16:42:33.370012Z",
"loss_filters": [
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/e89d952a-e137-45c1-b0b0-f8ba36472142",
"ref_id": "e89d952a-e137-45c1-b0b0-f8ba36472142"
},
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/89975af0-b056-4308-af72-8948c3431fdb",
"ref_id": "89975af0-b056-4308-af72-8948c3431fdb"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/20fcd86c-5ca2-4ac2-850c-4823e4afc385",
"ref_id": "20fcd86c-5ca2-4ac2-850c-4823e4afc385"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/3db2f7e0-59e2-4969-a5df-8e72f0a21927",
"ref_id": "3db2f7e0-59e2-4969-a5df-8e72f0a21927"
}
],
"exchange_rate_profile": {
"ref_type": "ExchangeRateProfile",
"href": "https://api.analyzere.net/exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b",
"ref_id": "25c50127-1d2c-480f-86c8-f0db478ddd2b"
},
"simulation": {
"ref_type": "StaticSimulation",
"href": "https://api.analyzere.net/simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"ref_id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa"
},
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"status": "processing_succeeded",
"status_message": null,
"meta_data": {},
"description": "My 2018 Analysis Profile - V1"
}
Analysis Profiles are retrieved by ID.
Arguments
Name | Traits | Description |
---|---|---|
id | required |
List Analysis Profiles
GET /analysis_profiles/?search=2018&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import AnalysisProfile
analysis_profiles = AnalysisProfile.list(search='2018',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<AnalysisProfile> analysisProfiles = API.SearchResourceList<AnalysisProfile>(
"2018", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "b815736b-9607-4e64-8e96-1aecf137a30e",
"created": "2018-08-16T16:42:32.774094Z",
"modified": "2018-08-16T16:42:33.370012Z",
"loss_filters": [
{
"ref_type": "AnyFilter",
"href": "https://api.analyzere.net/loss_filters/e89d952a-e137-45c1-b0b0-f8ba36472142",
"ref_id": "e89d952a-e137-45c1-b0b0-f8ba36472142"
},
{
"ref_type": "AnyOfFilter",
"href": "https://api.analyzere.net/loss_filters/89975af0-b056-4308-af72-8948c3431fdb",
"ref_id": "89975af0-b056-4308-af72-8948c3431fdb"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/20fcd86c-5ca2-4ac2-850c-4823e4afc385",
"ref_id": "20fcd86c-5ca2-4ac2-850c-4823e4afc385"
},
{
"ref_type": "AndFilter",
"href": "https://api.analyzere.net/loss_filters/3db2f7e0-59e2-4969-a5df-8e72f0a21927",
"ref_id": "3db2f7e0-59e2-4969-a5df-8e72f0a21927"
}
],
"exchange_rate_profile": {
"ref_type": "ExchangeRateProfile",
"href": "https://api.analyzere.net/exchange_rate_profiles/25c50127-1d2c-480f-86c8-f0db478ddd2b",
"ref_id": "25c50127-1d2c-480f-86c8-f0db478ddd2b"
},
"simulation": {
"ref_type": "StaticSimulation",
"href": "https://api.analyzere.net/simulations/c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
"ref_id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa"
},
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
"ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
}
],
"status": "processing_succeeded",
"status_message": null,
"meta_data": {},
"description": "My 2018 Analysis Profile - V1"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Analysis Profiles of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Analysis Profiles to return (default 100) |
offset | optional | the number of Analysis Profiles to skip before returning the limit |
fields | optional | a list of the Analysis Profile fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Analysis Profile fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Analysis Profiles to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Analysis Profiles by description (case-insensitive substring match) |
ordering | optional | orders the list of Analysis Profiles |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Distributions
The PRIME platform supports simulations of non-modeled losses (parametric losses). PRIME supports two main methods of defining distributions:
- Parameterized Distributions
- Custom Distributions
Each method of defining distributions has two main classes of distributions:
Continuous Distributions
The PRIME server supports a number of common parameterized continuous distributions. Continuous distributions are typically used to define severity components of non-modeled loss sources.
- Log Normal
- Normal
- Pareto
- Uniform
Discrete Distributions
The PRIME server supports a number of common parameterized discrete distributions. Discrete distributions are typically used to define frequency components of non-modeled loss sources.
- Binomial
- Negative Binomial
- Poisson
- Uniform Int
List Distributions
GET /distributions?search=severity&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distributions = Distribution.list(search='severity',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<Distribution> distributions = API.SearchResourceList<Distribution>(
"severity", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
"_type": "CustomSeverityDistribution",
"created": "2018-03-12T21:29:14.817737Z",
"modified": "2018-03-12T21:29:14.817737Z",
"max_val": 5000000.0,
"mean_val": 3250000.0,
"min_val": 1000000.0,
"modulo": null,
"data": {
"href": "https://api.analyzere.net/files/9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7",
"ref_id": "9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7"
},
"interpolate": false,
"status": "processing_succeeded",
"status_message": null,
"meta_data": {
"Key3": 3.14,
"Key2": 1,
"Key1": "string",
"Key5": true
},
"description": "custom severity distribution"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Distributions of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Distributions to return (default 100) |
offset | optional | the number of Distributions to skip before returning the limit |
fields | optional | a list of the Distribution fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Distribution fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Distributions to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Distributions by description (case-insensitive substring match) |
description | optional | filters the list of Distributions by description (case-sensitive exact match) |
ordering | optional | orders the list of Distributions |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Parameterized Distributions
Define
Log Normal
{
"_type": "LogNormalDistribution",
"id": "fb638678-d17b-11e4-9718-1f2d9349b4ad",
"description": "Sample LogNormal Distribution",
"location": 0.5,
"stddev": 0.4
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | LogNormalDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
location | Float | a real number whose natural logarithm is equal to the mean the associated normal distribution |
scale | Float | a real number, greater than zero, whose natural logarithm is equal to the standard deviation of the associated normal distribution |
Normal Distribution
{
"_type": "NormalDistribution",
"id": "fbffd456-d17b-11e4-89ef-ef1c56e787d2",
"description": "Sample Normal Distribution",
"mean": 0.5,
"stddev": 0.4
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | NormalDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
mean | Float | mean of the Normal Distribution (any real number) |
stddev | Float | standard deviation of the Normal Distribution (any real number greater than zero) |
Pareto
{
"_type": "ParetoDistribution",
"id": "fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a",
"description": "Sample Pareto Distribution",
"scale": 1.1,
"shape": 0.9
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | ParetoDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
shape | Float | affects the shape of the Pareto probability distribution (any real number greater than zero) |
scale | Float | statistical dispersion of the Pareto probability distribution (any real number greater than zero). In practice, it is the smallest number the distribution can return |
Uniform
{
"_type": "UniformDistribution",
"id": "fed823b3-4722-41c2-8dff-441f1d6e7995",
"description": "Sample Uniform Distribution",
"lower": -3.14,
"upper": 15.92
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | UniformDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
lower | Float | lower bound of the domain of the uniform distribution (any real number) |
upper | Float | The upper bound of the domain of the uniform distribution (any real number greater than the lower bound) |
Binomial Distributions
{
"_type": "BinomialDistribution",
"id": "fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946",
"description": "Sample Binomial Distribution",
"n": 3,
"p": 0.5
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | BinomialDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
n | Int | an integer greater than or equal to zero representing the total number of trials, each with an equal probability p of success |
p | Float | a real number between zero and one (inclusive) that represents the probability of success of a single trial |
Negative Binomial Distributions
{
"_type": "NegativeBinomialDistribution",
"id": "fd0c923a-d17b-11e4-b75e-8b7cd58144ea",
"description": "Sample Negative Binomial Distribution",
"r": 0.5,
"p": 2.5
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | NegativeBinomialDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
r | Float | a real number greater than zero representing the total number of successes |
p | Float | a real number between zero and one (inclusive) that represents the probability of success of a single trial |
Poisson Distributions
{
"_type": "PoissonDistribution",
"id": "792fa4b8-d17e-11e4-adaf-3f7138acca95",
"description": "Sample Distribution",
"mean": 0.5
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | PoissonDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
mean | Float | mean of the Poisson Distribution (any real number greater than or equal to zero) |
Uniform Int Distributions
{
"_type": "UniformIntDistribution",
"id": "",
"description": "Sample UniformInt Distribution",
"lower": -1,
"upper": 8
}
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | UniformIntDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
lower | Int | the lower bound of the domain of the uniform distribution (any integer) |
upper | Int | the upper bound of the domain of the uniform distribution (any int greater than the lower bound) |
Create
Log Normal
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "LogNormalDistribution",
"description": "Sample LogNormal Distribution",
"location": 0.5,
"stddev": 0.4
}
from analyzere import Distribution
distribution = Distribution(type='LogNormalDistribution',
description='Sample LogNormal Distribution',
location=0.5,
stddev=0.4).save()
using AnalyzeRe
using AnalyzeRe.Distributions
LogNormalDistribution distribution = new LogNormalDistribution()
distribution.description = "Sample LogNormal Distribution";
distribution.location = 0.5,
distribution.scale = 0.4
distribution = distribution.Save()
Response Body:
{
"_type": "LogNormalDistribution",
"id": "fb638678-d17b-11e4-9718-1f2d9349b4ad",
"description": "Sample LogNormal Distribution",
"location": 0.5,
"stddev": 0.4
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | LogNormalDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
location | Float | |
scale | Float | restriction: scale > 0 |
Normal Distribution
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "NormalDistribution",
"description": "Sample Normal Distribution",
"mean": 0.5,
"stddev": 0.4
}
from analyzere import Distribution
distribution = Distribution(type='NormalDistribution',
description='Sample Normal Distribution',
mean=0.5,
stddev=0.4).save()
using AnalyzeRe
using AnalyzeRe.Distributions
NormalDistribution distribution = new NormalDistribution()
distribution.description = "Sample Normal Distribution";
distribution.location = 0.5,
distribution.scale = 0.4
distribution = distribution.Save()
Response Body:
{
"_type": "NormalDistribution",
"id": "fbffd456-d17b-11e4-89ef-ef1c56e787d2",
"description": "Sample Normal Distribution",
"mean": 0.5,
"stddev": 0.4
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | NormalDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
mean | Float | |
stddev | Float | *restriction: stddev > 0 * |
Pareto
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "ParetoDistribution",
"description": "Sample Pareto Distribution",
"scale": 1.1,
"shape": 0.9
}
from analyzere import Distribution
distribution = Distribution(type='ParetoDistribution',
description = 'Sample Pareto Distribution',
scale=1.1,
shape=0.9).save()
using AnalyzeRe
using AnalyzeRe.Distributions
ParetoDistribution distribution = new ParetoDistribution()
distribution.description = "Sample Pareto Distribution";
distribution.scale = 1.1,
distribution.shape = 0.9
distribution = distribution.Save()
Response Body:
{
"_type": "ParetoDistribution",
"id": "fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a",
"description": "Sample Pareto Distribution",
"scale": 1.1,
"shape": 0.9
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | ParetoDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
shape | Float | restriction: shape > 0 |
scale | Float | restriction: scale > 0 |
Uniform
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "UniformDistribution",
"description": "Sample Uniform Distribution",
"lower": -3.14,
"upper": 15.92
}
from analyzere import Distribution
distribution = Distribution(type='UniformDistribution',
description = 'Sample Uniform Distribution',
lower=-3.14,
upper=15.92).save()
using AnalyzeRe
using AnalyzeRe.Distributions
UniformDistribution distribution = new UniformDistribution()
distribution.description = "Sample Uniform Distribution";
distribution.location = -3.14,
distribution.scale = 15.92
distribution = distribution.Save()
Response Body:
{
"_type": "UniformDistribution",
"id": "fed823b3-4722-41c2-8dff-441f1d6e7995",
"description": "Sample Uniform Distribution",
"lower": -3.14,
"upper": 15.92
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | UniformDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
lower | Float | the lower limit of the values to be generated |
upper | Float | the upper limit of the values to be generated |
Binomial Distributions
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "BinomialDistribution",
"description": "Sample Binomial Distribution",
"n": 3,
"p": 0.5
}
from analyzere import Distribution
distribution = Distribution(type='BinomialDistribution',
description = 'Sample Binomial Distribution',
n=3,
p=0.5).save()
using AnalyzeRe
using AnalyzeRe.Distributions
BinomialDistribution distribution = new BinomialDistribution()
distribution.description = "Sample Binomial Distribution";
distribution.n = 3,
distribution.p = 0.5
distribution = distribution.Save()
Response Body:
{
"_type": "BinomialDistribution",
"id": "fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946",
"description": "Sample Binomial Distribution",
"n": 3,
"p": 0.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | BinomialDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
n | Int | restriction: n >= 0 |
p | Float | restriction: 1 >= n >=0 |
Negative Binomial Distributions
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "NegativeBinomialDistribution",
"description": "Sample Negative Binomial Distribution",
"r": 0.5,
"p": 2.5
}
from analyzere import Distribution
distribution = Distribution(type='NegativeBinomialDistribution',
description = 'Sample NegativeBinomial Distribution',
r=0.5,
p=0.554).save()
using AnalyzeRe
using AnalyzeRe.Distributions
NegativeBinomialDistribution distribution = new NegativeBinomialDistribution()
distribution.description = "Sample NegativeBinomial Distribution";
distribution.r = 0.5,
distribution.p = 2.5
distribution = distribution.Save()
Response Body:
{
"_type": "NegativeBinomialDistribution",
"id": "fd0c923a-d17b-11e4-b75e-8b7cd58144ea",
"description": "Sample Negative Binomial Distribution",
"r": 0.5,
"p": 2.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | NegativeBinomialDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
r | Float | restriction: r > 0 |
p | Float | restriction: 1 >= p >= 0 |
Poisson Distributions
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "PoissonDistribution",
"description": "Sample Distribution",
"mean": 0.5
}
from analyzere import Distribution
distribution = Distribution(type='PoissonDistribution',
description='Sample Poisson Distribution',
mean=0.5).save()
using AnalyzeRe
using AnalyzeRe.Distributions
LogNormalDistribution distribution = new PoissonDistribution()
distribution.description = "Sample Poisson Distribution";
distribution.mean = 0.5
distribution = distribution.Save()
Response Body:
{
"_type": "PoissonDistribution",
"id": "792fa4b8-d17e-11e4-adaf-3f7138acca95",
"description": "Sample Distribution",
"mean": 0.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | PoissonDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
mean | Float | restriction: mean >= 0 |
Uniform Int Distributions
POST /distributions/ HTTP/1.1
Host: api.analyzere.net
{
"_type": "UniformIntDistribution",
"description": "Sample Uniform Distribution",
"lower": -1,
"upper": 8
}
from analyzere import Distribution
distribution = Distribution(type='UniformIntDistribution',
description = 'Sample UniformInt Distribution',
lower=-1,
upper=8).save()
using AnalyzeRe
using AnalyzeRe.Distributions
LogNormalDistribution distribution = new UniformIntDistribution()
distribution.description = "Sample UniformInt Distribution";
distribution.lower = -1,
distribution.upper = 8
distribution = distribution.Save()
Response Body:
{
"_type": "UniformIntDistribution",
"id": "fd50b2da-d17b-11e4-ad85-8b1fe5d9c382",
"description": "Sample Uniform Distribution",
"lower": -1,
"upper": 8
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | UniformIntDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
lower | Int | the lower limit of the values to be generated |
upper | Int | the upper limit of the values to be generated |
Retrieve
Log Normal
GET /distributions/fb638678-d17b-11e4-9718-1f2d9349b4ad HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distribution = Distribution.retrieve('fb638678-d17b-11e4-9718-1f2d9349b4ad')
using AnalyzRe;
using AnalyzeRe.Distributions;
LogNormalDistribution distribution = API.Get<LogNormalDistribution>("fb638678-d17b-11e4-9718-1f2d9349b4ad");
Response Body:
{
"_type": "LogNormalDistribution",
"id": "fb638678-d17b-11e4-9718-1f2d9349b4ad",
"description": "Sample LogNormal Distribution",
"location": 0.5,
"stddev": 0.4
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Normal Distribution
GET /distributions/fbffd456-d17b-11e4-89ef-ef1c56e787d2 HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fbffd456-d17b-11e4-89ef-ef1c56e787d2')
using AnalyzRe;
using AnalyzeRe.Distributions;
NormalDistribution distribution = API.Get<NormalDistribution>("fbffd456-d17b-11e4-89ef-ef1c56e787d2");
Response Body:
{
"_type": "NormalDistribution",
"id": "fbffd456-d17b-11e4-89ef-ef1c56e787d2",
"description": "Sample Normal Distribution",
"mean": 0.5,
"stddev": 0.4
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Pareto
GET /distributions/fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a')
using AnalyzRe;
using AnalyzeRe.Distributions;
ParetoDistribution distribution = API.Get<ParetoDistribution>("fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a");
Response Body:
{
"_type": "ParetoDistribution",
"id": "fc4b738e-d17b-11e4-81bc-a3fcd1c2bc0a",
"description": "Sample Pareto Distribution",
"scale": 1.1,
"shape": 0.9
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Uniform
GET /distributions/fed823b3-4722-41c2-8dff-441f1d6e7995 HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fed823b3-4722-41c2-8dff-441f1d6e7995')
using AnalyzRe;
using AnalyzeRe.Distributions;
UniforDistribution distribution = API.Get<UniformDistribution>("fed823b3-4722-41c2-8dff-441f1d6e7995");
Response Body:
{
"_type": "UniformDistribution",
"id": "fed823b3-4722-41c2-8dff-441f1d6e7995",
"description": "Sample Uniform Distribution",
"lower": -3.14,
"upper": 15.92
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Binomial Distributions
GET /distributions/fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946 HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946')
using AnalyzRe;
using AnalyzeRe.Distributions;
BinomialDistribution distribution = API.Get<BinomialDistribution>("fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946");
Response Body:
{
"_type": "BinomialDistribution",
"id": "fc8af6b2-d17b-11e4-bf9f-9b1c2cef3946",
"description": "Sample Binomial Distribution",
"n": 3,
"p": 0.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Negative Binomial Distributions
GET /distributions/fd0c923a-d17b-11e4-b75e-8b7cd58144ea HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fd0c923a-d17b-11e4-b75e-8b7cd58144ea')
using AnalyzRe;
using AnalyzeRe.Distributions;
NegativeBinomialDistribution distribution = API.Get<NegativeBinomialDistribution>("fd0c923a-d17b-11e4-b75e-8b7cd58144ea");
Response Body:
{
"_type": "NegativeBinomialDistribution",
"id": "fd0c923a-d17b-11e4-b75e-8b7cd58144ea",
"description": "Sample Negative Binomial Distribution",
"r": 0.5,
"p": 2.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Poisson Distributions
GET /distributions/792fa4b8-d17e-11e4-adaf-3f7138acca95 HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('792fa4b8-d17e-11e4-adaf-3f7138acca95')
using AnalyzRe;
using AnalyzeRe.Distributions;
PoissonDistribution distribution = API.Get<PoissonDistribution>("792fa4b8-d17e-11e4-adaf-3f7138acca95");
Response Body:
{
"_type": "PoissonDistribution",
"id": "792fa4b8-d17e-11e4-adaf-3f7138acca95",
"description": "Sample Distribution",
"mean": 0.5
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Uniform Int Distributions
GET /distributions/fd50b2da-d17b-11e4-ad85-8b1fe5d9c382 HTTP/1.1
Host: api.analyzere.net
from analyzere import
distribution = Distribution.retrieve('fd50b2da-d17b-11e4-ad85-8b1fe5d9c382')
using AnalyzRe;
using AnalyzeRe.Distributions;
UniformIntDistribution distribution = API.Get<UniformIntDistribution>("fd50b2da-d17b-11e4-ad85-8b1fe5d9c382");
Response Body:
{
"_type": "UniformIntDistribution",
"id": "fd50b2da-d17b-11e4-ad85-8b1fe5d9c382",
"description": "Sample Uniform Distribution",
"lower": -1,
"upper": 8
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Custom Distributions
Custom distributions allow users to specify a distribution that is not covered by any of the parameterized distributions.
When using Distributions to define a non-modeled loss source, the PRIME platform provides four types of custom distributions:
- Frequency Distributions
- Severity Distributions
- Seasonality Distributions
- Dirac Distributions
Define
Frequency Distributions
{
"_type": "CustomFrequencyDistribution",
"id": "001b4f59-ff6a-4bed-8c3d-dd20c1f5f777",
"description": "custom frequency distribution"
}
Custom frequency distributions are discrete distributions that are used to define the number of events that occur in a trial(year) during a simulation.
When defining a Custom Frequency Distribution, users provide a csv file that describes the distribution. Custom Frequency Distribution files must have a “Probability” and “Frequency” column.
The following sample csv file defines a frequency distribution with 5 equally possible frequency values:
Probability | Frequency |
---|---|
0.2 | 2 |
0.2 | 1 |
0.2 | 0 |
0.2 | 3 |
0.2 | 4 |
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | CustomFrequencyDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Severity Distributions
{
"id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
"_type": "CustomSeverityDistribution",
"created": "2018-03-12T21:29:14.817737Z",
"modified": "2018-03-12T21:29:14.817737Z",
"max_val": 5000000.0,
"mean_val": 3250000.0,
"min_val": 1000000.0,
"modulo": null,
"data": {
"href": "https://api.analyzere.net/files/9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7",
"ref_id": "9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7"
},
"interpolate": false,
"status": "processing_succeeded",
"status_message": null,
"meta_data": {
"Key3": 3.14,
"Key2": 1,
"Key1": "string",
"Key5": true
},
"description": "custom severity distribution"
}
Custom severity distributions are continuous distributions that are used to define the severity of the events that occur in a trial(year) during a simulation.
When defining a Custom Severity Distribution, users can discretize the curve and save the values in a csv file for upload to the PRIME server. Custom Severity Distribution files must have a “Probability” and “Loss” column.
The following sample csv file defines a severity distribution that has 4 possible loss values, three of which have equal probability, and the last loss has double the first three:
Probability | Loss |
---|---|
0.2 | 1000000 |
0.2 | 5000000 |
0.2 | 3000000 |
0.4 | 4000000 |
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | CustomSeverityDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Seasonality Distributions
{
"_type": "CustomSeasonalityDistribution",
"id": "fb513cf1-9fae-44aa-bcd0-7d2758890735",
"description": "custom seasonality distribution"
}
Custom Seasonality Distributions are used to define when during the trial(year) that the events occur. Custom Seasonality Distribution files must contain a “Probability” and “Day” column.
The following sample csv file defines a seasonality distribution where all events occur on the last day of the year:
Probability | Day |
---|---|
1.0 | 365 |
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | CustomSeasonalityDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Dirac Distributions
{
"_type": "DiracDistribution",
"id": "1dfd833a-d18d-11e4-a353-b3679f390f23",
"description": "Sample Dirac Distribution",
"value": 3.14
}
Dirac distributions are a special type of custom distribution that can be used in place of any type of distribution (discrete or continuous). Dirac distributions return a constant value.
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
_type | Type | DiracDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
value | Float | the singular value to return |
Create
Frequency Distributions
POST /distributions HTTP/1.1
Host: api.analyzere.net
{
"_type": "CustomFrequencyDistribution",
"description": "Custom Frequency Distribution"
}
from analyzere import Distribution
distribution = Distribution(type='CustomFrequencyDistribution',
description='Custom Frequency Distribution').save()
// Upload data
with open('CustomFrequencyData.csv', 'rb') as distribution_data:
distribution.upload_data(distribution_data)
using Analyzere;
using AnalyzRe.Distributions;
CustomFrequencyDistribution distribution = new CustomFrequencyDistribution();
distribution.description = "Custom Frequency Distribution";
distribution = distribution.Save();
// Upload data
distribution.data.LargeFileUpload("CustomFrequencyData.csv");
Response Body:
{
"_type": "CustomFrequencyDistribution",
"id": "001b4f59-ff6a-4bed-8c3d-dd20c1f5f777",
"description": "Custom Frequency Distribution"
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | CustomFrequencyDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Severity Distributions
POST /distributions HTTP/1.1
Host: api.analyzere.net
{
"_type": "CustomSeverityDistribution",
"description": "Custom Severity Distribution"
}
from analyzere import Distribution
distribution = Distribution(type='CustomSeverityDistribution',
description = 'Custom Severity Distribution').save()
// Upload data
with open('CustomSeverityData.csv', 'rb') as distribution_data:
distribution.upload_file(distribution_data)
using Analyzere;
using AnalyzRe.Distributions;
CustomSeverityDistribution distribution = new CustomSeverityDistribution();
distribution.description = "Custom Severity Distribution";
distribution = distribution.Save();
// Upload data
distribution.data.LargeFileUpload("CustomSeverityData.csv");
Response Body:
{
"id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
"_type": "CustomSeverityDistribution",
"created": "2018-03-12T21:29:14.817737Z",
"modified": "2018-03-12T21:29:14.817737Z",
"max_val": 5000000.0,
"mean_val": 3250000.0,
"min_val": 1000000.0,
"modulo": null,
"data": {
"href": "https://api.analyzere.net/files/9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7",
"ref_id": "9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7"
},
"interpolate": false,
"status": "processing_succeeded",
"status_message": null,
"meta_data": {
"Key3": 3.14,
"Key2": 1,
"Key1": "string",
"Key5": true
},
"description": "custom severity distribution"
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | CustomSeverityDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Seasonality Distributions
POST /distributions HTTP/1.1
Host: api.analyzere.net
{
"_type": "CustomSeasonalityDistribution",
"description": "Custom Seasonality Distribution"
}
from analyzere import Distribution
distribution = Distribution(type='CustomSeasonalityDistribution',
description = 'Custom Seasonality Distribution').save()
// Upload data
with open('CustomSeasonalityData.csv', 'rb') as distribution_data:
distribution.upload_file(distribution_data)
using Analyzere;
using AnalyzRe.Distributions;
CustomSeasonalityDistribution distribution = new CustomSeasonalityDistribution();
distribution.description = "Custom Seasonality Distribution";
distribution = distribution.Save();
// Upload data
distribution.data.LargeFileUpload("CustomSeasonalityData.csv");
Response Body:
{
"_type": "CustomSeasonalityDistribution",
"id": "fb513cf1-9fae-44aa-bcd0-7d2758890735",
"description": "custom seasonality distribution"
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | CustomSeasonalityDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
interpolate | bool | flag that indicates if interpolation between values should be performed |
Dirac Distributions
POST /distributions HTTP/1.1
Host: api.analyzere.net
{
"_type": "DiracDistribution",
"description": "Sample Dirac Distribution",
"value": 3.14
}
from analyzere import Distribution
distribution = Distribution(type='DiracDistribution',
description='Sample Dirac Distribution',
value = 3.14).save()
using Analyzere;
using AnalyzRe.Distributions;
DiracDistribution distribution = new DiracDistribution();
distribution.description = "Sample Dirac Distribution";
distribution.value = 3.14;
distribution = distribution.Save();
Response Body:
{
"_type": "DiracDistribution",
"id": "1dfd833a-d18d-11e4-a353-b3679f390f23",
"description": "Sample Dirac Distribution",
"value": 3.14
}
Arguments
Name | Type | Description |
---|---|---|
_type | Type | DiracDistribution |
description | string | a short description of the Distribution |
modulo | Float | a numeric flag that when set indicates that the distribution should be wrapped modulo the given value |
value | Float | the singular value to return |
Retrieve
Frequency Distributions
GET /distributions/001b4f59-ff6a-4bed-8c3d-dd20c1f5f777 HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distribution = Distribution.retrieve('001b4f59-ff6a-4bed-8c3d-dd20c1f5f777')
using AnalyzeRe;
using AnalyzeRe.Distributions;
CustomFrequencyDistribution distribution = API.Get<CustomFrequencyDistribution>("001b4f59-ff6a-4bed-8c3d-dd20c1f5f777");
Response Body:
{
"_type": "CustomFrequencyDistribution",
"id": "001b4f59-ff6a-4bed-8c3d-dd20c1f5f777",
"description": "custom frequency distribution"
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Severity Distributions
GET /distributions/0e377cca-54a8-48a9-9a83-aaddb7f05691 HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distribution = Distribution.retrieve('0e377cca-54a8-48a9-9a83-aaddb7f05691')
using AnalyzeRe;
using AnalyzeRe.Distributions;
CustomSeverityDistribution distribution = API.Get<CustomSeverityDistribution>("0e377cca-54a8-48a9-9a83-aaddb7f05691");
Response Body:
{
"id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
"_type": "CustomSeverityDistribution",
"created": "2018-03-12T21:29:14.817737Z",
"modified": "2018-03-12T21:29:14.817737Z",
"max_val": 5000000.0,
"mean_val": 3250000.0,
"min_val": 1000000.0,
"modulo": null,
"data": {
"href": "https://api.analyzere.net/files/9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7",
"ref_id": "9a83bbbb-3131-4c3b-8c5a-a895fa9a1ba7"
},
"interpolate": false,
"status": "processing_succeeded",
"status_message": null,
"meta_data": {
"Key3": 3.14,
"Key2": 1,
"Key1": "string",
"Key5": true
},
"description": "custom severity distribution"
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Seasonality Distributions
GET /distributions/fb513cf1-9fae-44aa-bcd0-7d2758890735 HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distribution = Distribution.retrieve('fb513cf1-9fae-44aa-bcd0-7d2758890735')
using AnalyzeRe;
using AnalyzeRe.Distributions;
CustomSeasonalityDistribution distribution = API.Get<CustomSeasonalityDistribution>("fb513cf1-9fae-44aa-bcd0-7d2758890735");
Response Body:
{
"_type": "CustomSeasonalityDistribution",
"id": "fb513cf1-9fae-44aa-bcd0-7d2758890735",
"description": "custom seasonality distribution"
}
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Dirac Distributions
GET /distributions/1dfd833a-d18d-11e4-a353-b3679f390f23 HTTP/1.1
Host: api.analyzere.net
from analyzere import Distribution
distribution = Distribution.retrieve('1dfd833a-d18d-11e4-a353-b3679f390f23')
using AnalyzeRe;
using AnalyzeRe.Distributions;
DiracDistribution distribution = API.Get<DiracDistribution>("1dfd833a-d18d-11e4-a353-b3679f390f23");
Response Body:
{
"_type": "DiracDistribution",
"id": "1dfd833a-d18d-11e4-a353-b3679f390f23",
"description": "Sample Dirac Distribution",
"value": 3.14
}
Dirac distributions are a special type of custom distribution that can be used in place of any type of distribution (discrete or continuous). Dirac distributions return a constant value.
Arguments
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
Loss Sets
Loss Set Class | Description |
---|---|
ELT Loss Set | Loss set defined by an event loss table. |
YELT Loss Set | Loss set defined by a year event loss table, this gives an aggregate loss for each event for the given year. |
YLT Loss Set | Loss set defined by a year loss table, this gives an aggregate loss for all events in a particular year. |
Parametric Loss Set | Loss set defined by distributions which describe the frequency, severity and seasonality of the losses. |
Loaded Loss Set | Loss set whose losses are computed by applying a constant load multiplier to all losses generated by some source loss set. |
QCLS Loss Set | Quantile-based Correlated Loss-Sampling Loss Sets are specialy loss sets that allow independent loss sets with parametrically defined severity distributions to be partially-correlated with one-another using a shared stochastic simulation. |
Embedded Objects
Loss Set Profile
Loss set profile example:
{
"min_loss": {
"value": 385.2279667181169,
"currency": "USD"
},
"avg_annual_loss": {
"value": 709291754.0985539,
"currency": "USD"
},
"max_loss": {
"value": 486818651.1494909,
"currency": "USD"
},
"num_losses": 10000,
"non_zero_losses": 10000,
"attributes": {
"Region": ["US"],
"Peril": ["HU"]
}
}
When loss sets are uploaded to PRIME server, a profile of the losses is created and associated with the Loss Set whenever possible. This profile is returned by the server as part of the original POST
and any subsequent GET
s on the Loss Set. The profile includes:
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
currency | string | optional | The 3-character currency code for the currency of the losses in this loss set. |
min_loss | float | optional | Minimum loss. |
max_loss | float | optional | Maximum loss. |
avg_annual_loss | float | optional | Average annual loss. |
num_losses | number | optional | Total number of losses. |
non_zero_losses | number | optional | The number of non-zero losses. |
attributes | object | optional | The attribute values that appear in this loss set (regions, perils, etc.) |
All loss sets share a common base which has the following attributes:
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal one of “ELTLossSet”, “YELTLossSet”, “YLTLossSet”, “ParametricLossSet” (in special cases, may also include “QCLSLossSet”, “LoadedLossSet”, “PortfolioLossSet”, “TreatyLossSet”, or “NestedLayerLossSet”). |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross” for all but YLTLossSet, whose default is “LossNetOfAggregateTerms”). |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
created | datetime | The time the loss set was first posted to the server. |
modified | datetime | The time the loss set was last modified, or completed validation. |
profile | LossSetProfile | A profile of this loss set, generated by the server. |
Definition
ELT Loss Set
{
"_type": "ELTLossSet",
"id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"description": "ELT loss set example.",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"currency": "USD",
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 1000000.000000000000000,
"avg_annual_loss": 1400000.000000000000000,
"max_loss": 1500000.000000000000000,
"num_losses": 12004,
"non_zero_losses": 12004,
"attributes": {
"Region": ["US", "EU"],
"Peril": ["HU", "EQ", "FF"]
}
}
}
ELT loss sets are used to describe losses with an event loss table (ELT), which defines the loss associated with each event. ELT loss sets also support secondary uncertainty. To enable secondary uncertainty the user must provide the independent and correlated standard deviations as well as the exposure for each event in the loss set.
When defining an ELT loss set, users provide a CSV file that describes the ELT. The CSV file must have columns “EventID” and “Loss”. Optionally for secondary uncertainty the following columns are required: “StdDevIndp”, “StdDevCorr” and “Exposure”.
The following sample CSV file defines an ELT:
EventID | Loss | StdDevIndp* | StdDevCorr* | Exposure* |
---|---|---|---|---|
100 | 1000000 | 0.0 | 0.0 | 0.0 |
200 | 1500000 | 0.0 | 0.0 | 1.0 |
300 | 1000000 | 0.0 | 1.0 | 0.0 |
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal “ELTLossSet”. |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
currency | string | The 3-character currency code for the currency of the losses in this loss set. |
event_catalogs | list(EventCatalog) | The list of event catalogs for the loss set (Note: Only a single event catalog is supported at this time.). |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”). |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
data_file | reference | A reference to the data attached to this resource. This field will automatically be created if you initiate an upload using the data property, or this can be set to reference an existing file on the server to immediately initiate the commit phase of this resource. |
status | string | The upload or processing status of this loss set. |
status_message | string | If the loss set fails upload or validation, contains a detailed error message |
profile | LossSetProfile | A profile of this loss set, generated by the server. |
YELT Loss Set
{
"id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
"_type": "YELTLossSet",
"created": "2017-11-02T12:37:59.698215Z",
"modified": "2017-11-02T12:37:59.698215Z",
"loss_type": "LossGross",
"profile": {
"currency": "USD",
"attributes": {},
"min_loss": null,
"avg_annual_loss": null,
"max_loss": null,
"num_losses": null,
"non_zero_losses": null
},
"currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/30eee44b-fee7-46b3-a3f6-6e3e70b9287b",
"ref_id": "30eee44b-fee7-46b3-a3f6-6e3e70b9287b"
},
"data_type": "csv",
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"reinstatements_data_type": "percentage",
"start_date": "2017-01-01T00:00:00Z",
"status": "ready",
"status_message": null,
"trial_count": 100000,
"one_based_sequencing": false,
"adjust_leap_years": false,
"description": "YELT loss set example."
}
YELT loss sets are used to describe losses with a year event loss table (YELT), which defines the loss for each year (or trial) in the simulation broken down on a per loss basis.
When defining a YELT loss set, users provide a CSV file that describes the YELT. The CSV file must have columns “TrialID”, “EventID”, “Loss” and “Sequence”. Not every trial needs to have an entry in the table, however the trial id cannot be greater than the supplied trial_count
. Any trials missing from the table are assumed to have zero losses for that year.
For information regarding start_date
and sequence
values of YELT, refer the blue highlighted section in Simulations.
The following sample CSV file defines an YELT:
TrialID | EventID | Loss | Sequence |
---|---|---|---|
3 | 400 | 300000.0 | 1.0 |
3 | 200 | 300000.0 | 2.0 |
4 | 300 | 300000.0 | 1.0 |
4 | 300 | 300000.0 | 2.0 |
4 | 100 | 400000.0 | 3.0 |
4 | 100 | 300000.0 | 4.0 |
7 | 500 | 300000.0 | 1.0 |
7 | 100 | 400000.0 | 2.0 |
9 | 100 | 300000.0 | 1.0 |
9 | 100 | 400000.0 | 2.0 |
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal “YELTLossSet”. |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
currency | string | The 3-character currency code for the currency of the losses in this loss set. |
trial_count | number | The number of trials used to create the YELT uploaded with the loss set. |
start_date | datetime | The date and time represented by a sequence value of 0 in the YELT data. |
reinstatements_data_type | string | Dictates whether any reinstatement information associated with the loss set should be interpreted as a fixed dollar amount. (ReinstatementsDataType.currency) or as a percentage of the premium of the layer this loss set gets attached to (ReinstatementsDataType.percentage). Note that YELT data can only contain reinstatements if the loss_type is “LossNetOfAggregateTerms” |
event_catalogs | list(EventCatalog) | The list of event catalogs for the loss set (Note: Only a single event catalog is supported at this time.). |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”). |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
data_file | reference | A reference to the data attached to this resource. This field will automatically be created if you initiate an upload using the data property, or this can be set to reference an existing file on the server to immediately initiate the commit phase of this resource. |
status | string | The upload or processing status of this loss set. |
status_message | string | If the loss set fails upload or validation, contains a detailed error message |
profile | LossSetProfile | A profile of this loss set, generated by the server. |
one_based_sequencing | bool | Default value is false. Set this flag to true if your loss sequence values begin at 1 (rather than 0), where 1 represents the beginning of the trial/year. |
adjust_leap_years | bool | Default value is false. Set this flag to true if your loss sequence values do not account for leap years. |
YLT Loss Set
{
"_type": "YLTLossSet",
"id": "bee44c4c-7555-4327-b74f-25c97c1d175c",
"description": "YLT loss set example.",
"start_date": "2017-01-01T00:00:00Z",
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "HU"
},
"loss_type": "LossNetOfAggregateTerms",
"trial_count": 100000
}
YLT loss sets are used to describe losses with a year loss table (YLT), which defines a single loss for each year (or trial) in the simulation.
When defining a YLT loss set, users provide a CSV file that describes the YLT. The CSV file must have columns “TrialID” and “Loss”. Not every trial needs to have an entry in the table, however the trial id cannot be greater than the supplied trial_count
. Any trials missing from the table are assumed to have zero losses for that year.
The following sample CSV file defines an YLT:
TrialID | Loss |
---|---|
3 | 300000.0 |
4 | 300000.0 |
7 | 300000.0 |
9 | 300000.0 |
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal “YLTLossSet”. |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
currency | string | The 3-character currency code for the currency of the losses in this loss set. |
trial_count | number | The number of trials used to create the YLT uploaded with the loss set. |
start_date | datetime | The date and time represented by a sequence value of 0 in the YLT data. |
reinstatements_data_type | string | Dictates whether any reinstatement information associated with the loss set should be interpreted as a fixed dollar amount. (ReinstatementsDataType.currency) or as a percentage of the premium of the layer this loss set gets attached to (ReinstatementsDataType.percentage). Note that YLT data can only contain reinstatements if the loss_type is “LossNetOfAggregateTerms” |
attributes | object | A raw dictionary of the LossAttributes associated with events generated by the loss set. |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”). |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
data_file | reference | A reference to the data attached to this resource. This field will automatically be created if you initiate an upload using the data property, or this can be set to reference an existing file on the server to immediately initiate the commit phase of this resource. |
status | string | The upload or processing status of this loss set. |
status_message | string | If the loss set fails upload or validation, contains a detailed error message |
profile | LossSetProfile | A profile of this loss set, generated by the server. |
Parametric Loss Set
{
"_type": "ParametricLossSet",
"id": "1baed37d-1f2d-417d-ac76-de9b1e39e2b5",
"description": "Parametric loss set example",
"frequency": {
"ref_type": "PoissonDistribution",
"href": "https://api.analyzere.net/distributions/3b1ed207-1e14-491e-9d38-a040346e2799",
"ref_id": "3b1ed207-1e14-491e-9d38-a040346e2799"
},
"severity": {
"ref_type": "ParetoDistribution",
"href": "https://api.analyzere.net/distributions/f3147df2-2508-40a2-931a-d5aeef8f3ea5",
"ref_id": "f3147df2-2508-40a2-931a-d5aeef8f3ea5"
},
"seasonality": {
"ref_type": "UniformDistribution",
"href": "https://api.analyzere.net/distributions/ebf7bfb6-0074-4910-bab1-050322af0001",
"ref_id": "ebf7bfb6-0074-4910-bab1-050322af0001"
},
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "VL"
},
"loss_type": "LossGross"
}
Parametric loss sets provide a way of describing losses using distributions, this allows losses to be modelled when models are not available from model vendors such as AIR or RMS.
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal “ParametricLossSet”. |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
currency | string | The 3-character currency code for the currency of the losses in this loss set. |
event_id | int64 | Optional event id that will be associated with all occurrences generated. |
frequency | ref(Distribution) | A reference to a distribution which describes the frequency of the events per trail. Valid distributions include any discrete distribution, a dirac distribution or a custom frequency distribution. |
severity | ref(Distribution) | A reference to a distribution which the loss for each event in a trial is sampled from. Valid distributions include any continuous distribution, a dirac distribution or a custom severity distribution. |
seasonality | ref(Distribution) | A reference to a distribution which describes the seasonality of the events for a trial. Valid distributions include any continuous distribution, a dirac distribution or a custom seasonality distribution. |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”). |
attributes | object | A raw dictionary of the LossAttributes associated with events generated by the loss set. |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
profile | LossSetProfile | A profile of this loss set, generated by the server. |
Loaded Loss Set
{
"_type": "LoadedLossSet",
"id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"description": "Loaded loss set example.",
"load": 1.2,
"source" : {
"ref_type": "ELTLossSet",
"href": "http://api.analyzere.net/loss_sets/b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"ref_id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87"
},
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 0.0,
"avg_annual_loss": 1680000.0,
"max_loss": 1800000.0,
"num_losses": 82401,
"non_zero_losses": 23123,
"attributes": {
"Region": ["US"],
"Peril": ["HU", "EQ"]
}
}
}
Loaded loss sets are special kind of loss set used to apply a loading factor to an existing LossSet. The ‘source’ LossSet must exist and all associated loss data uploaded to the server.
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | Must equal “LoadedLossSet”. |
id | string | A server-generated UUID. |
description | string | A user description of the loss set. |
source | LossSet | The source LossSet that provides the losses to be “loaded”. |
load | double | A constant load factor by which to multiply all losses emitted by the source loss_set. |
loss_type | string | The type of losses in the loss set. Valid values include: “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: the loss_type from the source LossSet). |
meta_data | dictionary | Custom metadata that can be used to search for loss sets. |
profile | LossSetProfile | A profile of this loss set, generated by the server. This represents a copy of the source loss set’s profile with the load applied. |
Create
ELT Loss Set
from analyzere import LossSet, EventCatalog
event_catalog = EventCatalog.retrieve('e02b0ace-96a5-47f8-a90e-c0960485f38e')
loss_set = LossSet(type='ELTLossSet',
description='ELT loss set example.',
event_catalogs=[event_catalog],
currency='USD',
loss_type='LossGross').save()
with open('elt.csv', 'rb') as elt:
loss_set.upload_data(elt)
using AnalyzeRe;
using AnalyzeRe.LossSets;
ELTLossSet loss_set = new ELTLossSet
{
description = "ELT loss set example.",
currency = "USD",
event_catalogs = new List<IReference<EventCatalog>> {
new Reference<EventCatalog>("e02b0ace-96a5-47f8-a90e-c0960485f38e") }
}.Post();
loss_set.data.LargeFileUpload("elt.csv");
POST /loss_sets HTTP/1.1
Host: api.analyzere.net
{
"_type": "ELTLossSet",
"description": "ELT loss set example.",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"currency": "USD"
}
Response Body:
{
"_type": "ELTLossSet",
"id": "991986fc-a2d4-4464-9fe1-3ca2e59bcd1b",
"description": "ELT loss set example.",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"currency": "USD",
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 132340.0,
"avg_annual_loss": 4358274.0,
"max_loss": 12435443.0,
"num_losses": 15774,
"non_zero_losses" : 15774,
"attributes": {
"Region" : ["US"],
"Peril": ["HU"]
}
}
}
Name | Traits | Description |
---|---|---|
_type | required | ELTLossSet |
description | required | |
currency | required | |
event_catalogs | required | |
loss_type | optional | |
meta_data | optional |
YELT Loss Set
from analyzere import EventCatalog, LossSet
from datetime import datetime, timezone
event_catalog = EventCatalog.retrieve('e02b0ace-96a5-47f8-a90e-c0960485f38e')
loss_set = LossSet(type='YELTLossSet',
description='YELT loss set example.',
event_catalogs=[event_catalog],
start_date=datetime(2017, 1, 1, tzinfo=timezone.utc),
currency='USD',
loss_type='LossNetOfAggregateTerms',
trial_count=100000).save()
with open('yelt.csv') as yelt:
loss_set.upload_data(yelt)
using AnalyzeRe;
using AnalyzeRe.LossSets;
YELTLossSet loss_set = new YELTLossSet
{
description = "YELT loss set example.",
currency = "USD",
trial_count = 100000,
event_catalogs = new List<IReference<EventCatalog>>
{
new Reference<EventCatalog>("e02b0ace-96a5-47f8-a90e-c0960485f38e")
}
}.Post();
loss_set.data.LargeFileUpload("yelt.csv");
POST /loss_sets HTTP/1.1
Host: api.analyzere.net
{
"_type": "YELTLossSet",
"description": "YELT loss set example.",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"currency": "USD",
"trial_count": 100000
}
Response Body:
{
"id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
"_type": "YELTLossSet",
"created": "2017-11-02T12:37:59.698215Z",
"modified": "2017-11-02T12:37:59.698215Z",
"loss_type": "LossGross",
"profile": {
"currency": "USD",
"attributes": {},
"min_loss": null,
"avg_annual_loss": null,
"max_loss": null,
"num_losses": null,
"non_zero_losses": null
},
"currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/30eee44b-fee7-46b3-a3f6-6e3e70b9287b",
"ref_id": "30eee44b-fee7-46b3-a3f6-6e3e70b9287b"
},
"data_type": "csv",
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"reinstatements_data_type": "percentage",
"start_date": "2017-01-01T00:00:00Z",
"status": "ready",
"status_message": null,
"trial_count": 100000,
"description": "YELT loss set example."
}
Name | Traits | Description |
---|---|---|
_type | required | YELTLossSet |
description | required | |
currency | required | |
event_catalogs | required | |
trial_count | required | |
start_date | required | |
loss_type | optional | |
reinstatements_data_type | optional | |
meta_data | optional |
YLT Loss Set
from analyzere import LossSet
from datetime import datetime
loss_set = LossSet(type='YLTLossSet',
description='YLT loss set example.',
currency='USD',
start_date=datetime(2017, 1, 1),
attributes={'Region': 'US', 'Peril': 'HU'},
trial_count=100000,
loss_type='LossNetOfAggregateTerms').save()
with open('ylt.csv') as ylt:
loss_set.upload_data(ylt)
YLTLossSet loss_set = new YLTLossSet
{
description = "YLT loss set example.",
currency = "USD",
trial_count = 100000,
start_date = new DateTime(2019, 1, 1, 0, 0, 0, DateTimeKind.Utc),
attributes = new Dictionary<string, string> { { "Region", "US" }, { "Peril", "HU" } }
}.Post();
loss_set.data.LargeFileUpload("ylt.csv");
POST /loss_sets HTTP/1.1
Host: api.analyzere.net
{
"_type": "YLTLossSet",
"description": "YLT loss set example.",
"sequence": 0.0,
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "HU"
},
"trial_count": 100000
}
Response Body:
{
"_type": "YLTLossSet",
"id": "bee44c4c-7555-4327-b74f-25c97c1d175c",
"description": "YLT loss set example.",
"sequence": 0.0,
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "HU"
},
"loss_type": "LossNetOfAggregateTerms",
"trial_count": 100000,
"profile": {
"currency" : "USD",
"min_loss": 0.0,
"avg_annual_loss": 2333443.0,
"max_loss": 47234883.0,
"num_losses": 100000,
"non_zero_losses" : 24402,
"attributes": {
"Region": ["US"],
"Peril": ["HU"]
}
}
}
Name | Traits | Description |
---|---|---|
_type | required | YLTLossSet |
description | required | |
currency | required | |
trial_count | required | |
start_date | required | |
loss_type | optional | |
reinstatements_data_type | optional | |
meta_data | optional |
Parametric Loss Set
from analyzere import Distribution, LossSet
from datetime import datetime
frequency_dist = Distribution.retrieve('3b1ed207-1e14-491e-9d38-a040346e2799')
severity_dist = Distribution.retrieve('f3147df2-2508-40a2-931a-d5aeef8f3ea5')
seasonality_dist = Distribution.retrieve('ebf7bfb6-0074-4910-bab1-050322af0001')
loss_set = LossSet(type='ParametricLossSet',
description='Parametric loss set example',
frequency=frequency_dist,
severity=severity_dist,
seasonality=seasonality_dist,
currency='USD',
start_date=datetime(2017,1,1),
attributes={'Region': 'US', 'Peril': 'VL'}).save()
using AnalyzeRe;
using AnalyzeRe.Distributions;
using AnalyzeRe.LossSets;
ParametricLossSet loss_set = new ParametricLossSet
{
description = "Parametric loss set example.",
currency = "USD",
frequency = new Reference<IDiscreteDistribution>("3b1ed207-1e14-491e-9d38-a040346e2799"),
severity = new Reference<IContinuousDistribution>("f3147df2-2508-40a2-931a-d5aeef8f3ea5"),
seasonality = new Reference<IContinuousDistribution>("ebf7bfb6-0074-4910-bab1-050322af0001"),
attributes = new Dictionary<string, string>
{
{ "Region", "US" },
{ "Peril", "VL" }
}
}.Post();
POST /loss_sets HTTP/1.1
Host: api.analyzere.net
{
"_type": "ParametricLossSet",
"description": "Parametric loss set example",
"frequency": {
"ref_type": "PoissonDistribution",
"ref_id": "3b1ed207-1e14-491e-9d38-a040346e2799"
},
"severity": {
"ref_type": "ParetoDistribution",
"ref_id": "f3147df2-2508-40a2-931a-d5aeef8f3ea5"
},
"seasonality": {
"ref_type": "UniformDistribution",
"ref_id": "ebf7bfb6-0074-4910-bab1-050322af0001"
},
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "VL"
}
}
Response Body:
{
"_type": "ParametricLossSet",
"id": "1baed37d-1f2d-417d-ac76-de9b1e39e2b5",
"description": "Parametric loss set example",
"frequency": {
"ref_type": "PoissonDistribution",
"href": "https://api.analyzere.net/distributions/3b1ed207-1e14-491e-9d38-a040346e2799",
"ref_id": "3b1ed207-1e14-491e-9d38-a040346e2799"
},
"severity": {
"ref_type": "ParetoDistribution",
"href": "https://api.analyzere.net/distributions/f3147df2-2508-40a2-931a-d5aeef8f3ea5",
"ref_id": "f3147df2-2508-40a2-931a-d5aeef8f3ea5"
},
"seasonality": {
"ref_type": "UniformDistribution",
"href": "https://api.analyzere.net/distributions/ebf7bfb6-0074-4910-bab1-050322af0001",
"ref_id": "ebf7bfb6-0074-4910-bab1-050322af0001"
},
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "VL"
},
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 0.0,
"avg_annual_loss": 10030230.0,
"max_loss": 53433230.0,
"num_losses": 1423,
"non_zero_losses" : 1423,
"attributes": {
"Region": ["US"],
"Peril": ["VL"]
}
}
}
Name | Traits | Description |
---|---|---|
_type | string | ParametricLossSet |
description | required | |
currency | required | |
frequency | required | |
severity | required | |
seasonality | required | |
start_date | required | |
event_id | optional | |
attributes | optional | |
loss_type | optional | |
meta_data | optional |
Loaded Loss Set
from analyzere import LossSet
loss_set = LossSet(type='LoadedLossSet',
description = 'Loaded loss set example.',
source=LossSet.retrieve('b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87'),
load=1.2).save()
using AnalyzeRe;
using AnalyzeRe.LossSets;
LoadedLossSet loss_set = new LoadedLossSet();
loss_set.description = "Loaded loss set example.";
loss_set.source = new Reference<ELTLossSet>("b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87");
loss_set.load = 1.2;
loss_set = loss_set.Save();
POST /loss_sets HTTP/1.1
Host: api.analyzere.net
{
"_type": "LoadedLossSet",
"description": "Loaded loss set example.",
"load" : 1.2,
"source" : {
"ref_type": "ELTLossSet",
"href": "http://api.analyzere.net/loss_sets/b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"ref_id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87"
}
}
Response Body:
{
"_type": "LoadedLossSet",
"id": "d27c7cac-0af5-11e5-a82c-571795139193",
"description": "Loaded loss set example.",
"source" : {
"ref_type": "ELTLossSet",
"href": "http://api.analyzere.net/loss_sets/b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"ref_id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87"
},
"load" : 1.2,
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 1200000.000000000000000,
"avg_annual_loss": 1680000.000000000000000,
"max_loss": 1800000.000000000000000,
"num_losses": 30000,
"non_zero_losses": 30000,
"attributes": {
"Region": ["US", "EU"],
"Peril": ["HU", "EQ", "FF"]
}
}
}
Name | Traits | Description |
---|---|---|
_type | required | LoadedLossSet |
description | required | |
source | required | |
load | required | |
profile | optional | |
loss_type | optional |
Retrieve
ELT Loss Set
from analyzere import LossSet
loss_set = LossSet.retrieve('991986fc-a2d4-4464-9fe1-3ca2e59bcd1b')
using AnalyzeRe;
using AnalyzeRe.LossSets;
ELTLossSet loss_set = API.Get<ELTLossSet>("991986fc-a2d4-4464-9fe1-3ca2e59bcd1b");
GET /loss_sets/991986fc-a2d4-4464-9fe1-3ca2e59bcd1b HTTP/1.1
Host: api.analyzere.net
Response Body:
{
"_type": "ELTLossSet",
"id": "991986fc-a2d4-4464-9fe1-3ca2e59bcd1b",
"description": "ELT loss set example.",
"event_catalogs": [
{
"ref_type": "EventCatalog",
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"currency": "USD",
"loss_type": "LossGross",
"profile": {
"currency": "USD",
"min_loss": 0.0,
"avg_annual_loss": 0.0,
"max_loss": 0.0,
"num_losses": 0,
"non_zero_losses" : 0,
"attributes": {
"Region" : ["US"],
"Peril": ["HU"]
}
}
}
Name | Traits | Description |
---|---|---|
id | required |
YELT Loss Set
from analyzere import LossSet
loss_set = LossSet.retrieve('59c6641b-65a7-4a7b-a113-1616470cac1b')
using AnalyzeRe;
using AnalyzeRe.LossSets;
YELTLossSet loss_set = API.Get<YELTLossSet>("59c6641b-65a7-4a7b-a113-1616470cac1b");
GET /loss_sets/59c6641b-65a7-4a7b-a113-1616470cac1b HTTP/1.1
Host: api.analyzere.net
Response Body:
{
"id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
"_type": "YELTLossSet",
"created": "2017-11-02T12:37:59.698215Z",
"modified": "2017-11-02T12:37:59.698215Z",
"loss_type": "LossGross",
"profile": {
"currency": "USD",
"attributes": {},
"min_loss": null,
"avg_annual_loss": null,
"max_loss": null,
"num_losses": null,
"non_zero_losses": null
},
"currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/30eee44b-fee7-46b3-a3f6-6e3e70b9287b",
"ref_id": "30eee44b-fee7-46b3-a3f6-6e3e70b9287b"
},
"data_type": "csv",
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"reinstatements_data_type": "percentage",
"start_date": "2017-01-01T00:00:00Z",
"status": "ready",
"status_message": null,
"trial_count": 100000,
"description": "YELT loss set example."
}
Name | Traits | Description |
---|---|---|
id | required |
YLT Loss Set
from analyzere import LossSet
loss_set = LossSet.retrieve('bee44c4c-7555-4327-b74f-25c97c1d175c')
using AnalyzeRe;
using AnalyzeRe.LossSets;
YLTLossSet loss_set = API.Get<YLTLossSet>("bee44c4c-7555-4327-b74f-25c97c1d175c");
GET /loss_sets/bee44c4c-7555-4327-b74f-25c97c1d175c HTTP/1.1
Host: api.analyzere.net
Response Body:
{
"_type": "YLTLossSet",
"id": "bee44c4c-7555-4327-b74f-25c97c1d175c",
"description": "YLT loss set example.",
"start_date": "2017-01-01T00:00:00Z",
"currency": "USD",
"attributes": {
"Region": "US",
"Peril": "HU"
},
"loss_type": "LossNetOfAggregateTerms",
"trial_count": 100000
}
Name | Traits | Description |
---|---|---|
id | required |
Loaded Loss Set
from analyzere import LossSet
loss_set = LossSet.retrieve('d27c7cac-0af5-11e5-a82c-571795139193')
using AnalyzeRe;
using AnalyzeRe.LossSets;
LoadedLossSet loss_set = API.Get<LoadedLossSet>("d27c7cac-0af5-11e5-a82c-571795139193");
GET /loss_sets/d27c7cac-0af5-11e5-a82c-571795139193 HTTP/1.1
Host: api.analyzere.net
Response Body:
{
"_type": "LoadedLossSet",
"id": "d27c7cac-0af5-11e5-a82c-571795139193",
"description": "Loaded loss set example.",
"load": 1.2,
"source" : {
"ref_type": "ELTLossSet",
"href": "http://api.analyzere.net/loss_sets/b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87",
"ref_id": "b4fbadc2-a3e9-4fc0-a818-99f2bb5acb87"
},
"load" : 1.2,
"loss_type": "LossGross",
"profile": {
"currency" : "USD",
"min_loss": 122.000000000000000,
"avg_annual_loss": 1680000.000000000000000,
"max_loss": 1800000.000000000000000,
"num_losses": 30000,
"non_zero_losses": 30000,
"attributes": {
"Region": ["US", "EU"],
"Peril": ["HU", "EQ", "FF"]
}
}
}
Name | Traits | Description |
---|---|---|
id | required |
List Loss Sets
GET /loss_sets?search=YELT&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import LossSet
loss_sets = LossSet.list(search='YELT',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<LossSet> lossSets = API.SearchResourceList<LossSet>(
"YELT", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
"_type": "YELTLossSet",
"created": "2017-11-02T12:37:59.698215Z",
"modified": "2017-11-02T12:37:59.698215Z",
"loss_type": "LossGross",
"profile": {
"currency": "USD",
"attributes": {},
"min_loss": null,
"avg_annual_loss": null,
"max_loss": null,
"num_losses": null,
"non_zero_losses": null
},
"currency": "USD",
"data": {
"href": "https://api.analyzere.net/files/30eee44b-fee7-46b3-a3f6-6e3e70b9287b",
"ref_id": "30eee44b-fee7-46b3-a3f6-6e3e70b9287b"
},
"data_type": "csv",
"event_catalogs": [
{
"href": "https://api.analyzere.net/event_catalogs/e02b0ace-96a5-47f8-a90e-c0960485f38e",
"ref_id": "e02b0ace-96a5-47f8-a90e-c0960485f38e"
}
],
"reinstatements_data_type": "percentage",
"start_date": "2017-01-01T00:00:00Z",
"status": "ready",
"status_message": null,
"trial_count": 100000,
"description": "YELT loss set example."
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Loss Sets of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Loss Sets to return (default 100) |
offset | optional | the number of Loss Sets to skip before returning the limit |
fields | optional | a list of the Loss Set fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Loss Set fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Loss Sets to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Loss Sets by description (case-insensitive substring match) |
type | optional | filters the list of Loss Sets by _type (case-sensitive exact match) |
description | optional | filters the list of Loss Sets by description (case-sensitive exact match) |
min_loss | optional | filters the list of Loss Sets by min_loss (exact match) |
max_loss | optional | filters the list of Loss Sets by max_loss (exact match) |
avg_annual_loss | optional | filters the list of Loss Sets by avg_annual_loss (exact match) |
num_losses | optional | filters the list of Loss Sets by num_losses (exact match) |
non_zero_losses | optional | filters the list of Loss Sets by non_zero_losses (exact match) |
status | optional | filters the list of Loss Sets by status (case-sensitive exact match) |
ordering | optional | orders the list of Loss Sets |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
min_loss
max_loss
avg_annual_loss
num_losses
non_zero_losses
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Layers
Layer Class | Description |
---|---|
CatXL | Standard Excess of Loss Layer |
AggXL | Aggregate Excess of Loss Layer |
QuotaShare | |
AggregateQuotaShare | |
Generic | |
Back Allocated Layer | |
Value Allocator | |
Nested Layer |
Embedded Objects
Reinstatement
The restoration of the reinsurance limit of an excess property treaty to its full amount after payment by the reinsurer of loss as a result of an occurrence.
A single reinstatement consists of a reinstatement premium (the percentage of the original premium paid to reinstate this layer after an event attaches), and a reinstatement brokerage (also a percentage of premium but representing the amount expensed (deducted from the reinstatement premium) and paid to a third party such as a brokerage firm).
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
premium | Float | required | The percentage of the original premium. |
brokerage | Float | required | The percentage of the original premium. |
Inlined Layers or references
Inlined layer
{
"_type": "QuotaShare",
"loss_sets": [
{
"ref_id": "5ace83e3-ae79-45c0-8227-73a69973c595",
"href": "https://192.168.0.109/loss_sets/5ace83e3-ae79-45c0-8227-73a69973c595"
}
]
...
}
Layer reference
{"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91"}
LayerView reference
{"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91", "reference_type": "LayerView"}
To represent complex structures layers can nest or reference other layers or LayerViews
Type | Comment |
---|---|
Inlined1 | layer definition is fully inlined |
Layer reference | reference to the previously saved layer |
LayerView reference1 | reference to the previously saved LayerView |
Fees
Fees represent expenses on a layer. Fees can depend on layer terms, losses, and/or other fees. FeeReferences are used to define these dependencies.
In nested structures, fees are subject to the application of layer terms in the same way as regular losses.
Fee payout dates are not considered when resolving fee dependencies. For instance, if Fee B depends on Fee A, then the computed result will be the same regardless of whether Fee A has a payout date earlier or later than Fee B.
Filtering based on fees is not currently supported. Fees will be included in the result when using the default “match all” filter but will be excluded for any other filter, including non-default “match all” filters.
Analyze Re supports the following types of Fees:
Fixed Expense
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
}
from analyzere import (
Fee,
MonetaryUnit
)
from datetime import datetime, timezone
fixed_expense = Fee(type='FixedExpense',
name='MyFixedExpense',
payout_date=datetime(2018, 1, 15, 0, 0, 0, tzinfo=timezone.utc),
amount=MonetaryUnit(1500, 'USD'))
using System;
using AnalyzeRe;
using AnalyzeRe.Fees;
FixedExpense fixed_expense = new FixedExpense();
fixed_expense.name = "MyFixedExpense";
fixed_expense.payout_date = new DateTime(2018, 1, 15, 0, 0, 0);
fixed_expense.amount = new MonetaryUnit(1500, "USD");
Fixed Expense is an expense of a fixed amount. It has no dependencies.
Fixed Expense is calculated based on this formula:
FixedExpense = amount
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
_type | Type | required | The server name for this type of fee. |
name | string | required | The name of this fee. |
payout_date | datetime string | required | The date and time when this fee is applied. |
amount | MonetaryUnit | required | The fixed expense amount. |
Proportional Expense
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
from analyzere import (
Fee,
FeeReference,
MonetaryUnit
)
from datetime import datetime, timezone
proportional_expense = Fee(type='ProportionalExpense',
name='MyProportionalExpense',
payout_date=datetime(2017, 5, 16, 0, 0, 0, tzinfo=timezone.utc),
rate=0.04,
premiums=[FeeReference.PREMIUM])
using System;
using AnalyzeRe;
using AnalyzeRe.Fees;
ProportionalExpense proportional_expense = new ProportionalExpense();
proportional_expense.name = "MyProportionalExpense";
proportional_expense.payout_date = new DateTime(2017, 5, 16, 0, 0, 0);
proportional_expense.rate = 0.04;
proportional_expense.premiums = new List<FeeReference>()
{
FeeReference.Create(FeeReference.PremiumSource.Premium)
};
Proportional Expense is an expense that is proportional to the premiums on this layer.
Proportional Expense is calculated based on this formula:
ProportionalExpense = rate * sum(premiums)
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
_type | Type | required | The server name for this type of fee. |
name | string | required | The name of this fee. |
payout_date | datetime string | required | The date and time when this fee is applied. |
rate | Float | required | The proportional expense rate. |
premiums | List(FeeReference) | required | A list of FeeReferences defining which premium sources to consider. |
Profit Commission
{
"_type": "ProfitCommmission",
"name": "MyProfitCommission",
"payout_date": "2017-08-08T00:00:00Z",
"rate": 0.01,
"premiums": [
{"ref": ["Layer", "Premium"]},
{"ref": ["Layer", "ReinstatementPremium"]},
],
"losses": [
{"ref": ["Layer", "Losses"]},
{"ref": ["Layer", "ReinstatementBrokerage"]},
],
"fees": [
{"ref": ["Layer", "Fees", "MyFixedExpense"]}
]
}
from analyzere import (
Fee,
FeeReference,
MonetaryUnit
)
from datetime import datetime, timezone
fixed_expense_ref = FeeReference.from_fee(fixed_expense)
profit_commission = Fee(type='ProfitCommission',
name='MyProfitCommission',
payout_date=datetime(2017, 5, 16, 0, 0, 0, tzinfo=timezone.utc),
rate=0.01,
premiums=[FeeReference.PREMIUM, FeeReference.REINSTATEMENT_PREMIUM],
losses=[FeeReference.LOSSES, FeeReference.REINSTATEMENT_BROKERAGE],
fees=[fixed_expense_ref])
using System;
using AnalyzeRe;
using AnalyzeRe.Fees;
ProfitCommission profit_commission = new ProfitCommission();
profit_commission.name = "MyProportionalExpense";
profit_commission.payout_date = new DateTime(2017, 5, 16, 0, 0, 0);
profit_commission.rate = 0.04;
profit_commission.premiums = new List<FeeReference>()
{
FeeReference.Create(FeeReference.PremiumSource.Premium),
FeeReference.Create(FeeReference.PremiumSource.ReinstatementPremium)
};
profit_commission.losses = new List<FeeReference>()
{
FeeReference.Create(FeeReference.LossSource.Losses),
FeeReference.Create(FeeReference.LossSource.ReinstatementBrokerage)
};
profit_commission.fees = new List<FeeReference>()
{
FeeReference.CreateFromFeeName("MyFixedExpense")
};
Profit Commission is an expense that is proportional to this layer’s profit. Other fees can be considered when calculating profit.
Profit Commission is calculated based on this formula:
ProfitCommmission = MAX(0, rate * (sum(premiums) - sum(losses) - sum(fees))
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
_type | Type | required | The server name for this type of fee. |
name | string | required | The name of this fee. |
payout_date | datetime string | required | The date and time when this fee is applied. |
rate | Float | required | The profit commission rate. |
premiums | List(FeeReference) | required | A list of FeeReferences defining which premium sources to consider. |
losses | List(FeeReference) | required | A list of FeeReferences defining which loss sources to consider. |
fees | List(FeeReference) | required | A list of FeeReferences defining which fee sources to consider. |
Layer Policy
Layer Policy is the rule on RecordType that determines how
occurrences belonging to a particular RecordType
are treated by the layer.
The user can use layer policy to control the individual record type’s behavior
within a layer.
We have three policy categories: transform
, forward
and exclude
. Both
transform
and forward
are represented as lists of record types that users
can specify. exclude
is implicit. Any record types not listed in the either
list are considered to belong to the exclude
category.
Transform
When a record type is listed under transform
, all input occurrences with the
matching record type are subjected to layer terms.
Forward
When a record type is listed under forward
, all input occurrences with the
matching record type are not subjected to layer terms, and are instead simply
forwarded through the layer without modification (participation, however, may
be applied at the end).
Exclude
If an input occurrence to a layer has a record type that does not match anything
in transform
or forward
, they are excluded
and discarded by the layer.
Policy
The policy field is an optional field. If the policy field is provided, it must
contain both transform_records
and forward_records
lists. If the policy
field is not provided, a default policy is chosen according
to the layer type.
Attributes
Attribute | Type | Traits | Description |
---|---|---|---|
transform_records | list(RecordType) | required | list of record types to transform |
forward_records | list(RecordType) | required | list of record types to forward |
Default Policy
Record Types | Quota Share | Surplus Share | Filter Layer | Fixed Rate Currency Converter | All other layers |
---|---|---|---|---|---|
Fees | Forward Fees | Forward Fees | Transform Fees | Transform Fees | Exclude Fees |
Loss | Transform Loss | Transform Loss | Transform Loss | Transform Loss | Transform Loss |
Notes:
- Each record type can only be in one of the three layer policy categories, so
it is not permissible to specify the same record type in both
transform_records
andforward_records
lists. - Layer policy has higher priority than layer terms, with the exception of participation. For example, all forwarded record types are passed through to the layer output YELT the same as they came in regardless of inception/expiry date, except with the layer’s participation applied.
- Terms that create additional occurrences, such as fees, are only affected by
occurrences that have a
transform
policy. - The layer policy only apply to incoming occurrences. They do not apply to any
occurrence that is added by the layer. For example, a layer that creates
NoClaimsBonus occurrences and is specified to exclude occurrences with
RecordType=NoClaimsBonus
will only excludeNoClaimsBonus
occurrences that are coming into this layer, but it can still add NoClaimsBonus occurrences to the output. - To apply the layer policy to occurrences added by a layer, the user will need
to specify the layer policy in the next layer that the current layer outputs
to. For example, if user wants to excludes
NoClaimsBonus
occurrences in current layer, user will need to specify excludesRecordType=NoClaimsBonus
in the next layer that the current layer outputs to. - In order to specify that a policy category should apply to no record types,
the policy category can be assigned to an empty list (
[]
)
Payment Patterns
Delayed Payment
{
"_type": "DelayedPayment",
"loss_sets": [
],
"payments": [
{ "delay": 0, "amount": 0.5 },
{ "delay": 30, "amount": 0.25 },
{ "delay": 90, "amount": 0.25 }
],
"meta_data": {},
"description": "A meaningful description"
}
A “delayed payment” payment pattern models claims being paid in instalments at fixed delays after the claim occurred. For example:
- pay 50% of the claim immediately
- pay 25% of the claim 30 days layer
- pay 25% of the claim 90 days layer
For this approach the total value of the initial claim is split into multiple loss entries in the YELT based on the respective percentage of each payment and the time of occurrence is offset by the delay. Given the following input YELT and the payment pattern of the example shown above, the transformation of the input YELT into a YELT with the payment pattern applied would look as follows:
Trial | Time | EventId | Loss | ReinstatementPremium | ReinstatementBrokerage |
---|---|---|---|---|---|
1 | 10 | 1 | 1000 | 100 | 10 |
1 | 60 | 2 | 2000 | 0 | 0 |
1 | 340 | 3 | 300 | 50 | 5 |
2 | 260 | 4 | 5000 | 0 | 0 |
2 | 280 | 5 | 2000 | 0 | 0 |
Transformed to:
Trial | Time | EventId | Loss | ReinstatementPremium | ReinstatementBrokerage | Comment |
---|---|---|---|---|---|---|
1 | 10 | 1 | 500 | 50 | 5 | 1st Payment |
1 | 40 | 1 | 250 | 25 | 2.5 | 2nd Payment |
1 | 60 | 2 | 1000 | 0 | 0 | 1st Payment |
1 | 90 | 2 | 500 | 0 | 0 | 2nd Payment |
1 | 100 | 1 | 250 | 25 | 2.5 | 3rd Payment |
1 | 150 | 2 | 500 | 0 | 0 | 3rd Payment |
1 | 340 | 3 | 150 | 25 | 2.5 | 1st Payment |
1 | 370 | 3 | 75 | 12.5 | 1.25 | 2nd Payment |
1 | 430 | 3 | 75 | 12.5 | 1.25 | 3rd Payment |
2 | 260 | 4 | 2500 | 0 | 0 | 1st Payment |
2 | 280 | 5 | 1000 | 0 | 0 | 1st Payment |
2 | 290 | 4 | 1250 | 0 | 0 | 2nd Payment |
2 | 310 | 5 | 500 | 0 | 0 | 2nd Payment |
2 | 350 | 4 | 1250 | 0 | 0 | 3rd Payment |
2 | 370 | 5 | 500 | 0 | 0 | 3rd Payment |
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | DelayedPayment |
id | string | A server-generated UUID |
description | string | A user description of the layer. |
meta_data | Custom user metadata for this layer. | |
payments | List of dictionaries | Payment schedule for a claim consisting of a delay time offset in fractional days and an amount as a proportion of loss. |
Fixed Date Payment
{
"_type": "FixedDatePayment",
"loss_sets": [
],
"payments": [
0.5,
0.25,
0.25
],
"payment_dates": [
"2019-01-01",
"2019-04-01",
"2019-07-01",
"2019-10-01",
"2020-01-01",
"2020-04-01",
"2020-07-01",
"2020-10-01"
],
"meta_data": {},
"description": "A meaningful description"
}
The “Fixed-Date Payment” payment pattern models claims being paid in instalments at specific dates following the date of occurrence. For example:
- pay 50% of the claim at the beginning of the quarter immediately following the date the event occurred
- pay 25% of the claim at the beginning of the quarter following the first payment
- pay 25% of the claim at the beginning of the quarter following the second payment
For this approach the total value of the initial claim is split into multiple loss entries in the YELT based on the respective percentage of each payment and the time of occurrence of these payments is predefined. Given the following input YELT and the payment pattern of the example shown above, the transformation of the input YELT into a YELT with the payment pattern applied would look as follows:
Trial | Date | EventId | Loss | ReinstatementPremium | ReinstatementBrokerage |
---|---|---|---|---|---|
1 | 1/11/2019 | 1 | 1000 | 100 | 10 |
1 | 3/2/2019 | 2 | 2000 | 0 | 0 |
1 | 12/7/2019 | 3 | 300 | 50 | 5 |
2 | 9/18/2019 | 4 | 5000 | 0 | 0 |
2 | 10/8/2019 | 5 | 2000 | 0 | 0 |
Transformed to:
Trial | Date | EventId | Loss | ReinstatementPremium | ReinstatementBrokerage | Comment |
---|---|---|---|---|---|---|
1 | 4/1/2019 | 1 | 500 | 50 | 5 | 1st Payment |
1 | 4/1/2019 | 2 | 1000 | 0 | 0 | 1st Payment |
1 | 7/1/2019 | 1 | 250 | 25 | 2.5 | 2nd Payment |
1 | 7/1/2019 | 2 | 500 | 0 | 0 | 2nd Payment |
1 | 10/1/2019 | 1 | 250 | 25 | 2.5 | 3rd Payment |
1 | 10/1/2019 | 2 | 500 | 0 | 0 | 3rd Payment |
1 | 1/1/2020 | 3 | 150 | 25 | 2.5 | 1st Payment |
1 | 4/1/2020 | 3 | 75 | 12.5 | 1.25 | 2nd Payment |
1 | 7/1/2020 | 3 | 75 | 12.5 | 1.25 | 3rd Payment |
2 | 10/1/2019 | 4 | 2500 | 0 | 0 | 1st Payment |
2 | 1/1/2020 | 4 | 1250 | 0 | 0 | 2nd Payment |
2 | 1/1/2020 | 5 | 1000 | 0 | 0 | 1st Payment |
2 | 4/1/2020 | 4 | 1250 | 0 | 0 | 3rd Payment |
2 | 4/1/2020 | 5 | 500 | 0 | 0 | 2nd Payment |
2 | 7/1/2020 | 5 | 500 | 0 | 0 | 3rd Payment |
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | FixedDatePayment |
id | string | A server-generated UUID |
description | string | A user description of the layer. |
meta_data | Custom user metadata for this layer. | |
payments | List of double values | Payment amount for each payment as a proportion of loss |
payment_dates | List of ISO-8901 timestamp strings | Payment schedule of future payment dates relative to the loss occurring date. Note: Analyze Re represents occurrence dates on a continuous (non-discrete) time line and the payment_date selected for a specific occurrence date must be strictly greater than the occurrence date. |
Non-uniform Payment Intervals
Assume I want to aggregate all losses occurring into the 1st day of each subsequent 1st, 2nd and 4th quarter at 50%, 25%, and 25%. In that case the following original occurrence dates will be allocated as follows:
Original Occurrence Date | 1st subsequent quarter | 2nd subsequent quarter | 4th subsequent quarter | |
---|---|---|---|---|
2020-01-10 | 2020-04-01 | 2020-07-01 | 2021-01-01 | |
2020-05-06 | 2020-07-01 | 2020-10-01 | 2021-04-01 | |
2020-07-20 | 2020-10-01 | 2021-01-01 | 2021-07-01 | |
2020-10-08 | 2021-01-01 | 2021-04-01 | 2021-10-01 |
As you can see in the first original date we are skipping the 2020-10-01, but we need it in the list for the second original date. So the FixedDatePayment structure needs to be configured to make 4 payments with the 3rd payment being 0:
{
"_type": "FixedDatePayment",
"loss_sets": [
],
"payments": [
0.5,
0.25,
0,
0.25
],
"payment_dates": [
"2020-01-01",
"2020-04-01",
"2020-07-01",
"2020-10-01",
"2021-01-01",
"2021-04-01",
"2021-07-01",
"2021-10-01"
],
"meta_data": {},
"description": null
}
Definition
Generic
{
"_type": "Generic",
"id": "89804e42-e048-4146-a0b7-1ca9da0da798",
"description": "Demo 1 Echo Re Layer 1",
"meta_data": {
"nth": 1,
"if_cover_florida": 1
},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 55774.15217,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [],
"participation": 0.098,
"attachment": {
"value": 1000000,
"currency": "USD"
},
"limit": {
"value": 2000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 0,
"currency": "USD"
},
"aggregate_limit": {
"value": 0,
"currency": "USD"
},
"reinstatements": [],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Similar to AggXL, but with support for reinstatments. Unlike the CatXL layer, the number of reinstatements does not affect the aggregate limit of the Generic layer, they serve only to accrue reinstatement premium and brokerage until the specified aggregate limit is attained. As such, the Generic layer can be used to model partial reinstatements.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | a server-generated UUID |
description | string | A user description of the layer and it covers. |
meta_data | Custom user metadata for this layer. | |
participation | Float | The amount of participation of the reinsurer in this deal as the percentage of loss, premium, and brokerage. |
inception_date | datetime string | The date and time when the contract takes effect. |
expiry_date | datetime string | The date and time when effect of the contract expires. |
premium | MonetaryUnit | The premium expected to be written by this layer excluding reinstatement premiums. |
fees | List(Fee) | A list of fees associated with this layer. |
policy | Policy | A transform_records list and a forward_records list |
loss_sets | List(LossSet) | The list of LossSet references that is associated with the specific layer. |
limit | MonetaryUnit | The per-occurrence limit applied by this layer. |
attachment | MonetaryUnit | The per-occurrence attachment / deductible applied by this layer. |
franchise | MonetaryUnit | The franchise deductible amount. |
aggregate_limit | MonetaryUnit | The aggregate limit applied by this layer. |
aggregate_attachment | MonetaryUnit | The aggregate attachment applied by this layer. |
reinstatements | List(Reinstatement) | A list of reinstatement provisions applicable by this layer. |
CatXL
{
"_type": "CatXL",
"id": "7a61ffdf-1598-4e51-a7bb-09c918541fc8",
"description": "Alpha Re Layer 1",
"meta_data": {},
"inception_date": "2017-03-17T14:02:43.837000Z",
"expiry_date": "2018-03-16T14:02:43.837000Z",
"premium": {
"value": 100000,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
"ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
},
{
"href": "https://api.analyzere.net/loss_sets/9fadbccf-178e-4400-9bc3-5fff17886cb0",
"ref_id": "9fadbccf-178e-4400-9bc3-5fff17886cb0"
}
],
"participation": 0.25,
"nth": 1,
"attachment": {
"value": 1718242.18923324,
"currency": "USD"
},
"limit": {
"value": 1718242.18923324,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Representation of a Catastrophe Excess of Loss (CatXL) layer.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | a server-generated UUID |
description | string | A user description of the layer and it covers. |
meta_data | Custom user metadata for this layer. | |
participation | Float | The amount of participation of the reinsurer in this deal as the percentage of loss, premium, and brokerage. |
inception_date | datetime string | The date and time when the contract takes effect. |
expiry_date | datetime string | The date and time when effect of the contract expires. |
premium | MonetaryUnit | The premium expected to be written by this layer excluding reinstatement premiums. |
fees | List(Fee) | A list of fees associated with this layer. |
policy | Policy | A transform_records list and a forward_records list |
loss_sets | List(LossSet) | The list of LossSet references that is associated with the specific layer. |
limit | MonetaryUnit | The per-occurrence limit applied by this layer. |
attachment | MonetaryUnit | The per-occurrence attachment / deductible applied by this layer. |
franchise | MonetaryUnit | The franchise deductible amount. |
reinstatements | List(Reinstatement) | A list of reinstatement provisions applicable by this layer. |
nth | Int | The number of times the limit may be exhausted (minus one) before this layer attaches. For example: Set to ‘2’ if this is a Second Event XOL meaning this layer starts assuming losses after the limit is hit the first time. This is akin to having an aggregate attachment of (limit * (nth-1)). |
Aggregate Excess of Loss
{
"_type": "AggXL",
"id": "b0aa6a44-f1c6-43b9-9747-116b5a1f2537",
"description": "Golf Re Layer 1",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 119718.3336,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
"ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
},
{
"href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
"ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
},
{
"href": "http://api.analyzere.net/loss_sets/1dd318b0-9af9-4716-9e08-f4811708a117",
"ref_id": "1dd318b0-9af9-4716-9e08-f4811708a117"
}
],
"participation": 0.098,
"attachment": {
"value": 10000000,
"currency": "USD"
},
"limit": {
"value": 5000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 10000000,
"currency": "USD"
},
"aggregate_limit": {
"value": 5000000,
"currency": "USD"
},
"franchise": {
"value": 0,
"currency": "USD"
}
}
Representation of an Aggregate Catastrophe Excess of Loss layer.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | a server-generated UUID |
description | string | A user description of the layer and it covers. |
meta_data | Custom user metadata for this layer. | |
participation | Float | The amount of participation of the reinsurer in this deal as the percentage of loss, premium, and brokerage. |
inception_date | datetime string | The date and time when the contract takes effect. |
expiry_date | datetime string | The date and time when effect of the contract expires. |
premium | MonetaryUnit | The premium expected to be written by this layer excluding reinstatement premiums. |
fees | List(Fee) | A list of fees associated with this layer. |
policy | Policy | A transform_records list and a forward_records list |
loss_sets | List(LossSet) | The list of LossSet references that is associated with the specific layer. |
limit | MonetaryUnit | The per-occurrence limit applied by this layer. |
attachment | MonetaryUnit | The per-occurrence attachment / deductible applied by this layer. |
franchise | MonetaryUnit | The franchise deductible amount. |
aggregate_limit | MonetaryUnit | The aggregate limit applied by this layer. |
aggregate_attachment | MonetaryUnit | The aggregate attachment applied by this layer. |
Quota Share
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "QuotaShare",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"event_limit": {
"value": 300000,
"currency": "USD"
},
"participation": 0.098,
"meta_data": {},
"description": "India Re Layer 5"
}
Representation of a Quota Share contract.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | a server-generated UUID |
description | string | A user description of the layer and it covers. |
meta_data | Custom user metadata for this layer. | |
participation | Float | The amount of participation of the reinsurer in this deal as the percentage of loss, premium, and brokerage. |
inception_date | datetime string | The date and time when the contract takes effect. |
expiry_date | datetime string | The date and time when effect of the contract expires. |
premium | MonetaryUnit | The premium expected to be written by this layer excluding reinstatement premiums. |
fees | List(Fee) | A list of fees associated with this layer. |
policy | Policy | A transform_records list and a forward_records list |
loss_sets | List(LossSet) | The list of LossSet references that is associated with the specific layer. |
event_limit | MonetaryUnit | The maximum amount to be covered by the Quota Share per event. |
Aggregate Quota Share
{
"_type": "AggregateQuotaShare",
"id": "c5a79065-6f9b-4290-89ca-b3954bac0a9d",
"description": "Layer 7",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"policy": null,
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.1,
"event_limit": {
"value": 300000,
"currency": "USD"
},
"aggregate_limit": {
"value": 1000000.0,
"currency": "USD",
"value_date": null,
"rate": null,
"rate_currency": null
},
"aggregate_attachment": {
"value": 1000000.0,
"currency": "USD",
"value_date": null,
"rate": null,
"rate_currency": null
}
}
Representation of a Aggregate Quota Share contract.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | a server-generated UUID |
description | string | A user description of the layer and it covers. |
meta_data | Custom user metadata for this layer. | |
participation | Float | The amount of participation of the reinsurer in this deal as the percentage of loss, premium, and brokerage. |
inception_date | datetime string | The date and time when the contract takes effect. |
expiry_date | datetime string | The date and time when effect of the contract expires. |
premium | MonetaryUnit | The premium expected to be written by this layer excluding reinstatement premiums. |
fees | List(Fee) | A list of fees associated with this layer. |
policy | Policy | A transform_records list and a forward_records list |
loss_sets | List(LossSet) | The list of LossSet references that is associated with the specific layer. |
event_limit | MonetaryUnit | The maximum amount to be covered by this layer per event. |
aggregate_limit | MonetaryUnit | The aggregate limit applied by this layer. |
aggregate_attachment | MonetaryUnit | The aggregate attachement applied by this layer. |
Back Allocated Layer
{
"_type": "BackAllocatedLayer",
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"description": "Windstorm contributions",
"meta_data": {},
"sink": {"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91", "reference_type": "LayerView"},
"source_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf92"
}
Used to perform a back-allocation of risk from some structure (sink) to some component source (source_id). Computes the proportion of the sink structure’s net losses that should be attributed to the specified source. This is done on a per-event-occurrence basis, so the result is a new YELT. As such, this Back-Allocated structure can be used like any other layer when simulated.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | A server-generated UUID |
description | string | A user description of the layer. |
meta_data | Custom user metadata for this layer. | |
sink | Layer | Model from which to back-allocate |
source_id | string | Source identifier in the sink model to back-allocate to. Can be either LayerView or LossSet |
Value Allocator
{
"_type": "ValueAllocator",
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"description": "Value Allocator",
"meta_data": {},
"source": {"ref_id": "00000000-0000-0000-0000-000000000001", "reference_type": "LayerView"},
"target": {"ref_id": "00000000-0000-0000-0000-000000000002", "reference_type": "LayerView"},
"group": {"ref_id": "00000000-0000-0000-0000-000000000003", "reference_type": "LayerView"},
"proportioned_perspective" : "LossNetOfAggregateTerms",
"allocation_perspectives" : ["LossNetOfAggregateTerms", "ReinstatementPremium", "ReinstatementBrokerage"],
"allocation_ratio_basis" : "PerEvent"
}
Representation of the Value Allocator. Allocates the results of a source (S) to a target structure (T) based on T’s proportion of the values held by a group of structures (G). Mathematically it computes the ratio of T to G and applies this ratio to the results in S.
Note: ValueAllocator layers may not be used as the sink
of a Nested Layer.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | A server-generated UUID |
description | string | A user description of the layer. |
meta_data | Custom user metadata for this layer. | |
source | Layer | Source for allocation |
target | Layer | Target structure of the values held by a group of structures |
group | Layer | Group of structures |
proportioned_perspective | string | Target and Group column to use as a basis for the multiplier. Must be one of [LossNetOfAggregateTerms, ReinstatementPremium, ReinstatementBrokerage] |
allocation_perspectives | list(strings) | Source columns to multiply against. Must be one or combination of [LossNetOfAggregateTerms, ReinstatementPremium, ReinstatementBrokerage] |
allocation_ratio_basis | string | Defines how the ratio is calculated. Can be PerEvent (by default) or PerTrial. With PerEvent, each event has its own ratio depending on the event loss in T and G sources. With PerTrial, one ratio is calculated based on total loss in T and total loss is G. This ratio is then applied to all events in the S. |
Nested Layer
{ "_type": "NestedLayer",
"description": "Nested Layer",
"id": "9cc21572-226c-4524-8bb8-9d84efd84957",
"meta_data": {},
"sink": {"ref_id": "80886b31-73ca-4f4d-af0d-e814cf173c93"},
"sources": [{"ref_id": "b7e7a55d-a6c6-47a9-8f0f-5c218103f224"}]
}
Representation of a Nested Layer. Indicates the sink and source(s) - the main components of a nested layer. In practice, the losses from source layer(s) flow into the singular sink and the loss of the resultant structure is calculated accodingly.
Attributes
Attribute | Type | Description |
---|---|---|
_type | Type | The server name for this type of layer. |
id | string | A server-generated UUID |
description | string | A user description of the layer. |
meta_data | Custom user metadata for this layer. | |
sink | Layer | The sink layer into which the losses from the sources flow into |
sources | Layer | Represented in square parentheses [] – one or more source layers from which loss values flow into the nested structure into the sink |
Create
Generic
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "Generic",
"description": "Demo 1 Echo Re Layer 1",
"meta_data": {
"nth": 1,
"if_cover_florida": 1
},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 55774.15217,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [ "ref_id": "fcbdeb25-0557-4f9e-a4f5-64b8bc2557cf" ],
"participation": 0.098,
"attachment": {
"value": 1000000,
"currency": "USD"
},
"limit": {
"value": 2000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 0,
"currency": "USD"
},
"aggregate_limit": {
"value": 20000000,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
from analyzere import (
Fee,
FeeReference
Layer,
LossSet,
MonetaryUnit,
LayerPolicy
)
from datetime import datetime, timezone
fixed_expense = Fee(type='FixedExpense',
name='MyFixedExpense',
payout_date=datetime(2018, 1, 15, 0, 0, 0, tzinfo=timezone.utc),
amount=MonetaryUnit(1500, 'USD'))
proportional_expense = Fee(type='ProportionalExpense',
name='MyProportionalExpense',
payout_date=datetime(2017, 5, 16, 0, 0, 0, tzinfo=timezone.utc),
rate=0.04,
premiums=[FeeReference.PREMIUM])
loss_set = LossSet.retrieve('fcbdeb25-0557-4f9e-a4f5-64b8bc2557cf')
generic = Layer(type='Generic',
description='Demo 1 Echo Re Layer 1',
meta_data={"nth": 1, "if_cover_florida": 1},
inception_date=datetime(2017, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
expiry_date=datetime(2018, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
premium=MonetaryUnit(55774.15217, 'USD'),
fees=[fixed_expense, proportional_expense],
policy=LayerPolicy(transform_records=['Loss', 'FixedExpense'], forward_records=['ProportionalExpense']),
loss_sets=[loss_set],
participation=0.098,
attachment=MonetaryUnit(1000000, 'USD'),
limit=MonetaryUnit(2000000, 'USD'),
aggregate_attachment=MonetaryUnit(0, 'USD'),
aggregate_limit=MonetaryUnit(20000000, 'USD'),
reinstatements=[Reinstatement(premium=0.1, brokerage=0.05),
Reinstatement(premium=0.2, brokerage=0.05),
Reinstatement(premium=0.3, brokerage=0.05)],
franchise = MonetaryUnit(0, 'USD')).save()
using System;
using System.Collections.Generic;
using AnalyzeRe;
using AnalyzeRe.Fees;
using AnalyzeRe.Layers;
Generic generic = new Generic
{
description = "Demo 1 Echo Re Layer 1",
meta_data = new Dictionary<string, object> {
{"nth", 1},
{"if_cover_florida", 1}
},
inception_date = new DateTime(2017, 1, 23, 4, 0, 0),
expiry_date = new DateTime(2018, 1, 23, 4, 0, 0),
premium = new MonetaryUnit(55774.15217, "USD"),
participation = 0.098,
loss_sets = new List<IReference<LossSet>> {
new Reference<LossSet>("fcbdeb25-0557-4f9e-a4f5-64b8bc2557cf")
},
attachment = new MonetaryUnit(1000000, "USD"),
limit = new MonetaryUnit(2000000, "USD"),
franchise = new MonetaryUnit(0, "USD"),
aggregate_attachment = new MonetaryUnit(0, "USD"),
aggregate_limit = new MonetaryUnit(20000000, "USD"),
reinstatements = new List<Reinstatement> {
new Reinstatement { premium = 0.1, brokerage = 0.05 },
new Reinstatement { premium = 0.2, brokerage = 0.05 },
new Reinstatement { premium = 0.3, brokerage = 0.05 }
},
fees = new List<Fee> {
new FixedExpense {
name = "MyFixedExpense",
payout_date = new DateTime(2018, 1, 15, 0, 0, 0),
amount = new MonetaryUnit(1500, "USD")
},
new ProportionalExpense {
name = "MyProportionalExpense",
payout_date = new DateTime(2017, 5, 16, 0, 0, 0),
rate = 0.04,
premiums = new List<FeeReference> {
FeeReference.Create(FeeReference.PremiumSource.Premium)
}
}
}
}.Post();
Response Body:
{
"_type": "Generic",
"id": "89804e42-e048-4146-a0b7-1ca9da0da798",
"description": "Demo 1 Echo Re Layer 1",
"meta_data": {
"nth": 1,
"if_cover_florida": 1
},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 55774.15217,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "https://api.analyzere.net/loss_sets/fcbdeb25-0557-4f9e-a4f5-64b8bc2557cf",
"ref_id": "fcbdeb25-0557-4f9e-a4f5-64b8bc2557cf"
}
],
"participation": 0.098,
"attachment": {
"value": 1000000,
"currency": "USD"
},
"limit": {
"value": 2000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 0,
"currency": "USD"
},
"aggregate_limit": {
"value": 0,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | Generic |
description | required | |
meta_data | optional | |
participation | required | |
inception_date | optional | |
expiry_date | optional | |
premium | optional | |
fees | optional | |
policy | optional | |
loss_sets | optional | |
attachment | required | |
limit | required | |
franchise | required | |
aggregate_attachment | required | |
aggregate_limit | required | |
reinstatements | optional |
Excess of Loss
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "CatXL",
"description": "Alpha Re Layer 1",
"meta_data": {},
"inception_date": "2017-03-17T14:02:43.837000Z",
"expiry_date": "2018-03-16T14:02:43.837000Z",
"premium": {
"value": 100000,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
"ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
},
{
"href": "http://api.analyzere.net/loss_sets/9fadbccf-178e-4400-9bc3-5fff17886cb0",
"ref_id": "9fadbccf-178e-4400-9bc3-5fff17886cb0"
}
],
"participation": 0.25,
"nth": 1,
"attachment": {
"value": 1718242.18923324,
"currency": "USD"
},
"limit": {
"value": 1718242.18923324,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit,
LayerPolicy,
Reinstatement,
Fee,
)
from datetime import datetime, timezone
loss_set1 = LossSet.retrieve('49c9c3ca-475f-4b70-b362-3d09caa48afb')
loss_set2 = LossSet.retrieve('9fadbccf-178e-4400-9bc3-5fff17886cb0')
fixed_expense = Fee(type='FixedExpense',
name='MyFixedExpense',
payout_date=datetime(2018, 1, 15, 0, 0, 0, tzinfo=timezone.utc),
amount=MonetaryUnit(1500, 'USD'))
proportional_expense = Fee(type='ProportionalExpense',
name='MyProportionalExpense',
payout_date=datetime(2017, 5, 16, 0, 0, 0, tzinfo=timezone.utc),
rate=0.04,
premiums=[FeeReference.PREMIUM])
catXL = Layer(type='CatXL',
description='Alpha Re Layer 1',
meta_data={},
inception_date=datetime(2017, 3, 17, 14, 2, 43, 837, tzinfo=timezone.utc),
expiry_date=datetime(2018, 3, 17, 14, 2, 43, 837, tzinfo=timezone.utc),
premium=MonetaryUnit(100000, 'USD'),
fees=[fixed_expense, proportional_expense],
policy=LayerPolicy(transform_records=['Loss', 'FixedExpense'], forward_records=['ProportionalExpense']),
loss_sets=[loss_set1, loss_set2],
participation=0.25,
attachment=MonetaryUnit(1718242.18923324, 'USD'),
limit=MonetaryUnit(1718242.18923324, 'USD'),
reinstatements=[Reinstatement(premium=0.1, brokerage=0.05),
Reinstatement(premium=0.2, brokerage=0.05),
Reinstatement(premium=0.3, brokerage=0.05)],
franchise=MonetaryUnit(0, 'USD')).save()
using System;
using AnalyzeRe;
using AnalyzeRe.Fees;
using AnalyzeRe.Layers;
CatXL catXL = new CatXL {
description = "Alpha Re Layer 1",
inception_date = new DateTime(2017, 3, 17, 14, 2, 43, 837),
expiry_date = new DateTime(2018, 3, 17, 14, 2, 43, 837),
premium = new MonetaryUnit(100000, "USD"),
participation = 0.25,
loss_sets = new List<IReference<LossSet>> {
new Reference<LossSet>("49c9c3ca-475f-4b70-b362-3d09caa48afb"),
new Reference<LossSet>("9fadbccf-178e-4400-9bc3-5fff17886cb0")
},
nth = 1,
attachment = new MonetaryUnit(1718242.18923324, "USD"),
limit = new MonetaryUnit(1718242.18923324, "USD"),
franchise = new MonetaryUnit(0, "USD"),
reinstatements = new List<Reinstatement> {
new Reinstatement { premium = 0.1, brokerage = 0.05 },
new Reinstatement { premium = 0.2, brokerage = 0.05 },
new Reinstatement { premium = 0.3, brokerage = 0.05 }
},
fees = new List<Fee> {
new FixedExpense {
name = "MyFixedExpense",
payout_date = new DateTime(2018, 1, 15, 0, 0, 0),
amount = new MonetaryUnit(1500, "USD")
},
new ProportionalExpense {
name = "MyProportionalExpense",
payout_date = new DateTime(2017, 5, 16, 0, 0, 0),
rate = 0.04,
premiums = new List<FeeReference> {
FeeReference.Create(FeeReference.PremiumSource.Premium)
}
}
}
}.Post();
Response Body:
{
"_type": "CatXL",
"id": "7a61ffdf-1598-4e51-a7bb-09c918541fc8",
"description": "Alpha Re Layer 1",
"meta_data": {},
"inception_date": "2017-03-17T14:02:43.837000Z",
"expiry_date": "2018-03-16T14:02:43.837000Z",
"premium": {
"value": 100000,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
"ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
},
{
"href": "https://api.analyzere.net/loss_sets/9fadbccf-178e-4400-9bc3-5fff17886cb0",
"ref_id": "9fadbccf-178e-4400-9bc3-5fff17886cb0"
}
],
"participation": 0.25,
"nth": 1,
"attachment": {
"value": 1718242.18923324,
"currency": "USD"
},
"limit": {
"value": 1718242.18923324,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | CatXL |
description | required | |
meta_data | optional | |
participation | required | |
inception_date | optional | |
expiry_date | optional | |
premium | optional | |
fees | optional | |
loss_sets | optional | |
attachment | required | |
limit | required | |
franchise | required | |
reinstatements | optional | |
nth | required | default=1 |
Aggregate Excess of Loss
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "AggXL",
"description": "Golf Re Layer 1",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 119718.3336,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
"ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
},
{
"href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
"ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
},
{
"href": "http://api.analyzere.net/loss_sets/1dd318b0-9af9-4716-9e08-f4811708a117",
"ref_id": "1dd318b0-9af9-4716-9e08-f4811708a117"
}
],
"participation": 0.098,
"attachment": {
"value": 10000000,
"currency": "USD"
},
"limit": {
"value": 5000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 10000000,
"currency": "USD"
},
"aggregate_limit": {
"value": 5000000,
"currency": "USD"
},
"franchise": {
"value": 0,
"currency": "USD"
}
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit,
LayerPolicy,
)
from datetime import datetime, timezone
loss_set1 = LossSet.retrieve('a1ea710e-43b7-4b61-a672-31ad2c2137f1')
loss_set2 = LossSet.retrieve('bb14804d-570a-408c-b4d7-f1763734032f')
loss_set3 = LossSet.retrieve('1dd318b0-9af9-4716-9e08-f4811708a117')
fixed_expense = Fee(type='FixedExpense',
name='MyFixedExpense',
payout_date=datetime(2018, 1, 15, 0, 0, 0, tzinfo=timezone.utc),
amount=MonetaryUnit(1500, 'USD'))
proportional_expense = Fee(type='ProportionalExpense',
name='MyProportionalExpense',
payout_date=datetime(2017, 5, 16, 0, 0, 0, tzinfo=timezone.utc),
rate=0.04,
premiums=[FeeReference.PREMIUM])
aggXL = Layer(type='AggXL',
description='Golf Re Layer 1',
meta_data={},
inception_date=datetime(2017, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
expiry_date=datetime(2018, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
premium=MonetaryUnit(119718.3336, 'USD'),
fees=[fixed_expense, proportional_expense],
policy=LayerPolicy(transform_records=['Loss', 'FixedExpense'], forward_records=['ProportionalExpense']),
loss_sets=[loss_set1, loss_set2, loss_set3],
participation=0.098,
attachment=MonetaryUnit(10000000, 'USD'),
limit=MonetaryUnit(5000000, 'USD'),
aggregate_attachment=MonetaryUnit(10000000, 'USD'),
aggregate_limit=MonetaryUnit(5000000, 'USD'),
franchise=MonetaryUnit(0, 'USD')).save()
using System;
using AnalyzeRe;
using AnalyzeRe.Fees;
using AnalyzeRe.Layers;
AggXL aggXl = new AggXL
{
description = "Golf Re Layer 1",
meta_data = new Dictionary<string, object> {
{"nth", 1},
{"if_cover_florida", 1}
},
inception_date = new DateTime(2017, 1, 23, 4, 0, 0),
expiry_date = new DateTime(2018, 1, 23, 4, 0, 0),
premium = new MonetaryUnit(1119718.3336, "USD"),
participation = 0.098,
loss_sets = new List<IReference<LossSet>> {
new Reference<LossSet>("a1ea710e-43b7-4b61-a672-31ad2c2137f1"),
new Reference<LossSet>("bb14804d-570a-408c-b4d7-f1763734032f"),
new Reference<LossSet>("1dd318b0-9af9-4716-9e08-f4811708a117")
},
attachment = new MonetaryUnit(110000000, "USD"),
limit = new MonetaryUnit(15000000, "USD"),
franchise = new MonetaryUnit(10, "USD"),
aggregate_attachment = new MonetaryUnit(110000000, "USD"),
aggregate_limit = new MonetaryUnit(15000000, "USD"),
fees = new List<Fee> {
new FixedExpense {
name = "MyFixedExpense",
payout_date = new DateTime(2018, 1, 15, 0, 0, 0),
amount = new MonetaryUnit(1500, "USD")
},
new ProportionalExpense {
name = "MyProportionalExpense",
payout_date = new DateTime(2017, 5, 16, 0, 0, 0),
rate = 0.04,
premiums = new List<FeeReference> {
FeeReference.Create(FeeReference.PremiumSource.Premium)
}
}
}
}.Post();
Response Body:
{
"_type": "AggXL",
"id": "b0aa6a44-f1c6-43b9-9747-116b5a1f2537",
"description": "Golf Re Layer 1",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 119718.3336,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
"ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
},
{
"href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
"ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
},
{
"href": "http://api.analyzere.net/loss_sets/1dd318b0-9af9-4716-9e08-f4811708a117",
"ref_id": "1dd318b0-9af9-4716-9e08-f4811708a117"
}
],
"participation": 0.098,
"attachment": {
"value": 10000000,
"currency": "USD"
},
"limit": {
"value": 5000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 10000000,
"currency": "USD"
},
"aggregate_limit": {
"value": 5000000,
"currency": "USD"
},
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | AggXL |
description | required | |
meta_data | optional | |
participation | required | |
inception_date | optional | |
expiry_date | optional | |
premium | optional | |
fees | optional | |
policy | optional | |
loss_sets | optional | |
attachment | required | |
limit | required | |
franchise | required | |
aggregate_attachment | required | |
aggregate_limit | required |
Quota Share
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "QuotaShare",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit,
LayerPolicy
)
from datetime import datetime, timezone
loss_set1 = LossSet.retrieve('e7e116dc-9e88-4d4c-ada3-6307194ecf9a')
loss_set2 = LossSet.retrieve('9d991b36-48fd-45a5-a322-c9286868a98d')
layer = Layer(type='QuotaShare',
description = 'India Re Layer 5',
meta_data = {},
inception_date=datetime(2017, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
expiry_date=datetime(2018, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
premium=MonetaryUnit(245810.8696, 'USD'),
loss_sets=[loss_set1, loss_set2],
participation=0.098,
event_limit=MonetaryUnit(300000, 'USD')).save()
using System;
using AnalyzeRe;
using AnalyzeRe.Layers;
QuotaShare quotaShare = new QuotaShare {
description = "India Re Layer 5",
inception_date = new DateTime(2017, 1, 23, 4, 0, 0),
expiry_date = new DateTime(2018, 1, 23, 4, 0, 0),
premium = new MonetaryUnit(245810.8696, "USD"),
loss_sets = new List<IReference<LossSet>> {
new Reference<LossSet>("e7e116dc-9e88-4d4c-ada3-6307194ecf9a"),
new Reference<LossSet>("9d991b36-48fd-45a5-a322-c9286868a98d")
},
participation = 0.098,
event_limit = new MonetaryUnit(300000, "USD")
}.Post();
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "QuotaShare",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"event_limit": {
"value": 300000,
"currency": "USD"
},
"participation": 0.098,
"meta_data": {},
"description": "India Re Layer 5"
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | QuotaShare |
description | required | |
meta_data | optional | |
participation | required | |
inception_date | optional | |
expiry_date | optional | |
premium | optional | |
fees | optional | |
policy | optional | |
loss_sets | optional | |
event_limit | required |
Aggregate Quota Share
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "AggregateQuotaShare",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"policy": null,
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
},
"aggregate_limit": {
"value": 1000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 1000000,
"currency": "USD",
}
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit
)
from datetime import datetime, timezone
loss_set1 = LossSet.retrieve('e7e116dc-9e88-4d4c-ada3-6307194ecf9a')
loss_set2 = LossSet.retrieve('9d991b36-48fd-45a5-a322-c9286868a98d')
layer = Layer(type='AggregateQuotaShare',
description = 'India Re Layer 5',
meta_data = {},
inception_date=datetime(2017, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
expiry_date=datetime(2018, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
premium=MonetaryUnit(245810.8696, 'USD'),
fees=[],
loss_sets=[loss_set1, loss_set2],
participation=0.098,
event_limit=MonetaryUnit(300000, 'USD'),
aggregate_limit=MonetaryUnit(1000000, 'USD'),
aggregate_attachment=MonetaryUnit(1000000, 'USD')).save()
using System;
using AnalyzeRe;
using AnalyzeRe.Layers;
AggregateQuotaShare aggQuotaShare = new AggregateQuotaShare {
description = "India Re Layer 5",
inception_date = new DateTime(2017, 1, 23, 4, 0, 0),
expiry_date = new DateTime(2018, 1, 23, 4, 0, 0),
premium = new MonetaryUnit(245810.8696, "USD"),
loss_sets = new List<IReference<LossSet>> {
new Reference<LossSet>("e7e116dc-9e88-4d4c-ada3-6307194ecf9a"),
new Reference<LossSet>("9d991b36-48fd-45a5-a322-c9286868a98d")
},
participation = 0.098,
event_limit = new MonetaryUnit(300000, "USD"),
aggregate_limit = new MonetaryUnit(1000000, "USD"),
aggregate_attachment = new MonetaryUnit(1000000, "USD")
}.Post();
Response Body:
{
"_type": "AggregateQuotaShare",
"id": "c25618e5-dcb3-4592-8ece-9d7926a1f3ab",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"policy": null,
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
},
"aggregate_limit": {
"value": 1000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 1000000.0,
"currency": "USD",
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | AggregateQuotaShare |
description | required | |
meta_data | optional | |
participation | required | |
inception_date | optional | |
expiry_date | optional | |
premium | optional | |
fees | optional | |
policy | optional | |
loss_sets | optional | |
event_limit | required | |
aggregate_limit | required | |
aggregate_attachment | optional |
Back Allocated layer
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "BackAllocatedLayer",
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"description": "Windstorm contributions",
"meta_data": {},
"sink": {"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91", "reference_type": "LayerView"},
"source_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf92"
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit
)
from datetime import datetime, timezone
layer = Layer(type='BackAllocatedLayer',
description = 'Windstorm contributions',
meta_data = {},
sink = {'ref_id': "f7e116dc-9e88-4d4c-ada3-6307194ecf91", 'reference_type': 'LayerView'}
source_id = "f7e116dc-9e88-4d4c-ada3-6307194ecf92")
using AnalyzeRe;
using AnalyzeRe.Layers;
BackAllocatedLayer layer = new BackAllocatedLayer
{
description = "Windstorm contributions",
sink = new Reference<ILayerView>("f7e116dc-9e88-4d4c-ada3-6307194ecf91"),
source_id = "f7e116dc-9e88-4d4c-ada3-6307194ecf92"
}.Post();
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "BackAllocatedLayer",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"sink": {"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91", "reference_type": "LayerView"},
"source_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf92",
"meta_data": {},
"description": "Windstorm contributions"
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | BackAllocatedLayer |
description | required | |
meta_data | optional | |
sink | required | |
source_id | required |
Value Allocator
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "ValueAllocator",
"description": "Value Allocator",
"meta_data": {},
"source": {"ref_id": "00000000-0000-0000-0000-000000000001", "reference_type": "LayerView"},
"target": {"ref_id": "00000000-0000-0000-0000-000000000002", "reference_type": "LayerView"},
"group": {"ref_id": "00000000-0000-0000-0000-000000000003", "reference_type": "LayerView"},
"proportioned_perspective" : "LossNetOfAggregateTerms",
"allocation_perspectives" : ["LossNetOfAggregateTerms", "ReinstatementPremium", "ReinstatementBrokerage"],
"allocation_ratio_basis" : "PerEvent"
}
from analyzere import (
Layer,
LossSet,
MonetaryUnit
)
from datetime import datetime, timezone
layer = Layer(type='ValueAllocator',
description = 'Value Allocator',
meta_data = {},
source = {'ref_id': "00000000-0000-0000-0000-000000000001", 'reference_type': ReferenceType('LayerView').name},
target = {'ref_id': "00000000-0000-0000-0000-000000000002", 'reference_type': ReferenceType('LayerView').name},
group = {'ref_id': "00000000-0000-0000-0000-000000000003", 'reference_type': ReferenceType('LayerView').name},
proportioned_perspective = "LossNetOfAggregateTerms",
allocation_perspectives = ["LossNetOfAggregateTerms", "ReinstatementPremium", "ReinstatementBrokerage"])
using AnalyzeRe;
using AnalyzeRe.Layers;
ValueAllocator layer = new ValueAllocator
{
description = "Value Allocator",
source = new Reference<ILayerView>("00000000-0000-0000-0000-000000000001"),
target = new Reference<ILayerView>("00000000-0000-0000-0000-000000000002"),
group = new Reference<ILayerView>("00000000-0000-0000-0000-000000000003"),
proportioned_perspective = Perspective.Base.LossNetOfAggregateTerms,
allocation_perspectives = new [] {
Perspective.Base.LossNetOfAggregateTerms,
Perspective.Base.ReinstatementPremium,
Perspective.Base.ReinstatementBrokerage
},
allocation_ratio_basis = ValueAllocator.AllocationRatioBasis.PerEvent
}.Post();
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "ValueAllocator",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"description": "Value Allocator",
"meta_data": {},
"source": {"ref_id": "00000000-0000-0000-0000-000000000001", "reference_type": "LayerView"},
"target": {"ref_id": "00000000-0000-0000-0000-000000000002", "reference_type": "LayerView"},
"group": {"ref_id": "00000000-0000-0000-0000-000000000003", "reference_type": "LayerView"},
"proportioned_perspective" : "LossNetOfAggregateTerms",
"allocation_perspectives" : ["LossNetOfAggregateTerms", "ReinstatementPremium", "ReinstatementBrokerage"],
"allocation_ratio_basis" : "PerEvent"
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | ValueAllocator |
description | required | |
meta_data | optional | |
source | required | |
target | required | |
group | required | |
proportioned_perspective | required | |
allocation_perspectives | required | |
allocation_ratio_basis | optional |
Nested Layer
POST /layers HTTP/1.1
Host: api.analyzere.net
{
"_type": "NestedLayer",
"description": "Nested Layer for Target",
"id": "b9c8be63-7251-4ade-98c7-fd53de354483",
"meta_data": {},
"sink": {"ref_id": "66fea650-f7ae-4f64-a9e1-bcd986c9611b"},
"sources": [{"ref_id": "e00cb143-3083-4035-8082-b0f990d878b6"}]
}
import analyzere
from analyzere import (
AnalysisProfile,
Layer,
LayerView,
Reinstatement,
LossSet,
MonetaryUnit,
)
# Define the baser url, user name and password of the server to be used
# Specify an analysis profile to use in order to generate metrics
loss_set1 = LossSet.retrieve('f6f688ef-585b-4d95-9ec0-d9275f282a63')
layer_source = Layer( type = 'CatXL',
description = 'Source Layer',
meta_data= {},
loss_sets=[loss_set1],
participation = 1.00,
attachment = MonetaryUnit(0, 'USD'),
limit = MonetaryUnit(1500000, 'USD'),
reinstatements=[Reinstatement(premium = 1.0, brokerage = 0.75)],
franchise=MonetaryUnit(0, 'USD')
).save()
layer_sink = Layer( type = 'QuotaShare',
description = 'Unlimited quota share Sink',
meta_data= {},
loss_sets=[],
participation = 1.00,
event_limit = MonetaryUnit(10000000000000000, 'USD')
).save()
layer_Nested = Layer( type = 'NestedLayer',
description = 'Nested Layer for Target',
meta_data = {},
sink = layer_sink,
sources = [Layer.retrieve(layer_source.to_dict()["id"])]
).save()
using AnalyzeRe;
using AnalyzeRe.Layers;
Nested layer = new Nested
{
description = "Nested Layer for Target",
// Note that sink/source can be *inlined* references (unsaved layer definitions)
sink = new QuotaShare {
description = "Unlimited quota share Sink",
event_limit = new MonetaryUnit(10000000000000000, "USD"),
participation = 1.0
}.ToReference(),
// Nested.Sources is a helper class for building a source reference list.
sources = new Nested.Sources {
new CatXL {
description = "Source Layer",
loss_sets = new List<IReference<LossSet>> { new Reference<LossSet>("f6f688ef-585b-4d95-9ec0-d9275f282a63") },
participation = 1.0,
attachment = new MonetaryUnit(0, "USD"),
limit = new MonetaryUnit(1500000, "USD"),
reinstatements = new List<Reinstatement> { new Reinstatement { premium = 1.0, brokerage = 0.75 } },
franchise = new MonetaryUnit(0, "USD"),
}.ToReference()
}
}.Post();
Response Body:
{
"_type": "NestedLayer",
"description": "Nested Layer for Target",
"id": "b9c8be63-7251-4ade-98c7-fd53de354483",
"meta_data": {},
"sink": {"ref_id": "66fea650-f7ae-4f64-a9e1-bcd986c9611b"},
"sources": [{"ref_id": "e00cb143-3083-4035-8082-b0f990d878b6"}]
}
Arguments
Attribute | Traits | Description |
---|---|---|
_type | required | NestedLayer |
description | required | |
meta_data | optional | |
sink | required | Can only be one value |
sources | required | One or more values represented in parantheses [] |
Retrieve
Generic
GET /layers/89804e42-e048-4146-a0b7-1ca9da0da798 HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('89804e42-e048-4146-a0b7-1ca9da0da798')
using AnalyzeRe;
using AnalyzeRe.Layers;
Generic layer = API.Get<Generic>("89804e42-e048-4146-a0b7-1ca9da0da798");
Response Body:
{
"_type": "Generic",
"id": "89804e42-e048-4146-a0b7-1ca9da0da798",
"description": "Demo 1 Echo Re Layer 1",
"meta_data": {
"nth": 1,
"if_cover_florida": 1
},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 55774.15217,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [],
"participation": 0.098,
"attachment": {
"value": 1000000,
"currency": "USD"
},
"limit": {
"value": 2000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 0,
"currency": "USD"
},
"aggregate_limit": {
"value": 0,
"currency": "USD"
},
"reinstatements": [],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Excess of Loss
GET /layers/7a61ffdf-1598-4e51-a7bb-09c918541fc8 HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('7a61ffdf-1598-4e51-a7bb-09c918541fc8')
using AnalyzeRe;
using AnalyzeRe.Layers;
CatXL layer = API.Get<CatXL>("7a61ffdf-1598-4e51-a7bb-09c918541fc8");
Response Body:
{
"_type": "CatXL",
"id": "7a61ffdf-1598-4e51-a7bb-09c918541fc8",
"description": "Alpha Re Layer 1",
"meta_data": {},
"inception_date": "2017-03-17T14:02:43.837000Z",
"expiry_date": "2018-03-16T14:02:43.837000Z",
"premium": {
"value": 100000,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
"ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
},
{
"href": "https://api.analyzere.net/loss_sets/9fadbccf-178e-4400-9bc3-5fff17886cb0",
"ref_id": "9fadbccf-178e-4400-9bc3-5fff17886cb0"
}
],
"participation": 0.25,
"nth": 1,
"attachment": {
"value": 1718242.18923324,
"currency": "USD"
},
"limit": {
"value": 1718242.18923324,
"currency": "USD"
},
"reinstatements": [
{
"premium": 0.1,
"brokerage": 0.05
},
{
"premium": 0.2,
"brokerage": 0.05
},
{
"premium": 0.3,
"brokerage": 0.05
}
],
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Aggregate Excess of Loss
GET /layers/b0aa6a44-f1c6-43b9-9747-116b5a1f2537 HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('b0aa6a44-f1c6-43b9-9747-116b5a1f2537')
using AnalyzeRe;
using AnalyzeRe.Layers;
AggXL layer = API.Get<AggXL>("b0aa6a44-f1c6-43b9-9747-116b5a1f2537");
Response Body:
{
"_type": "AggXL",
"id": "b0aa6a44-f1c6-43b9-9747-116b5a1f2537",
"description": "Golf Re Layer 1",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 119718.3336,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
"ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
},
{
"href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
"ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
},
{
"href": "http://api.analyzere.net/loss_sets/1dd318b0-9af9-4716-9e08-f4811708a117",
"ref_id": "1dd318b0-9af9-4716-9e08-f4811708a117"
}
],
"participation": 0.098,
"attachment": {
"value": 10000000,
"currency": "USD"
},
"limit": {
"value": 5000000,
"currency": "USD"
},
"aggregate_attachment": {
"value": 10000000,
"currency": "USD"
},
"aggregate_limit": {
"value": 5000000,
"currency": "USD"
},
"franchise": {
"value": 0,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Quota Share
GET /layers/4c2608d7-6f87-4f77-b470-d65d39d1b950 HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('4c2608d7-6f87-4f77-b470-d65d39d1b950')
using AnalyzeRe;
using AnalyzeRe.Layers;
QuotaShare layer = API.Get<QuotaShare>("4c2608d7-6f87-4f77-b470-d65d39d1b950");
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "QuotaShare",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"event_limit": {
"value": 300000,
"currency": "USD"
},
"participation": 0.098,
"meta_data": {},
"description": "India Re Layer 5"
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Aggregate Quota Share
GET /layers/c25618e5-dcb3-4592-8ece-9d7926a1f3ab HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('c25618e5-dcb3-4592-8ece-9d7926a1f3ab')
using AnalyzeRe;
using AnalyzeRe.Layers;
AggregateQuotaShare layer = API.Get<AggregateQuotaShare>("c25618e5-dcb3-4592-8ece-9d7926a1f3ab");
Response Body:
{
"_type": "AggregateQuotaShare",
"id": "c25618e5-dcb3-4592-8ece-9d7926a1f3ab",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"policy": null,
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
},
"aggregate_limit": {
"value": 1000000,
"currency": "USD"
}
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Back Allocated
GET /layers/c25618e5-dcb3-4592-8ece-9d7926a1f3ab HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('c25618e5-dcb3-4592-8ece-9d7926a1f3ab')
using AnalyzeRe;
using AnalyzeRe.Layers;
BackAllocatedLayer layer = API.Get<BackAllocatedLayer>("c25618e5-dcb3-4592-8ece-9d7926a1f3ab");
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "BackAllocatedLayer",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"sink": {"ref_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf91", "reference_type": "LayerView"},
"source_id": "f7e116dc-9e88-4d4c-ada3-6307194ecf92",
"meta_data": {},
"description": "Windstorm contributions"
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Value Allocator
GET /layers/c25618e5-dcb3-4592-8ece-9d7926a1f3ab HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('c25618e5-dcb3-4592-8ece-9d7926a1f3ab')
using AnalyzeRe;
using AnalyzeRe.Layers;
ValueAllocator layer = API.Get<ValueAllocator>("c25618e5-dcb3-4592-8ece-9d7926a1f3ab");
Response Body:
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "ValueAllocator",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"description": "Value Allocator",
"meta_data": {},
"source": {"ref_id": "00000000-0000-0000-0000-000000000001", "reference_type": "LayerView"},
"target": {"ref_id": "00000000-0000-0000-0000-000000000002", "reference_type": "LayerView"},
"group": {"ref_id": "00000000-0000-0000-0000-000000000003", "reference_type": "LayerView"},
"proportioned_perspective" : "LossNetOfAggregateTerms",
"allocation_perspectives" : ["LossNetOfAggregateTerms", "ReinstatementPremium", "ReinstatementBrokerage"]
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
Nested Layer
GET /layers/b9c8be63-7251-4ade-98c7-fd53de354483 HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layer = Layer.retrieve('b9c8be63-7251-4ade-98c7-fd53de354483')
using AnalyzeRe;
ValueAllocator layer = API.Get<ValueAllocator>("b9c8be63-7251-4ade-98c7-fd53de354483");
Response Body:
{
"_type": "NestedLayer",
"created": "2019-04-11T19:22:03.606556+00:00",
"description": "Nested Layer for Target",
"id": "b9c8be63-7251-4ade-98c7-fd53de354483",
"meta_data": {},
"modified": "2019-04-11T19:22:03.606556+00:00",
"sink": {"ref_id": "66fea650-f7ae-4f64-a9e1-bcd986c9611b"},
"sources": [{"ref_id": "e00cb143-3083-4035-8082-b0f990d878b6"}]
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the resource to be retrieved |
List Layers
GET /layers?search=India%20Re&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import Layer
layers = Layer.list(search='India Re',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<Layer> layers = API.SearchResourceList<Layer>(
"India Re", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "4c2608d7-6f87-4f77-b470-d65d39d1b950",
"_type": "QuotaShare",
"created": "2018-08-16T16:42:34.291515Z",
"modified": "2018-08-16T16:42:34.291515Z",
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [
{
"_type": "FixedExpense",
"name": "MyFixedExpense",
"payout_date": "2018-01-15T00:00:00Z",
"amount": {
"value": 1500,
"currency": "USD"
}
},
{
"_type": "ProportionalExpense",
"name": "MyProportionalExpense",
"payout_date": "2017-05-16T00:00:00Z",
"rate": 0.04,
"premiums": [
{"ref": ["Layer", "Premium"]}
]
}
],
"policy": {
"transform_records": [
"Loss",
"FixedExpense"
],
"forward_records": [
"ProportionalExpense"
]
},
"event_limit": {
"value": 300000,
"currency": "USD"
},
"participation": 0.098,
"meta_data": {},
"description": "India Re Layer 5"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Layers of all types are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Layers to return (default 100) |
offset | optional | the number of Layers to skip before returning the limit |
fields | optional | a list of the Layer fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Layer fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Layers to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Layers by description (case-insensitive substring match) |
description | optional | filters the list of Layers by description (case-sensitive exact match) |
ordering | optional | orders the list of Layers |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Layer Views
A Layer View represents the analysis of a Layer. Layer Views (or Portfolio Views) are required for metrics requests. In order to query metrics for a Layer, you must create a corresponding Layer View.
Definition
{
"id": "89ad2976-5c4c-e5cc-4b0b-53be184851b9",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer": {
"_type": "QuotaShare",
"id": "f35ec156-2072-48fd-b96a-860fc4c4cdcc",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
},
"target_currency": "USD",
"ylt_id": "e05565a2-e303-6ede-88d1-18ae991f3173"
}
Attributes
Attribute | Type | Description |
---|---|---|
id | string | a server-generated UUID |
analysis_profile | Reference Analysis Profile | The Analysis Profile to use for this analysis |
layer | Inline Layer | The Layer to analyze |
target_currency | string | The ISO 4217 currency code to use by default for metrics results |
ylt_id | string | a server-generated UUID representing the completed analysis |
Create
Option 1: Using a saved layer
POST /layer_views HTTP/1.1
Host: api.analyzere.net
{
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer": {
"href": "https://api.analyzere.net/layers/f35ec156-2072-48fd-b96a-860fc4c4cdcc",
"ref_id": "f35ec156-2072-48fd-b96a-860fc4c4cdcc"
},
"target_currency": "USD"
}
from analyzere import (
AnalysisProfile,
Layer,
LayerView
)
analysis_profile = AnalysisProfile.retrieve('286cb65c-07ec-4482-a192-427889471b8d')
layer = Layer.retrieve('f35ec156-2072-48fd-b96a-860fc4c4cdcc')
layer_view = LayerView(analysis_profile=analysis_profile,
layer=layer,
target_currency='USD').save()
using AnalyzeRe;
using AnalyzeRe.Layers;
ILayerView layerView = LayerViews.Create(
API.Layers.GetItem("f35ec156-2072-48fd-b96a-860fc4c4cdcc"),
new Reference<AnalysisProfile>("286cb65c-07ec-4482-a192-427889471b8d"),
"USD"
).Post();
Option 2: Using an inline layer definition
POST /layer_views HTTP/1.1
Host: api.analyzere.net
{
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer": {
{
"_type": "QuotaShare",
"description": "India Re Layer 5",
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
}
},
"target_currency": "USD"
}
from analyzere import (
AnalysisProfile,
Layer,
LayerView
)
from datetime import datetime, timezone
analysis_profile = AnalysisProfile.retrieve('286cb65c-07ec-4482-a192-427889471b8d')
loss_set1 = LossSet.retrieve('e7e116dc-9e88-4d4c-ada3-6307194ecf9a')
loss_set2 = LossSet.retrieve('9d991b36-48fd-45a5-a322-c9286868a98d')
layer_view = LayerView(analysis_profile=analysis_profile,
layer=Layer(type='QuotaShare',
description = 'India Re Layer 5',
meta_data = {},
inception_date=datetime(2017, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
expiry_date=datetime(2018, 1, 23, 4, 0, 0, tzinfo=timezone.utc),
premium=MonetaryUnit(245810.8696, 'USD'),
loss_sets=[loss_set1, loss_set2],
participation=0.098,
event_limit=MonetaryUnit(300000, 'USD')
),
target_currency='USD').save()
using System;
using AnalyzeRe;
using AnalyzeRe.Layers;
using AnalyzeRe.LossSets;
LayerView<QuotaShare> layerView = new LayerView<QuotaShare> {
layer = new QuotaShare {
description = "India Re Layer 5",
inception_date = new DateTime(2017, 1, 23, 4, 0, 0),
expiry_date = new DateTime(2018, 1, 23, 4, 0, 0),
premium = new MonetaryUnit(245810.8696, "USD"),
participation = 0.098
event_limit = new MonetaryUnit(300000, "USD"),
loss_sets = new List<IReference<LossSet>> {
new Reference<PortfolioLossSet>("e7e116dc-9e88-4d4c-ada3-6307194ecf9a"),
new Reference<PortfolioLossSet>("9d991b36-48fd-45a5-a322-c9286868a98d")
}
},
analysis_profile = new Reference<AnalysisProfile>("286cb65c-07ec-4482-a192-427889471b8d"),
target_currency = "USD"
}.Post();
Response Body:
{
"id": "89ad2976-5c4c-e5cc-4b0b-53be184851b9",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer": {
"_type": "QuotaShare",
"id": "f35ec156-2072-48fd-b96a-860fc4c4cdcc",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
},
"target_currency": "USD",
"ylt_id": "e05565a2-e303-6ede-88d1-18ae991f3173"
}
Layer Views can be created using either inline Layer definitions, references to existing Layers or LayerView. However, Layer Views will only store inline Layer definitions. Thus, changes to a referenced Layer will not be reflected in the Layer View. A new Layer View must be created to analyze the changed Layer.
Arguments
Attribute | Traits | Description |
---|---|---|
analysis_profile | required | |
layer | required | |
target_currency | optional |
Retrieve
GET /layer_views/89ad2976-5c4c-e5cc-4b0b-53be184851b9 HTTP/1.1
Host: api.analyzere.net
from analyzere import LayerView
layer = LayerView.retrieve('89ad2976-5c4c-e5cc-4b0b-53be184851b9')
using AnalyzeRe;
ILayerView layerView = API.Get<ILayerView>("89ad2976-5c4c-e5cc-4b0b-53be184851b9");
Response Body:
{
"id": "89ad2976-5c4c-e5cc-4b0b-53be184851b9",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer": {
"_type": "QuotaShare",
"id": "f35ec156-2072-48fd-b96a-860fc4c4cdcc",
"description": "India Re Layer 5",
"meta_data": {},
"inception_date": "2017-01-23T04:00:00Z",
"expiry_date": "2018-01-23T04:00:00Z",
"premium": {
"value": 245810.8696,
"currency": "USD"
},
"fees": [],
"loss_sets": [
{
"href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
"ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
},
{
"href": "http://api.analyzere.net/loss_sets/9d991b36-48fd-45a5-a322-c9286868a98d",
"ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
}
],
"participation": 0.098,
"event_limit": {
"value": 300000,
"currency": "USD"
}
},
"target_currency": "USD",
"ylt_id": "e05565a2-e303-6ede-88d1-18ae991f3173"
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the Layer View to be retrieved |
Portfolios
Layers can be grouped together to form Portfolios. There is no restriction on the number of Layers that can be a part of a Portfolio, and a Layer may belong to many Portfolios.
Portfolio Class | Description |
---|---|
StaticPortfolio | User managed portfolio |
Definition
Static Portfolio
{
"id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"_type": "StaticPortfolio",
"created": "2016-03-09T18:46:07.945446Z",
"modified": "2016-03-09T18:46:07.945446Z",
"name": "2015 North American In Force",
"layers": [
{
"href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
"ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
}
],
"meta_data": {},
"description": "All North American exposures"
}
A Static Portfolio is user-managed: users control which Layers belong to a Static Portfolio by explicitly setting its members.
Attributes
Name | Type | Description |
---|---|---|
_type | Type | The server name for this type of Portfolio. |
id | string | A server-generated UUID. |
name | string | The name of the Portfolio. |
description | string | A short description of the Portfolio. |
layers | Reference Layer |
The Layers that are a part of the Portfolio. |
Create
Static Portfolio
from analyzere import Layer, Portfolio
static_portfolio = Portfolio(name='2015 North American In Force',
description='All North American exposures'
layers=[Layer.retrieve('768c8554-6fa8-464b-8878-5ac1792ffdb5')]).save()
using AnalyzeRe;
StaticPortfolio portfolio = new StaticPortfolio();
portfolio.name = "2015 North American In Force";
portfolio.description = "All North American exposures";
portfolio.layers.Add(new Reference<Layer>("768c8554-6fa8-464b-8878-5ac1792ffdb5"));
portfolio = portfolio.Save();
POST /portfolios HTTP/1.1
Host: api.analyzere.net
{
"_type": "StaticPortfolio",
"name": "2015 North American In Force",
"description": "All North American exposures",
"layers": [
{
"ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5",
"ref_type": "Generic",
"href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5"
}
]
}
Response Body
{
"id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"_type": "StaticPortfolio",
"created": "2016-03-09T18:46:07.945446Z",
"modified": "2016-03-09T18:46:07.945446Z",
"name": "2015 North American In Force",
"layers": [
{
"href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
"ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
}
],
"meta_data": {},
"description": "All North American exposures"
}
Name | Traits | Description |
---|---|---|
name | required | |
description | required | |
layers | required |
Retrieve
Static Portfolio
from analyzere import Portfolio
portfolio = Portfolio.retrieve('e5110b09-fbb5-49ca-9f00-3e4928bc328e')
using AnalyzeRe;
StaticPortfolio portfolio = API.Get<StaticPortfolio>("e5110b09-fbb5-49ca-9f00-3e4928bc328e");
GET /portfolios/e5110b09-fbb5-49ca-9f00-3e4928bc328e HTTP/1.1
Host: api.analyzere.net
Response Body
{
"id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"_type": "StaticPortfolio",
"created": "2016-03-09T18:46:07.945446Z",
"modified": "2016-03-09T18:46:07.945446Z",
"name": "2015 North American In Force",
"layers": [
{
"href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
"ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
}
],
"meta_data": {},
"description": "All North American exposures"
}
Name | Traits | Description |
---|---|---|
id | required | The UUID of the Portfolio to be retrieved |
List Portfolios
GET /portfolios?search=North%20American&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import Portfolio
portfolios = Portfolio.list(search='North American',
ordering='-created')
using AnalyzeRe;
using System.Collections.Generic;
IEnumerable<Portfolio> portfolios = API.SearchResourceList<Portfolio>(
"North American", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"_type": "StaticPortfolio",
"created": "2016-03-09T18:46:07.945446Z",
"modified": "2016-03-09T18:46:07.945446Z",
"name": "2015 North American In Force",
"layers": [
{
"href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
"ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
}
],
"meta_data": {},
"description": "All North American exposures"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Portfolios are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Portfolios to return (default 100) |
offset | optional | the number of Portfolios to skip before returning the limit |
fields | optional | a list of the Portfolio fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Portfolio fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Portfolios to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Portfolios by name and description (case-insensitive substring match) |
name | optional | filters the list of Portfolios by name (case-sensitive exact match) |
description | optional | filters the list of Portfolios by description (case-sensitive exact match) |
ordering | optional | orders the list of Portfolios |
ordering
accepts the following values (case-sensitive):
id
created
modified
name
description
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Portfolio Views
A Portfolio View represents the analysis of a Portfolio. Portfolio Views (or Layer Views) are required for metrics requests. In order to query metrics for a Portfolio, you must create a corresponding Portfolio View.
For analyzing marginal changes to a Portfolio, see Marginal Portfolio Views.
Definition
{
"id": "53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer_views": [
{
"href": "https://api.analyzere.net/layer_views/a474595b-06d1-4da8-2ad4-c797dc138fc4",
"ref_id": "a474595b-06d1-4da8-2ad4-c797dc138fc4"
}
],
"portfolio": {
"href": "https://api.analyzere.net/portfolios/e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"ref_id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e"
},
"target_currency": "USD",
"ylt_id": "300a568e-b1c5-8c7e-31af-03e538b2e7e4"
}
Attributes
Attribute | Type | Description |
---|---|---|
id | string | a server-generated UUID |
analysis_profile | Reference Analysis Profile | The Analysis Profile to use for this analysis |
layer_views | list(Reference Layer View) | The Layer Views included in this Portfolio View (server-generated if portfolio is supplied) |
portfolio | Reference Portfolio | The Portfolio to analyze |
target_currency | string | The ISO 4217 currency code to use by default for metrics results |
ylt_id | string | a server-generated UUID representing the completed analysis |
Create
POST /portfolio_views HTTP/1.1
Host: api.analyzere.net
{
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"portfolio": {
"href": "https://api.analyzere.net/portfolios/e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"ref_id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e"
},
"target_currency": "USD"
}
from analyzere import (
AnalysisProfile,
Portfolio,
PortfolioView
)
analysis_profile = AnalysisProfile.retrieve('286cb65c-07ec-4482-a192-427889471b8d')
portfolio = Portfolio.retrieve('e5110b09-fbb5-49ca-9f00-3e4928bc328e')
portfolio_view = PortfolioView(analysis_profile=analysis_profile,
portfolio=portfolio,
target_currency='USD').save()
using AnalyzeRe;
PortfolioView portfolioView = new PortfolioView() {
analysis_profile = new Reference<AnalysisProfile>("286cb65c-07ec-4482-a192-427889471b8d"),
portfolio = new Reference<StaticPortfolio>("e5110b09-fbb5-49ca-9f00-3e4928bc328e"),
target_currency = "USD"
}.Post();
Response Body:
{
"id": "53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer_views": [
{
"href": "https://api.analyzere.net/layer_views/a474595b-06d1-4da8-2ad4-c797dc138fc4",
"ref_id": "a474595b-06d1-4da8-2ad4-c797dc138fc4"
}
],
"portfolio": {
"href": "https://api.analyzere.net/portfolios/e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"ref_id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e"
},
"target_currency": "USD",
"ylt_id": "300a568e-b1c5-8c7e-31af-03e538b2e7e4"
}
Portfolio Views can be created using either a list of references to existing Layer Views or a reference to a Portfolio. If a reference to a Portfolio is used, Layer Views will be created for the Layers in that Portfolio and the resulting Portfolio View will depend on these Layer Views. Thus, changes to the referenced Portfolio will not be reflected in the Portfolio View. A new Portfolio View must be created to analyze the changed Portfolio.
Only one of layer_views
and portfolio
may be provided. Providing both will
result in an error.
Arguments
Attribute | Traits | Description |
---|---|---|
analysis_profile | required | |
layer_views | required (if portfolio not provided) |
|
portfolio | required (if layer_views not provided) |
|
target_currency | optional |
Retrieve
GET /portfolio_views/53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe HTTP/1.1
Host: api.analyzere.net
from analyzere import PortfolioView
portfolio = PortfolioView.retrieve('53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe')
using AnalyzeRe;
PortfolioView portfolioView = API.Get<PortfolioView>("53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe");
Response Body:
{
"id": "53ed2634-fa83-a0ae-2fcb-8e6d3b8902fe",
"analysis_profile": {
"href": "https://api.analyzere.net/analysis_profiles/286cb65c-07ec-4482-a192-427889471b8d",
"ref_id": "286cb65c-07ec-4482-a192-427889471b8d"
},
"layer_views": [
{
"href": "https://api.analyzere.net/layer_views/a474595b-06d1-4da8-2ad4-c797dc138fc4",
"ref_id": "a474595b-06d1-4da8-2ad4-c797dc138fc4"
}
],
"portfolio": {
"href": "https://api.analyzere.net/portfolios/e5110b09-fbb5-49ca-9f00-3e4928bc328e",
"ref_id": "e5110b09-fbb5-49ca-9f00-3e4928bc328e"
},
"target_currency": "USD",
"ylt_id": "300a568e-b1c5-8c7e-31af-03e538b2e7e4"
}
Arguments
Attribute | Traits | Description |
---|---|---|
id | required | The UUID of the Portfolio View to be retrieved |
Metrics
Metrics, in general, includes Tail Metrics, TVaR (tail value at risk), Window Metrics, Window VaR (window value at risk), Tail Co Metrics, Window Co Metrics, and EL (expected loss). Metrics can be accessed for both Layer Views and Portfolio Views. Tail metrics take a list of probabilities as input. Window metrics take a list of probability ranges (windows) as input.
PRIME also supports downloading of YLTs and YELTs directly.
Metrics-specific conventions
LayerView and PortfolioView Metrics
Both LayerViews and PortfolioViews support the metrics described below. The metric that will be calculated depends entirely on the resource for which the metric is requested. Any differences in the request/response format will be highlighted.
Perspective
Examples
========
Layers
------
1. Layer's layered losses only:
http://api.analyzere.net/layer_views/<UUID>/tail_metrics/0.5?perspective=NetLoss
2. Layer's up-front premium only:
http://api.analyzere.net/layer_views/<UUID>/tail_metrics/0.5?perspective=Premium
3. Layer's total premium income including premium from reinstatements:
http://api.analyzere.net/layer_views/<UUID>/tail_metrics/0.5?perspective=Premium,ReinstatementPremium
4. Layer's layered losses net of premium income:
http://api.analyzere.net/layer_views/<UUID>/tail_metrics/0.5?perspective=NetLoss,Premium,ReinstatementPremium
5. Layer's expenses other than loss expenses:
http://api.analyzere.net/layer_views/<UUID>/tail_metrics/0.5?perspective=ReinstatementBrokerage,FixedExpense,ProportionalExpense,ProfitCommission,NoClaimsBonus
Portfolios
----------
1. Portfolio's total losses:
http://api.analyzere.net/portfolio_views/<UUID>/tail_metrics/0.5?perspective=NetLoss
2. Portfolio's total up-front premium:
http://api.analyzere.net/portfolio_views/<UUID>/tail_metrics/0.5?perspective=Premium
3. Portfolio's total premium income including premium from reinstatements:
http://api.analyzere.net/portfolio_views/<UUID>/tail_metrics/0.5?perspective=Premium,ReinstatementPremium
4. Portfolio's total premium income including premium from reinstatements in
June 2020. This query may be useful for cash flow management:
http://api.analyzere.net/portfolio_views/<UUID>/tail_metrics/0.5?perspective=Premium,ReinstatementPremium&reporting_period_begin=2020-06-01&reporting_period_end=2020-07-01
The perspective
is a parameter provided to a metrics request that defines
which financial perspective should be used to compute the requested
metrics. A Layer View or Portfolio View
may have multiple financial perspectives, which typically differ in what
additional income or expense is included when determining a loss. For
example, we may want to obtain metrics on a contract for only the claimed
losses or we may want to include income such as premium and reinstatement
premium, or expenses such as reinstatement brokerage or fees.
Analyze Re allows for each financial component to be specified individually
or in combination. When specified individually as a stand-alone value the sign
on the returned value is positive for both income and expenses. That is,
when requesting an income component such as Premium
, the value returned is
positive if there is a positive income. On the other hand, when requesting
an expense component, such as NetLoss
the value returned is also
positive.
When specifying financial components in combination, different financial
components are automatically added or subtracted, depending on whether
they are an expense or income. Since Analyze Re considers losses as
positive values, expenses are additive and income is subtractive. For
example, when requesting the net loss net of premium (e.g.
NetLoss,Premium
) the resulting value is positive if NetLoss
is greater
than the Premium
income and negative if the Premium
income is greater
than the NetLoss
.
In addition, all financial components are subject to filters and reporting period, which means that financial components whose “transaction” does not match the optionally specified filter or fall outside of the optionally specified reporting period are not considered during accumulation.
Analyze Re provides the following perspective modifiers to be selected:
LossGross
: Losses as they flow into the structure being queried without any terms applied. This perspective cannot be combined with other perspective modifiers.- Any combination of:
NetLoss
: Losses after applying all financial terms (expense).Premium
: Up-front premium (income).ReinstatementPremium
: Reinstatement premium earned (income).ReinstatementBrokerage
: Reinstatement brokerage paid (expense).FixedExpense
: Any fixed expenses specified as part of the layer (expense).ProportionalExpense
: Any proportional expense specified as part of the layer (expense).ProfitCommission
: Any profit commission specified as part of the layer (expense).NoClaimsBonus
: Any no-claims bonus specified as part of the layer (expense).
Default Perspective
When no perspective
parameter is provided the default perspective is
assumed which is equivalent to
perspective=NetLoss,FixedExpense,ProportionalExpense,ProfitCommission,NoClaimsBonus
.
This default perspective is compatible with the default legacy perspective
LossNetOfAggregateTerms
of the legacy perspective
filtering.
Restrictions
Not all financial components included in the modelling of a contract or portfolio can be associated with individual occurrences or events, and thus cannot be filtered using event filters or meaningfully included in OEP metrics.
Event Filters
Event Filters operate by applying selection criteria on the meta information
associated with individual events. Some financial components, such as
Premium
, NoClaimsBonus
and other expense structures, are not associated
with any events and thus cannot be meaningfully filtered using event filters.
Extra precaution should be taken when querying perspectives including these
financial components in combination with event filters. The system generally
does not restrict the use of such combination and it is the responsibility of
the user to determine meaningful queries.
There is one restriction that the system imposes, which is the use of the
Premium
financial component in combination with Event Filters.
Generally safe combinations of perspective modifiers in conjunction with Event Filters are combinations of the following:
NetLoss
ReinstatementPremium
ReinstatementBrokerage
OEP
Similar to event filters, OEP metrics are computed from individual occurrences and depending on the use case not all financial components can be considered occurrences. For example in some use cases a No-Claims Bonus or Profit Commission payment may be considered a stand-alone occurrence, while other use cases may reserve the term “occurrence” for event losses only.
The system does not apply any restrictions of what financial components can be used in combination with OEP metrics. It is the responsibility of the user to determine a combination that is meaningful to their use case.
Legacy Perspective Filtering
The perspective filtering described in the section above was introduced as part
of Release 121. Prior to this release the perspective
parameter only
supported the following values:
LossGross
: Losses as they flow into the structure being queried without any terms applied. This perspective cannot be combined with other perspective modifiers.LossNetOfAggregateTerms
: Losses after applying all financial terms including any expenses (except reinstatement brokerage).ReinstatementPremium
: Reinstatement premium earned (income).ReinstatementBrokerage
: Reinstatement brokerage paid (expense).LossNetOfAggregateTerms[X,Y,Z]
- where X, Y, Z is any combination of:
Premium
,ReinstatementPremium
, andReinstatementBrokerage
- Losses after applying all financial terms including any expenses and optionally deducting up-front premiun, reinstatement premium or adding reinstatement brokerage.
- where X, Y, Z is any combination of:
This form of specifying perspective filters is still supported in Analyze
Re, but users are encouraged to utilize the new form. Please note, that the
use of LossNetOfAggregateTerms
as a perspective component, prohibits the
use of any of the “fee” components (e.g. FixedExpense
,
ProportionalExpense
, ProfitCommission
, and NoClaimsBonus
) as they are
already included in this perspective.
The default perspective is LossNetOfAggregateTerms
.
Additional Columns
YELTs with additional columns may be downloaded. Additional columns are specified as a comma-separated list of strings. Possible additional columns are:
RecordType
ReinstatementPremium
ReinstatementBrokerage
By default, no additional columns are downloaded.
Embedded Objects
Context
The context of a metrics request, indicating what parameters were used in the simulation that produced the associated metrics response. The context varies depending on the type of metrics request. See individual metrics for the structure of their context.
Definition
Tail Metrics
LayerView
{
"_type": "LayerViewMetrics",
"kurtosis": 0.0,
"max": 4800000.0,
"mean": 4800000.0,
"min": 4800000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "LayerViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": false,
"probability": 0.1
}
}
PortfolioView
{
"_type": "PortfolioViewMetrics",
"kurtosis": 0.0,
"max": 20000000.0,
"mean": 20000000.0,
"min": 20000000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "PortfolioViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": true,
"probability": 0.1
}
}
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewMetrics or PortfolioViewMetrics |
context | Context | Context includes arguments of metrics request |
mean | float | Metrics result |
variance | float | Metrics result |
min | float | Metrics result |
max | float | Metrics result |
skewness | float | Metrics result |
kurtosis | float | Metrics result |
Tail Metrics Context
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewMetrics or PortfolioViewMetrics |
probability | float | Probability in range: (0.0, 1.0] |
currency | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
filter | string (filter name) | The name of the filter when filtering losses |
perspective | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | bool | Whether or not to apply secondary uncertainty |
aggregation_method | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | DateTime | Starting time of reporting |
reporting_period_end | DateTime | Ending time of reporting |
TVaR (Tail Value at Risk)
Shortcut for retrieving the mean loss of the tail.
Tail Co Metrics
LayerView
{
"_type": "LayerViewCoMetrics",
"context": {
"_type": "LayerViewCoMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": false,
"component": {
"href": "https://api.analyzere.net/layer_views/4fab6fee-bb04-1c82-e45b-9cd878d7cf5b",
"ref_id": "4fab6fee-bb04-1c82-e45b-9cd878d7cf5b"
},
"component_filter": "ANY_FILTER",
"component_perspective": "LossNetOfAggregateTerms",
"include_primary_metrics": false,
"probability": 0.1
},
"component_metrics": {
"mean": 10000000.0,
"min": 10000000.0,
"covariance": 0.0,
"correlation": 0.0
}
}
PortfolioView
{
"_type": "PortfolioViewCoMetrics",
"context": {
"_type": "PortfolioViewCoMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": true,
"component": {
"href": "https://api.analyzere.net/portfolio_views/a0ced66d-ccba-909b-0611-d6a4cd19f761",
"ref_id": "a0ced66d-ccba-909b-0611-d6a4cd19f761"
},
"component_filter": "ANY_FILTER",
"component_perspective": "LossNetOfAggregateTerms",
"include_primary_metrics": false,
"probability": 0.1
},
"component_metrics": {
"mean": 20000000.0,
"min": 20000000.0,
"covariance": 0.0,
"correlation": 0.0
}
}
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewCoMetrics or PortfolioViewCoMetrics |
context | [Context] | Context includes arguments of co metrics request |
component_metrics | [Tail Co metrics] | Co metrics results |
Tail Co Metrics Context
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewCometricsContext or PortfolioViewCoMetricsContext |
probability | float | Probability in range: (0.0, 1.0] |
currency | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
filter | string (filter name) | The name of the filter when filtering losses |
perspective | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | bool | Whether or not to apply secondary uncertainty |
aggregation_method | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | DateTime | Starting time of reporting |
reporting_period_end | DateTime | Ending time of reporting |
component | Reference | Reference (href and ref_id) LayerView or PortfolioView |
component_filter | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
component_perspective | string (choices) | The name of the perspective determining which metrics to return |
component_reporting_period_begin | DateTime | Starting time of reporting of the component LayerView or PortfolioView |
component_reporting_period_end | DateTime | Ending time of reporting of the component LayerView or PortfolioView |
include_primary_metrics | bool | Whether or not to include primary metrics in results |
Tail Co Metrics
Attribute | Type | Description |
---|---|---|
mean | float | Co metrics result |
covariance | float | Co metrics result |
min | float | Co metrics result |
correlation | float | Co metrics result |
Window Metrics
LayerView
{
"_type": "LayerViewMetrics",
"kurtosis": 0.0,
"max": 4800000.0,
"mean": 4800000.0,
"min": 4800000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "LayerViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": false
}
}
PortfolioView
{
"_type": "PortfolioViewMetrics",
"kurtosis": 0.0,
"max": 20000000.0,
"mean": 20000000.0,
"min": 20000000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "PortfolioViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": true
}
}
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewMetrics or PortfolioViewMetrics |
context | Context | Context includes arguments of window metrics request |
mean | float | Metrics result |
variance | float | Metrics result |
min | float | Metrics result |
max | float | Metrics result |
skewness | float | Metrics result |
kurtosis | float | Metrics result |
Window Metrics Context
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewMetricsContext or PortfolioViewMetricsContext |
min_probability | float | Input minimum probability, range: [0.0, 1.0) |
max_probability | float | Input maximum probability, range: [min_probability, 1.0] where max_probability != 0.0 |
currency | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
filter | string (filter name) | The name of the filter when filtering losses |
perspective | string (choices) | The name of the perspective determining which metrics to return |
layer_view or portfolio_view | Reference LayerView or PortfolioView | |
secondary_uncertainty | bool | Whether or not to apply secondary uncertainty. |
aggregation_method | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | DateTime | Starting time of reporting |
reporting_period_end | DateTime | Ending time of reporting |
component | Reference | Reference (href and ref_id) LayerView or PortfolioView |
component_filter | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
component_perspective | string (choices) | The name of the perspective determining which metrics to return |
component_reporting_period_begin | DateTime | Starting time of reporting of the component LayerView or PortfolioView |
component_reporting_period_end | DateTime | Ending time of reporting of the component LayerView or PortfolioView |
include_primary_metrics | bool | Whether or not to include primary metrics in results |
Window VaR (Window Value at Risk)
Shortcut for retrieving the mean loss of the probability window.
Window Co Metrics
LayerView
{
"_type": "LayerViewCoMetrics",
"context": {
"_type": "LayerViewCoMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": false,
"component": {
"href": "https://api.analyzere.net/layer_views/4fab6fee-bb04-1c82-e45b-9cd878d7cf5b",
"ref_id": "4fab6fee-bb04-1c82-e45b-9cd878d7cf5b"
},
"component_filter": "ANY_FILTER",
"component_perspective": "LossNetOfAggregateTerms",
"include_primary_metrics": false
},
"component_metrics": {
"mean": 10000000.0,
"min": 10000000.0,
"covariance": 0.0,
"correlation": 0.0
}
}
PortfolioView
{
"_type": "PortfolioViewCoMetrics",
"context": {
"_type": "PortfolioViewCoMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": true,
"component": {
"href": "https://api.analyzere.net/portfolio_views/a0ced66d-ccba-909b-0611-d6a4cd19f761",
"ref_id": "a0ced66d-ccba-909b-0611-d6a4cd19f761"
},
"component_filter": "ANY_FILTER",
"component_perspective": "LossNetOfAggregateTerms",
"include_primary_metrics": false
},
"component_metrics": {
"mean": 20000000.0,
"min": 20000000.0,
"covariance": 0.0,
"correlation": 0.0
}
}
Attributes
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewCoMetrics or PortfolioViewCoMetrics |
context | Context | Context includes arguments of co metrics request |
component_metrics | [Window Co metrics] | Co metrics results |
Window Co Metrics Context
Attribute | Type | Description |
---|---|---|
_type | string | LayerViewCometricsContext or PortfolioViewCoMetricsContext |
min_probability | float | Input minimum probability, range: [0.0, 1.0) |
max_probability | float | Input maximum probability, range: [min_probability, 1.0] where max_probability != 0.0 |
currency | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
filter | string (filter name) | The name of the filter when filtering losses |
perspective | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | bool | Whether or not to apply secondary uncertainty |
aggregation_method | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | DateTime | Starting time of reporting |
reporting_period_end | DateTime | Ending time of reporting |
component | Reference | Reference (href and ref_id) LayerView or PortfolioView |
component_filter | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
component_perspective | string (choices) | The name of the perspective determining which metrics to return |
component_reporting_period_begin | DateTime | Starting time of reporting of the component LayerView or PortfolioView |
component_reporting_period_end | DateTime | Ending time of reporting of the component LayerView or PortfolioView |
include_primary_metrics | bool | Whether or not to include primary metrics in results |
Window Co Metrics
Attribute | Type | Description |
---|---|---|
mean | float | Co metrics result |
covariance | float | Co metrics result |
min | float | Co metrics result |
correlation | float | Co metrics result |
Retrieve
Tail Metrics
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
tail_metrics = layer_view.tail_metrics(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
TailMetrics tail_metrics = layer_view.tail_metrics(0.1)
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/tail_metrics/0.1 HTTP/1.1
Host: api.analyzere.net
Response Body
{
"_type": "LayerViewMetrics",
"kurtosis": 0.0,
"max": 4800000.0,
"mean": 4800000.0,
"min": 4800000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "LayerViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": false,
"probability": 0.1
}
}
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
tail_metrics = portfolio_view.tail_metrics(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
TailMetrics tail_metrics = portfolio_view.tail_metrics(0.1)
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/tail_metrics/0.1 HTTP/1.1
Host: api.analyzere.net
Response Body
{
"_type": "PortfolioViewMetrics",
"kurtosis": 0.0,
"max": 20000000.0,
"mean": 20000000.0,
"min": 20000000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "PortfolioViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"currency": "USD",
"apply_participation": true,
"probability": 0.1
}
}
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
probability | required | float | Probability in range: (0.0, 1.0] |
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
perspective | optional | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
aggregation_method | optional | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting |
reporting_period_end | optional | DateTime | Ending time of reporting |
TVaR (Tail Value at Risk)
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
tvar = layer_view.tvar(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
TailMetrics tail_metrics = layer_view.tail_metrics(
0.1, MetricsOptions.Default);
double tvar = tail_metrics.mean;
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/tvar/0.1 HTTP/1.1
Host: api.analyzere.net
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
tvar = portfolio_view.tvar(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<LayerView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
TailMetrics tail_metrics = portfolio_view.tail_metrics(
0.1, MetricsOptions.Default);
double tvar = tail_metrics.mean;
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/tvar/0.1 HTTP/1.1
Host: api.analyzere.net
Tail Co Metrics
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('10b25b62-a705-b44c-63c3-cf40d575da4b')
tail_co_metrics = layer_view.co_metrics([0.1,0.2], component_id='4fab6fee-bb04-1c82-e45b-9cd878d7cf5b', component_type='LayerView')
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("10b25b62-a705-b44c-63c3-cf40d575da4b");
LayerView component_layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
List<CoMetrics> co_metrics = layer_view.co_metrics(
new []{0.1, 0.2}, component_layer_view.ToReference(), CoMetricsOptions.Default);
GET /layer_views/c10b25b62-a705-b44c-63c3-cf40d575da4b/co_metrics/0.1,0.2?component_id=4fab6fee-bb04-1c82-e45b-9cd878d7cf5b&component_type=LayerView HTTP/1.1
Host: api.analyzere.net
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
tail_co_metrics = portfolio_view.co_metrics([0.1,0.2], component_id='a0ced66d-ccba-909b-0611-d6a4cd19f761', component_type='PortfolioView')
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
PortfolioView component_portfolio_view = API.Get<PortfolioView>("a0ced66d-ccba-909b-0611-d6a4cd19f761");
List<CoMetrics> co_metrics = portfolio_view.co_metrics(
new List<double>(){0.1, 0.2}, component_layer_view.ToReference(), CoMetricsOptions.Default);
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/co_metrics/0.1,0.2?component_id=a0ced66d-ccba-909b-0611-d6a4cd19f761&component_type=PortfolioView HTTP/1.1
Host: api.analyzere.net
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
probability | required | float | Probability in range: (0.0, 1.0] |
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
perspective | optional | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
aggregation_method | optional | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting (yyyy-mm-ddThh:mm:ss) |
reporting_period_end | optional | DateTime | Ending time of reporting (yyyy-mm-ddThh:mm:ss) |
component_id | required | UUID | The component LayerView or PortfolioView ID |
component_type | required | string | LayerView or PortfolioView |
component_filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
component_perspective | optional | string (choices) | The name of the perspective determining which metrics to return |
component_reporting_period_begin | optional | DateTime | Starting time of reporting of the component LayerView or PortfolioView (yyyy-mm-ddThh:mm:ss) |
component_reporting_period_end | optional | DateTime | Ending time of reporting of the component LayerView or PortfolioView (yyyy-mm-ddThh:mm:ss) |
include_primary_metrics | optional | bool | Whether or not to include primary metrics in results |
Window Metrics
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
window_metrics = layer_view.window_metrics((0.0, 0.1))
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
WindowMetrics window_metrics = layer_view.window_metrics(
new ProbabilityWindow(0.0, 0.1), MetricsOptions.Default);
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/window_metrics/0_0.1 HTTP/1.1
Host: api.analyzere.net
Response Body
{
"_type": "LayerViewMetrics",
"kurtosis": 0.0,
"max": 4800000.0,
"mean": 4800000.0,
"min": 4800000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "LayerViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": false
}
}
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
window_metrics = portfolio_view.window_metrics((0.0, 0.1))
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
WindowMetrics window_metrics = portfolio_view.window_metrics(
new ProbabilityWindow(0.0, 0.1), MetricsOptions.Default);
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/window_metrics/0_0.1 HTTP/1.1
Host: api.analyzere.net
Response Body
{
"_type": "PortfolioViewMetrics",
"kurtosis": 0.0,
"max": 20000000.0,
"mean": 20000000.0,
"min": 20000000.0,
"skewness": 0.0,
"variance": 0.0,
"context": {
"_type": "PortfolioViewMetricsContext",
"perspective": "LossNetOfAggregateTerms",
"secondary_uncertainty": true,
"filter": "ANY_FILTER",
"aggregation_method": "AEP",
"max_probability": 0.1,
"min_probability": 0.0,
"currency": "USD",
"apply_participation": true
}
}
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
min_probability | required | float | Input minimum probability, range: [0.0, 1.0) |
max_probability | required | float | Input maximum probability, range: [min_probability, 1.0] where max_probability != 0.0 |
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
aggregation_method | optional | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting |
reporting_period_end | optional | DateTime | Ending time of reporting |
Window VaR (Window Value at Risk)
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
window_var = layer_view.window_var((0.0, 0.1))
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
WindowMetrics window_metrics = layer_view.window_metrics(
new ProbabilityWindow(0.0, 0.1), MetricsOptions.Default);
double window_var = window_metrics.mean
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/window_var/0_0.1 HTTP/1.1
Host: api.analyzere.net
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
window_var = portfolio_view.window_var((0.0, 0.1))
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
WindowMetrics window_metrics = portfolio_view.window_metrics(
new ProbabilityWindow(0.0, 0.1), MetricsOptions.Default);
double window_var = window_metrics.mean
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/window_var/0_0.1 HTTP/1.1
Host: api.analyzere.net
Window Co Metrics
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('10b25b62-a705-b44c-63c3-cf40d575da4b')
window_co_metrics = layer_view.window_co_metrics([(0.0, 0.1), (0.0, 0.2)], component_id='4fab6fee-bb04-1c82-e45b-9cd878d7cf5b', component_type='LayerView')
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("10b25b62-a705-b44c-63c3-cf40d575da4b");
LayerView component_layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
List<CoMetrics> window_metrics = layer_view.co_metrics(
new [] {new ProbabilityWindow(0.0, 0.1), new ProbabilityWindow(0.0, 0.2)},
component_layer_view.ToReference(),
CoMetricsOptions.Default);
GET /layer_views/c10b25b62-a705-b44c-63c3-cf40d575da4b/co_metrics/0_0.1,0_0.2?component_id=4fab6fee-bb04-1c82-e45b-9cd878d7cf5b&component_type=LayerView HTTP/1.1
Host: api.analyzere.net
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('491031bf-396a-c46a-bef2-8712f2a4e83f')
window_co_metrics = portfolio_view.window_co_metrics([(0.0, 0.1), (0.0, 0.2)], component_id='a0ced66d-ccba-909b-0611-d6a4cd19f761', component_type='PortfolioView')
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("491031bf-396a-c46a-bef2-8712f2a4e83f");
PortfolioView component_portfolio_view = API.Get<PortfolioView>("a0ced66d-ccba-909b-0611-d6a4cd19f761");
List<CoMetrics> window_metrics = portfolio_view.co_metrics(
new []{new ProbabilityWindow(0.0, 0.1), new ProbabilityWindow(0.0, 0.2)},
component_portfolio_view.ToReference(),
CoMetricsOptions.Default);
GET /portfolio_views/491031bf-396a-c46a-bef2-8712f2a4e83f/co_metrics/0_0.1,0_0.2?component_id=a0ced66d-ccba-909b-0611-d6a4cd19f761&component_type=PortfolioView HTTP/1.1
Host: api.analyzere.net
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
min_probability | required | float | Input minimum probability, range: [0.0, 1.0) |
max_probability | required | float | Input maximum probability, range: [min_probability, 1.0] where max_probability != 0.0 |
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for metrics results (Default is the currency of the LayerView or PortfolioView) |
perspective | optional | string (choices) | The name of the perspective determining which metrics to return |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
aggregation_method | optional | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting (yyyy-mm-ddThh:mm:ss) |
reporting_period_end | optional | DateTime | Ending time of reporting (yyyy-mm-ddThh:mm:ss) |
component_id | required | UUID | The component LayerView or PortfolioView ID |
component_type | required | string | LayerView or PortfolioView |
component_filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
component_perspective | optional | string (choices) | The name of the perspective determining which metrics to return |
component_reporting_period_begin | optional | DateTime | Starting time of reporting of the component LayerView or PortfolioView (yyyy-mm-ddThh:mm:ss) |
component_reporting_period_end | optional | DateTime | Ending time of reporting of the component LayerView or PortfolioView (yyyy-mm-ddThh:mm:ss) |
include_primary_metrics | optional | bool | Whether or not to include primary metrics in results |
YLT Download
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
ylt = layer_view.download_ylt()
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
string ylt = layer_view.ylt.Get(MetricsOptions.Default);
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/ylt HTTP/1.1
Host: api.analyzere.net
Response Body
Loss
200.0
300.0
250.0
900.0
500.0
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('5e047c08-1146-42f4-8319-a8b93774d948')
window_metrics = portfolio_view.download_ylt()
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("5e047c08-1146-42f4-8319-a8b93774d948");
string ylt = portfolio_view.ylt.Get(MetricsOptions.Default);
GET /portfolio_views/5e047c08-1146-42f4-8319-a8b93774d948/ylt HTTP/1.1
Host: api.analyzere.net
Response Body
"Loss"
493500.0
10023.0
5921.0
0.0
0.0
0.0
0.0
0.0
0.0
14082.0
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
loss_perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for results (Default is the currency of the LayerView or PortfolioView) |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
aggregation_method | optional | string | The name of the aggregation method (“AEP” or “OEP”) |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting |
reporting_period_end | optional | DateTime | Ending time of reporting |
YELT Download
LayerView
from analyzere import LayerView
layer_view = LayerView.retrieve('c94cd2b9-832c-5661-5ada-a2449faff95d')
yelt = layer_view.download_yelt()
using AnalyzeRe;
using AnalyzeRe.Metrics;
LayerView layer_view = API.Get<LayerView>("c94cd2b9-832c-5661-5ada-a2449faff95d");
string yelt = layer_view.yelt.Get(YELTOptions.Default);
GET /layer_views/c94cd2b9-832c-5661-5ada-a2449faff95d/ylt HTTP/1.1
Host: api.analyzere.net
Response Body
"TrialId","EventId","Sequence","Loss"
1,10,160.0,200.0
2,8,120.0,300.0
3,4,1.0,250.0
4,3,60.0,600.0
4,8,215.0,300.0
5,6,300.0,500.0
PortfolioView
from analyzere import PortfolioView
portfolio_view = PortfolioView.retrieve('5e047c08-1146-42f4-8319-a8b93774d948')
yelt = portfolio_view.download_yelt()
using AnalyzeRe;
using AnalyzeRe.Metrics;
PortfolioView portfolio_view = API.Get<PortfolioView>("5e047c08-1146-42f4-8319-a8b93774d948");
string yelt = portfolio_view.yelt.Get(YELTOptions.Default);
GET /portfolio_views/5e047c08-1146-42f4-8319-a8b93774d948/yelt HTTP/1.1
Host: api.analyzere.net
Response Body
"TrialId","EventId","Sequence","Loss"
1,200,2.0,493500.0
2,200,4.0,10023.0
3,200,2.0,5921.0
10,200,3.0,4230.0
10,200,4.0,9852.0
Arguments
Attribute | Traits | Type | Description |
---|---|---|---|
filter | optional | string (filter name) | Default is the AnyFilter (i.e. losses are unfiltered) |
loss_perspective | optional | string (choices) | Default is LossNetOfAggregateTerms |
currency | optional | ISO 4217 currency code | Currency used for results (Default is the currency of the LayerView or PortfolioView) |
secondary_uncertainty | optional | bool | Whether or not to apply secondary uncertainty |
apply_participation | optional | bool | Whether or not to apply participation (For PortfolioView, this will always be true) |
reporting_period_begin | optional | DateTime | Starting time of reporting |
reporting_period_end | optional | DateTime | Ending time of reporting |
start_trial | optional | Int | The starting range of trials to download (Default is 1) |
end_trial | optional | Int | The end range of trials to download (Default is infinity) |
additional_columns | optional | list(strings) (choices) | Additional columns to include in YELT |
Vectorized Requests
from analyzere import LayerView
layer_view = LayerView.retrieve('8e571e0f-a292-3228-9d71-55df7a839d79')
tail_metrics = layer_view.tail_metrics([0.3, 0.2, 0.1])
layer_view = LayerView.retrieve('8e571e0f-a292-3228-9d71-55df7a839d79')
window_metrics = layer_view.window_metrics([(0.2, 0.3), (0.1, 0.2), (0.0, 0.1)])
// Not supported in C#
GET /layer_views/8e571e0f-a292-3228-9d71-55df7a839d79/tail_metrics/0.3,0.2,0.1 HTTP/1.1
Host: api.analyzere.net
GET /layer_views/8e571e0f-a292-3228-9d71-55df7a839d79/window_metrics/0.2_0.3,0.1_0.2,0_0.1 HTTP/1.1
Host: api.analyzere.net
Response body
[
// ... 3 metrics response objects (one for each probability in the vector/list)
]
Metrics endpoints that allow arguments via a path parameter may return multiple response values if the arguments are vectorized. The response will contain each value requested, in the order in which they appear in the request.
Marginal Portfolio Views
Using the Marginal Portfolio View feature allows for faster metrics computation when existing Portfolio Views need to be modified slightly by the addition or removal of Layer Views.
Create
from analyzere import LayerView, PortfolioView
portfolio_view = PortfolioView.retrieve('3fb77a2e-a03f-48db-9577-5f8fb566d974')
layer_views_to_add = [
LayerView.retrieve('22fc6c8d-0037-4e57-9655-b8dbf1140fff'),
LayerView.retrieve('025800e0-a85e-45cf-8ec8-a61378717238')
]
layer_views_to_remove = [
LayerView.retrieve('809db678-65ab-45fe-af1c-29c93396b35b'),
LayerView.retrieve('16a4ace9-3c82-4db8-851b-fbc098d17229')
]
marginal_portfolio_view = portfolio_view.marginal(
layer_views_to_add,
layer_views_to_remove
)
using AnalyzeRe;
PortfolioView portfolio_view = API.Get<PortfolioView>("3fb77a2e-a03f-48db-9577-5f8fb566d974");
IReference<ILayerView> layer_views_to_add = new IReference<ILayerView>[]
{
new Reference<LayerView>("22fc6c8d-0037-4e57-9655-b8dbf1140fff"),
new Reference<LayerView>("025800e0-a85e-45cf-8ec8-a61378717238")
};
IReference<ILayerView> layer_views_to_remove = new IReference<ILayerView>[]
{
new Reference<LayerView>("809db678-65ab-45fe-af1c-29c93396b35b"),
new Reference<LayerView>("16a4ace9-3c82-4db8-851b-fbc098d17229")
};
IReference<PortfolioView> marginal_portfolio_view_ref =
portfolio_view.PostMarginalPortfolio(layer_views_to_add, layer_views_to_remove);
POST /portfolio_view_marginals HTTP/1.1
Host: api.analyzere.net
{
"portfolio_view_id": {
"ref_id": "3fb77a2e-a03f-48db-9577-5f8fb566d974"
},
"add_layer_view_ids": [
{
"ref_id": "22fc6c8d-0037-4e57-9655-b8dbf1140fff"
},
{
"ref_id": "025800e0-a85e-45cf-8ec8-a61378717238"
}
],
"remove_layer_view_ids": [
{
"ref_id": "809db678-65ab-45fe-af1c-29c93396b35b"
},
{
"ref_id": "16a4ace9-3c82-4db8-851b-fbc098d17229"
}
]
}
Response Body
{
"portfolio_view": {
"ref_id": "c0618e24-49bd-4d78-b956-cd8a91d6e730"
}
}
Create a marginal Portfolio View from an existing Portfolio View by supplying the unique identifier for the Portfolio View together with the Layer Views to add or remove.
Optimization Views
Optimization Views provide the ability to execute optimization of portfolios in the AnalyzeRe system.
Definition
Attributes
Name | Type | Description |
---|---|---|
id | string | a server-generated UUID |
analysis_profile | Reference AnalysisProfile | AnalysisProfile |
description | string | user-provided descriptive text |
domains | List(OptimizationDomain) | list of OptimizationDomains that specify which Layers to include, along with per-layer constraints |
iterations | integer | how many population iterations to conduct during optimization |
population_size | integer | how large a population size to use for each iteration |
target_currency | string | three-letter currency symbol to designate the currency used for output of monetary values |
custom_parameters | json | custom input parameters that specify the objectives and constraints to consider for optimization; refer to Custom Parameters |
Create
from analyzere import Layer, AnalysisProfile, OptimizationView, OptimizationDomain
l1 = Layer.retrieve('b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc')
l2 = Layer.retrieve('7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd')
ap = AnalysisProfile.retrieve('2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f')
d1 = OptimizationDomain(layer=l1, min=1.0, max=10.0, allow_exclude=False)
d2 = OptimizationDomain(layer=l2, min=0.5, max=1.0, allow_exclude=False)
ov = OptimizationView(domains=[d1, d2],
analysis_profile=ap,
iterations=50,
population_size=50,
target_currency='USD',
description='notebook example',
custom_parameters={
"Objective 1 - Name": "Expected Return",
"Objective 1 - Type": "max",
"Objective 1 - Function": "expected_return",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 1 - Return Period": "",
"Objective 2 - Name": "Tail Value at Risk",
"Objective 2 - Type": "max",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.5,
}
)
ov.save()
using AnalyzeRe;
OptimizationView optimizationView = new OptimizationView();
AnalysisProfile analysisProfile = API.Get<AnalysisProfile>("2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f");
Layer l1 = API.Get<Layer>("b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc");
Layer l2 = API.Get<Layer>("b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc");
DomainEntry d1 = new DomainEntry()
{
allow_exclude = false,
layer = new Reference<Layer>(l1),
min = 1.0,
max = 10.0,
};
DomainEntry d2 = new DomainEntry()
{
allow_exclude = false,
layer = new Reference<Layer>(l2),
min = 0.5,
max = 1.0,
};
optimizationView.domains = new List<DomainEntry>(){ d1, d2 };
optimizationView.analysis_profile = new Reference<AnalysisProfile>(analysisProfile);
optimizationView.iterations = 50;
optimizationView.population_size = 50;
optimizationView.target_currency = "USD";
optimizationView.description = "c# example";
optimizationView.custom_parameters = new Dictionary<string, object>() {
{ "Objective 1 - Name", "Expected Return" },
{ "Objective 1 - Type", "max"},
{ "Objective 1 - Function", "expected_return" },
{ "Objective 1 - Loss Perspective", "losses_net_premium" },
{ "Objective 1 - Return Period", "" },
{ "Objective 2 - Name", "Tail Value at Risk" },
{ "Objective 2 - Type", "max" },
{ "Objective 2 - Function", "tail_value_at_risk" },
{ "Objective 2 - Loss Perspective", "losses_net_premium" },
{ "Objective 2 - Return Period", 0.5 },
};
optimizationView = optimizationView.Save();
POST /optimization_views HTTP/1.1
Host: api.analyzere.net
{
"analysis_profile": {
"ref_id": "2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f"
},
"custom_parameters": {
"Objective 1 - Name": "Expected Return",
"Objective 1 - Type": "max",
"Objective 1 - Function": "expected_return",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 2 - Name": "Tail Value at Risk",
"Objective 2 - Type": "max",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.5
},
"domains": [
{
"layer": {
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
},
{
"layer": {
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
}
],
"iterations": 10,
"population_size": 5,
"target_currency": "USD",
"description": "Test Optimization Description"
}
Response Body
{
"id": "319c867b-e10b-4298-9e7b-57ee626ce22b",
"created": "2018-06-18T18:07:49.386898Z",
"modified": "2018-06-18T18:07:49.416371Z",
"analysis_profile": {
"href": "https://172.31.224.31/analysis_profiles/2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f",
"ref_id": "2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f"
},
"custom_parameters": {
"Objective 1 - Function": "expected_return",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 2 - Type": "max",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 1 - Type": "max",
"Objective 1 - Name": "Expected Return",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.5,
"Objective 2 - Name": "Tail Value at Risk"
},
"domains": [
{
"layer": {
"href": "https://172.31.224.31/layers/b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc",
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
},
{
"layer": {
"href": "https://172.31.224.31/layers/7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd",
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
}
],
"iterations": 10,
"population_size": 5,
"status": "queued",
"status_message": null,
"progress": 0.0,
"target_currency": "USD",
"meta_data": {},
"description": "Test Optimization Description"
}
An Optimization View requires a set of layers with constraints (known as OptimizationDomains), Analysis Profile and some custom parameters. Two objectives must be provided via custom parameters, and additional constraints may be provided.
Custom Parameters
Custom Parameters JSON
{
"Discretization": 0.0001,
"Objective 1 - Name": "Expected Return",
"Objective 1 - Function": "expected_return",
"Objective 1 - Type": "max",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 1 - Return Period": "",
"Objective 2 - Name": "Tail Value at Risk",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 2 - Type": "max",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.01,
"Constraint 1 - Name": "EL-Capital Ratio",
"Constraint 1 - Function": "el_capital_ratio",
"Constraint 1 - Capital Load": 1.5,
"Constraint 1 - Min": "",
"Constraint 1 - Max": 0.8,
"Constraint 1 - Loss Perspective": "",
"Constraint 1 - Return Period": "",
"Constraint 2 - Function": "florida_limit_total_limit_ratio",
"Constraint 2 - Min": "",
"Constraint 2 - Max": 0.5,
"Constraint 2 - Loss Perspective": "",
"Constraint 2 - Return Period": "",
"Constraint 3 - Function": 2,
"Constraint 3 - Max": "",
"Constraint 3 - Min": -10000,
"Constraint 3 - Loss Perspective": "",
"Constraint 3 - Return Period": ""
}
Constraints and Objectives define how optimization proceeds. The two objectives given will provide the optimizer with the dimensions it can explore to find a set of optimal solutions. Constraints are provided to prevent certain parameters from being exceeded, such that the optimizer will ignore solutions that may potentially be optimal, but that fall outside the bounds set by constraints.
A Discretization parameter can also be provided which determines the possible choices for layer participation. For example, a value of 0.01 means the possible choices for participation are limited to increments of 1% within the defined minimum and maximum range.
Custom Parameters are provided and handled based on a naming convention. Each Objective and Constraint provides its attribute names following a hyphen. The order in which the individual values are provided is not important, but they are organized for clarity in the example at the right.
Retrieve
ov = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b')
for domain in ov.domains:
print(domain.layer.id)
using AnalyzeRe;
OptimizationView optimizationView = API.Get<OptimizationView>("319c867b-e10b-4298-9e7b-57ee626ce22b");
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/
Host: api.analyzere.net
Response Body
{
"id": "319c867b-e10b-4298-9e7b-57ee626ce22b",
"created": "2018-06-18T18:07:49.386898Z",
"modified": "2018-06-18T18:07:49.386898Z",
"analysis_profile": {
"href": "https://172.31.224.31/analysis_profiles/2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f",
"ref_id": "2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f"
},
"custom_parameters": {
"Objective 1 - Function": "expected_return",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 2 - Type": "max",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 1 - Type": "max",
"Objective 1 - Name": "Expected Return",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.5,
"Objective 2 - Name": "Tail Value at Risk"
},
"domains": [
{
"layer": {
"href": "https://172.31.224.31/layers/b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc",
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
},
{
"layer": {
"href": "https://172.31.224.31/layers/7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd",
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
}
],
"iterations": 10,
"population_size": 5,
"status": "processing_succeeded",
"status_message": null,
"progress": 1.0,
"target_currency": "USD",
"meta_data": {},
"description": "Test Optimization Description"
}
Retrieve the optimization view data by providing its unique UUID (as would apply to any other resource).
List Candidates
candidates = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidates()
for c in candidates:
print(c.portfolio_view().id)
OptimizationView optimizationView = API.Get<OptimizationView>("319c867b-e10b-4298-9e7b-57ee626ce22b");
IEnumerable<Candidate> candidateList = optimizationView.candidates.List(0, 100).items;
foreach (Candidate c in candidateList) {
Console.WriteLine(c.portfolio_view.Get().id);
}
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidates
Host: api.analyzere.net
Response body
{
"items": [
{
"index": 0,
"objectives": {
"Tail Value at Risk": -2403033.777013758,
"Expected Return": -1435759.1740139436
},
"constraints": {},
"feasible": true,
"parameterization": [
{
"original_layer": {
"href": "https://172.31.224.31/layers/b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc",
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"parameters": {
"participation": 1.0000112604956126
}
},
{
"original_layer": {
"href": "https://172.31.224.31/layers/7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd",
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"parameters": {
"participation": 0.5000033571133844
}
}
],
"optimization_view": {
"href": "https://172.31.224.31/optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b",
"ref_id": "319c867b-e10b-4298-9e7b-57ee626ce22b"
}
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
When an optimization is finished running, its candidates are available. They provide the optimized participation values for the Layers specified as Optimization Domains.
Retrieve Candidate by index
candidate = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidates(0)
print(candidate)
OptimizationView optimizationView = API.Get<OptimizationView>("319c867b-e10b-4298-9e7b-57ee626ce22b");
Candidate c1 = optimizationView.candidates.GetItem("0");
foreach (KeyValuePair<string, double> objective in c1.objectives) {
Console.WriteLine("Objective: " + objective.Key + " = " + objective.Value);
}
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidate/0
Response body
{
"constraints": {},
"feasible": true,
"index": 0,
"objectives": {
"Expected Return": -1435759.1740139436,
"Tail Value at Risk": -2403033.777013758
},
"optimization_view": {
"ref_id": "319c867b-e10b-4298-9e7b-57ee626ce22b"
},
"optimziation_view_id": "319c867b-e10b-4298-9e7b-57ee626ce22b",
"parameterization": [
{
"original_layer": {
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"parameters": {
"participation": 1.0000112604956126
}
},
{
"original_layer": {
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"parameters": {
"participation": 0.5000033571133844
}
}
]
}
Candidates can be retrieved by index. Note that you’ll receive a 404 Not Found error if requesting any candidates outside the range of candidates available.
List Candidate Parameters
candidate_parameters = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidate_parameters()
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidate_parameters
Host: api.analyzere.net
Response body
{
"items": [
{
"parameterizations": {
"index": 0,
"participations": [
1.0000112604956126,
0.5000033571133844
]
}
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Candidate parameters is an endpoint that facilitates fast retrieval of the parameterizations of candidates. It returns all candidates’ layer participation values in an array. The order of the values within the participations array corresponds to the layers’ indexes in the OptimizationDomain of the OptimizationView.
Retrieve Candidate parameters by index
candidate_parameter = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidate_parameters(0)
print(candidate)
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidate_parameters/0
Response body
{
"parameterizations": {
"index": 0,
"participations": [
1.0000112604956126,
0.5000033571133844
]
}
}
Candidate parameters can be retrieved for individual candidates with the candidate index. Note that you’ll receive a 404 Not Found error if requesting any candidates outside the range of candidates available.
Retrieve Candidate Metrics
candidate_metrics = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidate_metrics()
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidate_metrics
Host: api.analyzere.net
Response body
{
"objectives": {
"Tail Value at Risk": [
-2403033.777013758
],
"Expected Return": [
-1435759.1740139436
]
},
"constraints": {},
"feasibles": [
true
]
}
Candidate metrics is an endpoint that facilitates fast retrieval of candidate metrics (objectives, constraints, and feasibles) of all candidates. The endpoint returns the objective, constraint and feasibility values for all candidates as lists that are ordered by the index of their corresponding candidate.
Retrieve Candidate Portfolio View
candidate = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b').candidates(0)
print(candidate.portfolio_view().id)
OptimizationView optimizationView = API.Get<OptimizationView>("319c867b-e10b-4298-9e7b-57ee626ce22b");
Candidate c1 = optimizationView.candidates.GetItem("0");
Console.WriteLine(c1.portfolio_view.Get().id);
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/candidates/0/portfolio_view
Host: api.analyzere.net
Response body
{
"id": "7ca7f053-a22a-b657-e176-2d2a955f9d37",
"analysis_profile": {
"href": "https://172.31.224.31/analysis_profiles/2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f",
"ref_id": "2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f"
},
"layer_views": [
{
"href": "https://172.31.224.31/layer_views/f441b1cf-ab5a-dc0a-2ca5-40471e800a64",
"ref_id": "f441b1cf-ab5a-dc0a-2ca5-40471e800a64"
},
{
"href": "https://172.31.224.31/layer_views/1f1ea011-ba3a-5ca9-7460-f44fe8c30a09",
"ref_id": "1f1ea011-ba3a-5ca9-7460-f44fe8c30a09"
}
],
"portfolio": null,
"target_currency": "USD",
"ylt_id": "040268e2-f4cc-3346-b444-4968d9a410d3"
}
Each optimization Candidate provides a convenience access to its PortfolioView. Metrics can be requested to perform detailed analysis on any given candidate via its PortfolioView.
Initial Portfolio Metrics
ov = OptimizationView.retrieve('319c867b-e10b-4298-9e7b-57ee626ce22b')
metrics = ov.initial_metrics()
print(metrics.objectives['Expected Return'])
print(metrics.feasible)
OptimizationView optimizationView = API.Get<OptimizationView>("319c867b-e10b-4298-9e7b-57ee626ce22b");
OptimizationResult result = optimizationView.initial_portfolio_result;
foreach (KeyValuePair<string, double> objective in result.objectives)
{
Console.WriteLine("Objective: " + objective.Key + " = " + objective.Value);
}
foreach (KeyValuePair<string, double> constraint in result.constraints)
{
Console.WriteLine("Constraint: " + constraint.Key + " = " + constraint.Value);
}
Console.WriteLine("Feasible: " + result.feasible);
GET /optimization_views/319c867b-e10b-4298-9e7b-57ee626ce22b/initial_portfolio_metics
Response body
{
"objectives": {
"Tail Value at Risk": -2396694.984748127,
"Expected Return": -1432668.4801119135
},
"constraints": {},
"feasible": true
}
Initial portfolio metrics can be retrieved for an Optimization View to inspect the analysis results for the layers provided at Optimization View creation time. These metrics may be compared to the resulting candidates to determine the suitability of individual candidates.
List Optimization Views
GET /optimization_views?search=Test&ordering=-created HTTP/1.1
Host: api.analyzere.net
from analyzere import OptimizationView
optimization_views = OptimizationView.list(search='Test',
ordering='-created')
using AnalyzeRe;
using AnalyzeRe.Optimization;
using System.Collections.Generic;
IEnumerable<OptimizationView> optimizationViews = API.SearchResourceList<OptimizationView>(
"Test", API.Parameters.Order("-created")).items;
Response Body
{
"items": [
{
"id": "319c867b-e10b-4298-9e7b-57ee626ce22b",
"created": "2018-06-18T18:07:49.386898Z",
"modified": "2018-06-18T18:07:49.386898Z",
"analysis_profile": {
"href": "https://172.31.224.31/analysis_profiles/2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f",
"ref_id": "2d7c49cd-0d8c-45cf-ab07-ec7fd49b507f"
},
"custom_parameters": {
"Objective 1 - Function": "expected_return",
"Objective 1 - Loss Perspective": "losses_net_premium",
"Objective 2 - Type": "max",
"Objective 2 - Function": "tail_value_at_risk",
"Objective 1 - Type": "max",
"Objective 1 - Name": "Expected Return",
"Objective 2 - Loss Perspective": "losses_net_premium",
"Objective 2 - Return Period": 0.5,
"Objective 2 - Name": "Tail Value at Risk"
},
"domains": [
{
"layer": {
"href": "https://172.31.224.31/layers/b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc",
"ref_id": "b0a5a3b4-a2c4-4a52-b737-f67f3d2d86dc"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
},
{
"layer": {
"href": "https://172.31.224.31/layers/7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd",
"ref_id": "7bab71f1-a67b-4ad4-ac3b-b2bb50bf57fd"
},
"min": 0.0,
"max": 1.0,
"allow_exclude": false
}
],
"iterations": 10,
"population_size": 5,
"status": "processing_succeeded",
"status_message": null,
"progress": 1.0,
"target_currency": "USD",
"meta_data": {},
"description": "Test Optimization Description"
}
],
"meta": {
"total_count": 1,
"limit": 100,
"offset": 0
}
}
Optimization Views are returned in a list.
Arguments
Name | Traits | Description |
---|---|---|
limit | optional | the maximum number of Optimization Views to return (default 100) |
offset | optional | the number of Optimization Views to skip before returning the limit |
fields | optional | a list of the Optimization View fields to include in the response (case-sensitive exact match) |
omit | optional | a list of the Optimization View fields to exclude from the response (case-sensitive exact match) |
ids | optional | a list of UUIDs for the Optimization Views to be retrieved (max 100 UUIDs) |
search | optional | filters the list of Optimization Views by description (case-insensitive substring match) |
description | optional | filters the list of Optimization Views by description (case-sensitive exact match) |
iterations | optional | filters the list of Optimization Views by iterations (exact match) |
population_size | optional | filters the list of Optimization Views by population_size (exact match) |
status | optional | filters the list of Optimization Views by status (case-sensitive exact match) |
ordering | optional | orders the list of Optimization Views |
ordering
accepts the following values (case-sensitive):
id
created
modified
description
iterations
population_size
status
status_message
progress
This will return results in ascending order. To return results in descending
order, add the prefix -
to a value. e.g. -id
will return results sorted by
id in descending order.
To order by multiple attributes, provide a list of attributes to ordering
.
e.g. description,-created
will sort results by description
in ascending order
and then sort by created
in descending order (for duplicate descriptions).
Retrieve Sensitivity Analysis
GET /optimization_views/fc1dd887-b8d6-469f-acb0-0ef062eb3e28/sensitivity_analysis HTTP/1.1
Host: api.analyzere.net
from analyzere import OptimizationView
ov = OptimizationView.retrieve('fc1dd887-b8d6-469f-acb0-0ef062eb3e28')
sa = ov.sensitivity_analysis()
using AnalyzeRe;
using AnalyzeRe.Optimization;
OptimizationView optimizationView = API.Get<OptimizationView>("fc1dd887-b8d6-469f-acb0-0ef062eb3e28");
SensitivityAnalysis sa = optimizationView.GetSensitivityAnalysis();
{ "sensitivities": [
{
"normalized_interquartile_range": 0.2589999999999999,
"min": 0.0,
"normalized_standard_deviation": 0.2973416661014732,
"initial_share": 0.181,
"hist": {
"0.05": 5,
"0.1": 0,
"0.15": 0,
"0.2": 0,
"0.25": 0,
"0.3": 9,
"0.35": 0,
"0.4": 0,
"0.45": 0,
"0.5": 3,
"0.55": 0,
"0.6": 5,
"0.65": 0,
"0.7": 3,
"0.75": 0,
"0.8": 3,
"0.85": 2,
"0.9": 4,
"0.95": 2,
"1.0": 64
},
"mean": 0.8175600000000002,
"max": 1.0,
"ref_id": "b2b4db35-67c9-4c4c-ac3f-f8ca3bf182f8"
},
{
"normalized_interquartile_range": 0.71075,
"min": 0.0,
"normalized_standard_deviation": 0.3580190419516816,
"initial_share": 0.087,
"hist": {
"0.05": 36,
"0.1": 0,
"0.15": 8,
"0.2": 1,
"0.25": 1,
"0.3": 3,
"0.35": 2,
"0.4": 3,
"0.45": 0,
"0.5": 0,
"0.55": 8,
"0.6": 0,
"0.65": 12,
"0.7": 0,
"0.75": 1,
"0.8": 10,
"0.85": 0,
"0.9": 7,
"0.95": 0,
"1.0": 8
},
"mean": 0.3798399999999999,
"max": 1.0,
"ref_id": "6b491aca-9baa-41f3-a515-047e1f34a874"
}
]
}
The sensitivity analysis endpoint allows analyzing distribution properties of layers participations across all available candidate portfolios without collecting data from the individual candidates’ endpoints. The endpoint returns a list of layer sensitivities. Each layer sensitivity contains several statistical metrics: minimum, maximum and average layer participation; normalized standard deviation and interquartile ranges; and histogram data.
If the optimization view is not yet ready, the sensitivity analysis endpoint will return an empty results list.
If the minimum and maximum possible participations for a layer are equal (i.e. the layer is “locked”), then normalized interquartile range, normalized standard deviation, and histogram will contain zero values.
Arguments
Name | Traits | Description |
---|---|---|
id | required | The UUID of the optimization view, for which analysis is made |
candidates | optional | a list of candidates, that will be included in a sensitivity analysis |
Attributes
Name | Type | Description |
---|---|---|
ref_id | string | layer’s UUID |
min | float | minimum possible layer participation |
max | float | maximum possible layer participation |
mean | float | average layer participation |
normalized_standard_deviation | float | standard deviation of layer participations normalized to min and max values |
normalized_interquartile_range | float | interquartile range of layers participations normalized to min and max values |
hist | list | data for a histogram, count of layer participations in 20 5% intervals |
Filter by Candidates’ Indexes
GET /optimization_views/fc1dd887-b8d6-469f-acb0-0ef062eb3e28/sensitivity_analysis?candidates=0,1 HTTP/1.1
Host: api.analyzere.net
from analyzere import OptimizationView
ov = OptimizationView.retrieve('fc1dd887-b8d6-469f-acb0-0ef062eb3e28')
candidates_list = [0,1]
sa = ov.sensitivity_analysis(candidates=[candidates_list])
using AnalyzeRe;
using AnalyzeRe.Optimization;
OptimizationView optimizationView = API.Get<OptimizationView>("fc1dd887-b8d6-469f-acb0-0ef062eb3e28");
int[] candidatesList = new[] { 0, 1 };
SensitivityAnalysis sa = optimizationView.GetSensitivityAnalysis(candidates: candidatesList);
If a list of candidates is not provided, then all candidates are included in the analysis. If a list of candidates is provided, an analysis is performed only on the selected candidates. If a list contains only non-existing candidates, an endpoint will return an empty list.