NAV
Python C# HTTP

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
API.ServerURL = "https://api.analyzere.net/";

// Set login credentials if necessary
BasicAuthenticationToken auth = new BasicAuthenticationToken();
auth.GenerateAccessToken("username", "password");
// Assume the token is valid for now so that it is used for requests.
auth.status = AccessTokenStatus.Valid;
API.AuthenticationToken = auth;

// If the credentials are invalid (or not specified), the API will
// invoke the AuthenticationRequested event. UIs should handle it.
API.AuthenticationRequested += API_AuthenticationRequested;

// Check authentication status
AuthenticationStatus status = API.GetAuthenticationStatus();

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.

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:

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

Pagination

To get a list of layers containing only the first entry of the layers collection:

layers = api.list(Layers, limit=1, offset=0)
GET /layers/?limit=1&offset=0 HTTP/1.1
Host: api.analyzere.net
Cache-Control: no-cache
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

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.

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
source string the source (typically Vendor model) of the events
tags list(strings) 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') as catalog_data:
    catalog.upload_data(catalog_data)
using AnalyzeRe;

// Create the Catalog
EventCatalog catalog = new EventCatalog();
catalog.description = "Combined RMS + AIR Catalog Jan 2015";
catalog.tags.AddRange(new[]{"2015", "Version 12"});
catalog.source = "Combined RMS + AIR catalog";
catalog = catalog.Save();

// Upload Catalog data
catalog.data.LargeFileUpload("files/catalogs/RMS+AIR_Catalog-2015.csv");

Example response body

{
  "id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
  "description": "Combined RMS + AIR Catalog Jan 2015",
  "tags": ["2015", "Version 12"],
  "source": "Combined RMS + AIR catalog"
}

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",
  "description": "Combined RMS + AIR Catalog Jan 2015",
  "tags": ["2015", "Version 12"],
  "source": "Combined RMS + AIR catalog"
}

Event Catalogs are retrieved by ID.

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/ HTTP/1.1
Host: api.analyzere.net

from analyzere import EventCatalog

catalogs = EventCatalog.list()
using AnalyzeRe;
using System.Collections.Generic;

IEnumerable<EventCatalog> catalogs = API.GetResourceList<EventCatalog>().items;

Example response body

{
  "items": [
      {
        "id": "fb5257d4-a9e8-4539-b305-dd4f33b10051",
        "description": "Combined RMS + AIR Catalog Jan 2015",
        "tags": ["2015", "Version 12"],
        "source": "Combined RMS + AIR catalog"
      },
      {
        "id": "939c12be-7fd5-4b0e-b601-aaa9597325cc",
        "description": "RMS Catalog",
        "tags": ["2012", "Version 10"],
        "source": "RMS"
      },
  ],
  "meta": {
    "total_count": 2,
    "limit": 100,
    "offset": 0
  }
}

Event Catalogs are returned in a list.

Arguments

Name Traits Description
source optional filters the list of Event Catalogs by source (exact match)
description optional filters the list of Event Catalogs by descriptions (case-insensitive substring match)
tags optional filters the list of Event Catalogs by tags (exact match)
limit optional the maximum number of Event Catalogs to return (default 100; max 1000)
offset optional the number of Event Catalogs to skip before returning the limit

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 Sequence 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.

Definition

StaticSimulation

{
    "_type": "StaticSimulation",
    "id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
    "name": "RMS Simulation 100000 Trials",
    "description": "RMS Simulation 100000 Trials",
    "event_catalogs": [
        {
          "ref_type": "EventCatalog",
          "href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
          "ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
        }
    ],
    "start_date": "2017-01-01T00:00:00Z",
    "status": "processing_succeeded",
    "status_message": null,
    "trial_count": 100000,
    "notes": {}
}

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 any notes that should be associated with the Simulation.

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": "2017-01-01T00:00:00Z",
  "trial_count": 100000
}
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 = StaticSimulation(name='Combined ARE + AIR Simulation',
                              description='RMS 12 + AIR 3.0 Simulations',
                              event_catalogs=[catalog],
                              start_date=datetime(2017, 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:

{
  "_type": "StaticSimulation",
  "id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
  "name": "RMS Simulation 100000 Trials",
  "description": "RMS Simulation 100000 Trials",
  "event_catalogs": [
        {
          "ref_type": "EventCatalog",
          "href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
          "ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
        }
  ],
  "start_date": "2017-01-01T00:00:00Z",
  "status": "processing_succeeded",
  "status_message": null,
  "trial_count": 100000,
  "notes": {}
}

Arguments

Name Traits Description
_type required StaticSimulation
name required
description required
event_catalogs required
trial_count required
notes 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

{
    "_type": "StaticSimulation",
    "id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
    "name": "RMS Simulation 100000 Trials",
    "description": "RMS Simulation 100000 Trials",
    "event_catalogs": [
        {
          "ref_type": "EventCatalog",
          "href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
          "ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
        }
    ],
    "start_date": "2017-01-01T00:00:00Z",
    "status": "processing_succeeded",
    "status_message": null,
    "trial_count": 100000,
    "notes": {}
}

Simulations are retrieved by ID.

Arguments

Name Traits Description
id required

List Simulations

GET /simulations?limit=100 HTTP/1.1
Host: api.analyzere.net
from analyzere import Simulation

simulations = Simulation.list(limit=100)
using AnalyzeRe;
using System.Collections.Generic;

IEnumerable<Simulation> simulations = API.GetResourceList<Simulation>().items;

Response Body

{
  "items": [
      {
        "_type": "StaticSimulation",
        "id": "c8918b81-6d4e-41b8-8594-e5d4c765b4fa",
        "name": "RMS Simulation 100000 Trials",
        "description": "RMS Simulation 100000 Trials",
        "event_catalogs": [
            {
              "ref_type": "EventCatalog",
              "href": "https://api.analyzere.net/event_catalogs/fb5257d4-a9e8-4539-b305-dd4f33b10051",
              "ref_id": "fb5257d4-a9e8-4539-b305-dd4f33b10051"
            }
        ],
        "start_date": "2017-01-01T00:00:00Z",
        "status": "processing_succeeded",
        "status_message": null,
        "trial_count": 100000,
        "notes": {}
    }
  ],
  "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

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:

  1. Any Filter
  2. Any Of Filter
  3. Less Than Filter
  4. Greater Than Filter
  5. Range Filter
  6. And Filter
  7. Or Filter

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 string or number 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",
  "name": "Large-EQ",
  "description": "Large Earthquakes",
  "attribute": "Magnitude",
  "value": 8.5,
  "inclusive": true
}

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

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",
  "name": "Large-EQ",
  "description": "Large Earthquakes",
  "attribute": "Magnitude",
  "value": 8.5,
  "inclusive": true
}

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

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",
  "name": "Large-EQ",
  "description": "Large Earthquakes",
  "attribute": "Magnitude",
  "value": 8.5,
  "inclusive": true
}

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

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",
  "base_currency": "USD",
  "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",
  "base_currency": "USD",
  "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",
  "base_currency": "USD",
  "description": "Default Exchange Rate Table"
}

Arguments

Name Traits Description
id required

List Exchange Rate Tables

GET /exchange_rate_tables/ HTTP/1.1
Host: api.analyzere.net

from analyzere import ExchangeRateTable

tables = ExchangeRateTable.list()
using AnalyzeRe;
using System.Collections.Generic;

IEnumerable<ExchangeRateTable> tables = API.GetResourceList<ExchangeRateTable>().items;

Response Body

{
  "items": [
     {
       "id": "e37ffc8d-9235-4aa5-bc02-f68de558f2fa",
       "created": "2015-02-05T17:27:55.663000Z",
       "base_currency": "USD",
       "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

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": "2017-03-19T16:08:25.944000Z",
  "modified": "2017-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:

  1. ExchangeRateDateRule with date = “2017-01-01T00:00:00Z”
  2. ExchangeRateLatestRule

Given the rules above the system will:

  1. First search for an exchange rate on the date specified by any MonetaryUnits.value_date, or use the date specified in the Rule if no value_date is specified in the MonetaryUnit.
  2. 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 or rate 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:

  1. Empty monetary_unit_overrides (default)

    1. Use rate from MonetaryUnit (iff supplied).
    2. Use rate from the associated Exchange Rate Table for the date specified in the MonetaryUnit (iff supplied).
    3. If neither date nor rate are specified in a MonetaryUnit - use the rate in the associated Exchange Rate Table based on the Exchange Rate Selection Rule type (Latest or Date).
  2. Date monetary_unit_overrides

    1. Use rate from MonetaryUnit (iff specified).
    2. Use rate from the associated Exchange Rate Table based on Exchange Rate Selection type (Latest or Date).
  3. Rate monetary_unit_overrides

    1. Find rate for the date specified in the MonetaryUnit (iff supplied).
    2. Find rate from the associated Exchange Rate Table based on Exchange Rate Selection type (Latest or Date)
  4. Date and Rate monetary_unit_overrides

    1. 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 (
    ExchangeRateDateRule,
    ExchangeRateLatestRule,
    ExchangeRateProfile,
    ExchnageRateTable
)

fx_table = ExchnageRateTable.retrieve('e37ffc8d-9235-4aa5-bc02-f68de558f2fa')
# create a preferred date rule
date_rule = ExchangeRateDateRule(date='2017-01-01T00:00:00Z')

# fall back to latest available date
latest_rule = ExchangeRateLatestRule()

fx_profile = ExchangeRateProfile(description='Default Exchange Rate Profile',
                                 exchange_rate_table=fx_table,
                                 profile.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": "2017-01-3T16:08:25.944000Z",
  "modified": "2017-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": "2017-01-02T16:08:25.944000Z",
  "modified": "2017-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/ HTTP/1.1
Host: api.analyzere.net

from analyzere import ExchangeRateProfile

fx_profiles = ExchangeRateProfile.list()
using AnalyzeRe;
IEnumerable<ExchangeRateProfile> profiles = API.GetResourceList<ExchangeRateProfile>().items;

Response Body

{
  "items": [
      {
          "_type": "ExchangeRateProfile",
          "id": "25c50127-1d2c-480f-86c8-f0db478ddd2b",
          "created": "2017-01-02T16:08:25.944000Z",
          "modified": "2017-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

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:

  1. Event Catalog

    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.

  2. Simulation

    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.

  3. Loss Filters

    The set of attribute/value based Event attributes that group losses together in a meaningful way for reporting purposes.

  4. Exchange Rate Profile

    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

{
  "_type": "AnalysisProfile",
  "id": "b815736b-9607-4e64-8e96-1aecf137a30e",
  "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"
      }
  ]
}

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

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

{
  "_type": "AnalysisProfile",
  "id": "b815736b-9607-4e64-8e96-1aecf137a30e",
  "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"
      }
  ]
}

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

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

{
  "_type": "AnalysisProfile",
  "id": "b815736b-9607-4e64-8e96-1aecf137a30e",
  "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"
      }
  ]
}

Analysis Profiles are retrieved by ID.

Arguments

Name Traits Description
id required

List Analysis Profiles

GET /analysis_profiles/ HTTP/1.1
Host: api.analyzere.net

from analyzere import AnalysisProfile

analysis_profiles = AnalysisProfile.list()
using AnalyzeRe;
using System.Collections.Generic;

IEnumerable<AnalysisProfile> analysis_profiles = API.GetResourceList<AnalysisProfile>().items;

Response Body

{
  "items": [
      {
      "_type": "AnalysisProfile",
      "id": "b815736b-9607-4e64-8e96-1aecf137a30e",
      "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"
          }
      ]
    }
  ],
  "meta": {
     "total_count": 1,
     "limit": 100,
     "offset": 0
  }
}

Analysis Profiles of all types are returned in a list.

Arguments

Name Traits Description
type optional filters the list of Analysis Profiles by type (case-insensitive exact match)
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

Distributions

The PRIME platform supports simulations of non-modeled losses (parametric losses). PRIME supports two main methods of defining distributions:

  1. Parameterized Distributions
  2. Custom Distributions

Each method of defining distributions has two main classes of distributions:

  1. 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.

    1. Log Normal
    2. Normal
    3. Pareto
    4. Uniform
  2. 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.

    1. Binomial
    2. Negative Binomial
    3. Poisson
    4. Uniform Int

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:

  1. Frequency Distributions
  2. Severity Distributions
  3. Seasonality Distributions
  4. 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

{
  "_type": "CustomSeverityDistribution",
  "id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
  "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:

{
  "_type": "CustomSeverityDistribution",
  "id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
  "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:

{
  "_type": "CustomSeverityDistribution",
  "id": "0e377cca-54a8-48a9-9a83-aaddb7f05691",
  "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.
Parametric Loss Set Loss set defined by distributions which describe the frequency, severity and seasonality of the losses.
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.
Loaded Loss Set Loss set whose losses are computed by applying a constant load multiplier to all losses generated by some source loss set.

Embedded Objects

Inuring Terms

Inuring terms example:

{
  "occurrence_attachment": {
    "value": 500000.0,
    "currency": "USD"
  },
  "occurrence_limit": {
    "value": 2000000.0,
    "currency": "USD"
  },
  "aggregate_attachment": {
    "value": 3000000.0,
    "currency": "USD"
  },
  "aggregate_limit": {
    "value": 1000000.0,
    "currency": "USD"
  },
  "share": 0.1
}

Attributes

Attribute Type Traits Description
occurrence_attachment MonetaryUnit required The occurrence attachment of the inuring contract.
occurrence_limit MonetaryUnit required The occurrence limit of the inuring contract.
aggregate_attachment MonetaryUnit required The aggregate attachment of the inuring contract.
aggregate_limit MonetaryUnit required The aggregate limit of the inuring contract.
share number required The inuring share.

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 GETs on the Loss Set. The profile includes:

Attributes

Attribute Type Traits Description
currency string optional The ISO 4217 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 attribute:

Attributes

Attribute Type Description
_type string Must equal one of “ELTLossSet”, “PortfolioLossSet”, “TreatyLossSet”, “YLTLossSet”, “YELTLossSet”, or “ParametricLossSet”.
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: “LossNetOfOccurrenceTerms” for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross” for all but YLTLossSet, whose default is “LossNetOfAggregateTerms”).

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",
  "inuring_terms": {
    "occurrence_attachment": {
      "value": 100000.000000000000000,
      "currency": "USD"
    },
    "occurrence_limit": {
      "value": 300000.000000000000000,
      "currency": "USD"
    },
    "aggregate_attachment": {
      "value": 300000.000000000000000,
      "currency": "USD"
    },
    "aggregate_limit": {
      "value": 500000.000000000000000,
      "currency": "USD"
    },
    "share": 0.100000000000000
  },
  "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.
event_catalogs list(EventCatalog) The list of event catalogs for the loss set (Note: Only a single event catalog is supported at this time.).
currency string The ISO 4217 currency code for the currency of the losses in this loss set.
inuring_terms InuringTerms Inuring terms for this loss set.
profile LossSetProfile A profile of this loss set, generated by the server.
loss_type string The type of losses in the loss set. Valid values include: “LossNetOfOccurrenceTerms” for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”).

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.
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.
currency string The ISO 4217 currency code for the currency of the losses in this loss set.
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: “LossNetOfOccurrenceTerms”, for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”).

YELT Loss Set

{
  "_type": "YELTLossSet",
  "id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
  "description": "YELT 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",
  "trial_count": 100000
}

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.

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.
event_catalogs list(EventCatalog) The list of event catalogs for the loss set (Note: Only a single event catalog is supported at this time.).
currency string The ISO 4217 currency code for the currency of the losses in this loss set.
loss_type string The type of losses in the loss set. Valid values include: “LossNetOfOccurrenceTerms”, for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossGross”).
trial_count number The number of trials used to create the YELT uploaded with the loss set.

YLT Loss Set

{
  "_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
}

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.
sequence number The value to use for the day-of-year for each loss in the YLT.
currency string The ISO 4217 currency code for the currency of the losses in this loss set.
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: “LossNetOfOccurrenceTerms”, for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: “LossNetOfAggregateTerms”).
trial_count number The number of trials used to create the YLT uploaded with the loss set.

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”.
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.
loss_type string The type of losses in the loss set. Valid values include: “LossNetOfOccurrenceTerms” for losses with occurrence terms already applied, “LossNetOfAggregateTerms” for losses with aggregate terms applied, and “LossGross” for losses without terms applied (Default: the loss_type from the source LossSet).

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();
loss_set.description = "ELT loss set example.";
loss_set.event_catalogs.AddRange(new []
{
    new Reference<EventCatalog>("e02b0ace-96a5-47f8-a90e-c0960485f38e")
});
loss_set.currency = "USD";
loss_set.inuring_terms = new InuringTerms {
    occurrence_attachment = new MonetaryUnit(100000, "USD"),
    occurrence_limit = new MonetaryUnit(300000, "USD"),
    aggregate_attachment = new MonetaryUnit(300000, "USD"),
    aggregate_limit = new MonetaryUnit(500000, "USD"),
    share = 0.1
};
loss_set = loss_set.Save();

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",
  "inuring_terms": {
    "occurrence_attachment": {
      "value": 100000.0,
      "currency": "USD"
    },
    "occurrence_limit": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_attachment": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_limit": {
      "value": 500000.0,
      "currency": "USD"
    },
    "share": 0.1
  }
}

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",
  "inuring_terms": {
    "occurrence_attachment": {
      "value": 100000.0,
      "currency": "USD"
    },
    "occurrence_limit": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_attachment": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_limit": {
      "value": 500000.0,
      "currency": "USD"
    },
    "share": 0.1
  },
  "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
event_catalogs required
currency required
inuring_terms optional
profile optional
loss_type 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.LossSets;

ParametricLossSet loss_set = new ParametricLossSet();
loss_set.description = "Parametric loss set example.";
loss_set.frequency = new Reference<Distribution>("3b1ed207-1e14-491e-9d38-a040346e2799");
loss_set.severity = new Reference<Distribution>("f3147df2-2508-40a2-931a-d5aeef8f3ea5");
loss_set.seasonality = new Reference<Distribution>("ebf7bfb6-0074-4910-bab1-050322af0001");
loss_set.currency = "USD";
loss_set.attributes = new Dictionary<string, string> {
    { "Region", "US" },
    { "Peril", "VL" }
};
loss_set = loss_set.Save();
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
frequency required
severity required
seasonality required
currency required
attributes optional
loss_type 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();
loss_set.description = "YELT loss set example.";
loss_set.event_catalogs.Add(
    new Reference<EventCatalog>("e02b0ace-96a5-47f8-a90e-c0960485f38e"));
loss_set.currency = "USD";
loss_set.trial_count = 100000;
loss_set = loss_set.Save();

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:

{
  "_type": "YELTLossSet",
  "id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
  "description": "YELT 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",
  "trial_count": 100000,
  "profile": {
    "currency" : "USD",
    "min_loss": 0.0,
    "avg_annual_loss": 2333443.0,
    "max_loss": 47234883.0,
    "num_losses": 234023,
    "non_zero_losses" : 23402,
    "attributes": {
      "Region": ["JP"],
      "Peril": ["EQ"]
    }
  }
}
Name Traits Description
_type required YELTLossSet
description required
event_catalogs required
currency required
loss_type optional
trial_count required

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)
using AnalyzeRe;
using AnalyzeRe.LossSets;

YLTLossSet loss_set = new YLTLossSet();
loss_set.description = "YELT loss set example.";
loss_set.sequence = 0.0;
loss_set.currency = "USD";
loss_set.attributes = new Dictionary<string, string> {
    { "Region", "US" },
    { "Peril", "HU" }
};
loss_set.trial_count = 100000;
loss_set = loss_set.Save();

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
sequence required
attributes optional
loss_type optional
trial_count required

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",
  "inuring_terms": {
    "occurrence_attachment": {
      "value": 100000.0,
      "currency": "USD"
    },
    "occurrence_limit": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_attachment": {
      "value": 300000.0,
      "currency": "USD"
    },
    "aggregate_limit": {
      "value": 500000.0,
      "currency": "USD"
    },
    "share": 0.1
  },
  "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:

{
  "_type": "YELTLossSet",
  "id": "59c6641b-65a7-4a7b-a113-1616470cac1b",
  "description": "YELT 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",
  "trial_count": 100000
}
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.",
  "sequence": 0.0,
  "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

Layers

Layer Class Description
CatXL Standard XL Layer
AggXL Aggregate XL Layer
QuotaShare
Generic

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.

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"
    },
    "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"
    }
}

Representation of an Aggregate Catastrophe Excess of Loss layer with 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.
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"
  },
  "loss_sets": [
      {
          "ref_type": "ELTLossSet",
          "href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
          "ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
      },
      {
          "ref_type": "ELTLossSet",
          "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.
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 it exhausted (minus one) before this layer attaches. For example: Set to ‘2’ if this is a Second Event XOL

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"
    },
    "loss_sets": [
        {
            "ref_type": "ELTLossSet",
            "href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
            "ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
        },
        {
            "ref_type": "ELTLossSet",
            "href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
            "ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
        },
        {
            "ref_type": "ELTLossSet",
            "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.
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

{
    "_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"
    },
    "loss_sets": [
        {
          "ref_type": "ELTLossSet",
          "href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
          "ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
        },
        {
          "ref_type": "ELTLossSet",
          "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"
    }
}

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.
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.

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"
    },
    "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"
    }
}
from analyzere import (
    Layer,
    LossSet,
    MonetaryUnit
)
from datetime import datetime, timezone

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'),
                loss_sets=[loss_set],
                participation=0.098,
                attachment=MonetaryUnit(1000000, 'USD'),
                limit=MonetaryUnit(2000000, 'USD'),
                aggregate_attachment=MonetaryUnit(0, 'USD'),
                aggregate_limit=MonetaryUnit(0, 'USD'),
                reinstatements=[],
                franchise = MonetaryUnit(0, 'USD')).save()
using System.Collections.Generic;
using AnalyzeRe;
using AnalyzeRe.Layers;

Generic generic = new Generic();
generic.description = "Demo 1 Echo Re Layer 1";
generic.meta_data = new Dictionary<string, object>
      {
          {"nth", 1},
          {"if_cover_florida", 1}
      };
generic.inception_date = new DateTime(2017, 1, 23, 4, 0, 0);
generic.expiry_date = new DateTime(2018, 1, 23, 4, 0, 0);
generic.premium = new MonetaryUnit(55774.15217, "USD");
generic.participation = 0.098;
generic.attachment = new MonetaryUnit(1000000, "USD");
generic.limit = new MonetaryUnit(2000000, "USD");
generic.franchise = new MonetaryUnit(0, "USD");
generic.aggregate_attachment = new MonetaryUnit(0, "USD");
generic.aggregate_limit = new MonetaryUnit(0, "USD");

generic = generic.Save()

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"
    },
    "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
_type required Generic
description required
meta_data optional
participation required
inception_date optinoal
expiry_date optional
premium 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"
  },
  "loss_sets": [
      {
          "ref_type": "ELTLossSet",
          "ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
      },
      {
          "ref_type": "ELTLossSet",
          "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,
    Reinstatement
)
from datetime import datetime, timezone

loss_set1 = LossSet.retrieve('49c9c3ca-475f-4b70-b362-3d09caa48afb')
loss_set2 = LossSet.retrieve('9fadbccf-178e-4400-9bc3-5fff17886cb0')

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'),
              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 AnalyzeRe;
using AnalyzeRe.Layers;
using AnalyzeRe.LossSets;

CatXL catXL = new CatXL();
catXL.description = "Alpha Re Layer 1";
catXL.inception_date = new DateTime(2017, 3, 17, 14, 2, 43, 837);
catXL.expiry_date = new DateTime(2018, 3, 17, 14, 2, 43, 837);
catXL.premium = new MonetaryUnit(100000, "USD");
catXL.participation = 0.25;
catXL.loss_sets.AddRange(new []
{
    new Reference<ELTLossSet>("49c9c3ca-475f-4b70-b362-3d09caa48afb"),
    new Reference<ELTLossSet>("9fadbccf-178e-4400-9bc3-5fff17886cb0")
});
catXL.nth = 1;
catXL.attachment = new MonetaryUnit(1718242.18923324, "USD");
catXL.limit = new MonetaryUnit(1718242.18923324, "USD");
catXL.franchise = new MonetaryUnit(0, "USD");
catXL.reinstatements.AddRange(new[]
{
    new Reinstatement{premium = 0.1, brokerage = 0.05},
    new Reinstatement{premium = 0.2, brokerage = 0.05},
    new Reinstatement{premium = 0.3, brokerage = 0.05}
});

catXL = catXL.Save()

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"
  },
  "loss_sets": [
      {
          "ref_type": "ELTLossSet",
          "href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
          "ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
      },
      {
          "ref_type": "ELTLossSet",
          "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 optinoal
expiry_date optional
premium 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"
    },
    "loss_sets": [
        {
            "ref_type": "ELTLossSet",
            "ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
        },
        {
            "ref_type": "ELTLossSet",
            "ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
        },
        {
            "ref_type": "ELTLossSet",
            "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
)
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')

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'),
              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 AnalyzeRe;
using AnalyzeRe.Layers;
using AnalyzeRe.LossSets;

AggXL aggXL = new AggXL();
aggXL.description = "Golf Re Layer 1";
aggXL.inception_date = new DateTime(2017, 1, 23, 4, 0, 0);
aggXL.expiry_date = new DateTime(2018, 1, 23, 4, 0, 0);
aggXL.premium = new MonetaryUnit(1119718.3336, "USD");
aggXL.participation = 0.098;
aggXL.loss_sets.AddRange(new[]
{
    new Reference<PortfolioLossSet>("a1ea710e-43b7-4b61-a672-31ad2c2137f1"),
    new Reference<PortfolioLossSet>("bb14804d-570a-408c-b4d7-f1763734032f"),
    new Reference<PortfolioLossSet>("1dd318b0-9af9-4716-9e08-f4811708a117")
});
aggXL.attachment = new MonetaryUnit(110000000, "USD");
aggXL.limit = new MonetaryUnit(15000000, "USD");
aggXL.franchise = new MonetaryUnit(10, "USD");
aggXL.aggregate_attachment = new MonetaryUnit(110000000, "USD");
aggXL.aggregate_limit = new MonetaryUnit(15000000, "USD");
aggXL.Save();

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"
  },
  "loss_sets": [
      {
          "ref_type": "ELTLossSet",
          "href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
          "ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
      },
      {
          "ref_type": "ELTLossSet",
          "href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
          "ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
      },
      {
          "ref_type": "ELTLossSet",
          "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 optinoal
expiry_date optional
premium 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": [
      {
        "ref_type": "ELTLossSet",
        "ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
      },
      {
        "ref_type": "ELTLossSet",
        "ref_id": "9d991b36-48fd-45a5-a322-c9286868a98d"
      }
  ],
  "participation": 0.098,
  "event_limit": {
      "value": 300000,
      "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='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 AnalyzeRe;
using AnalyzeRe.Layers;
using AnalyzeRe.LossSets;

QuotaShare quotaShare = new QuotaShare();
quotaShare.description = "India Re Layer 5";
quotaShare.inception_date = new DateTime(2017, 1, 23, 4, 0, 0);
quotaShare.expiry_date = new DateTime(2018, 1, 23, 4, 0, 0);
quotaShare.premium = new MonetaryUnit(245810.8696, "USD");
quotaShare.loss_sets.AddRange(new[]
{
    new Reference<PortfolioLossSet>("e7e116dc-9e88-4d4c-ada3-6307194ecf9a"),
    new Reference<PortfolioLossSet>("9d991b36-48fd-45a5-a322-c9286868a98d")
});
quotaShare.participation = 0.098;
quotaShare.event_limit = new MonetaryUnit(300000, "USD");

quotaShare.Save();

Response Body:

{
    "_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"
    },
    "loss_sets": [
        {
          "ref_type": "ELTLossSet",
          "href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
          "ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
        },
        {
          "ref_type": "ELTLossSet",
          "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"
    }
}

Arguments

Attribute Traits Description
_type required QuotaShare
description required
meta_data optional
participation required
inception_date optinoal
expiry_date optional
premium optional
loss_sets optional
event_limit required

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;

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"
    },
    "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;

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"
  },
  "loss_sets": [
      {
          "ref_type": "ELTLossSet",
          "href": "https://api.analyzere.net/loss_sets/49c9c3ca-475f-4b70-b362-3d09caa48afb",
          "ref_id": "49c9c3ca-475f-4b70-b362-3d09caa48afb"
      },
      {
          "ref_type": "ELTLossSet",
          "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;

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"
    },
    "loss_sets": [
        {
            "ref_type": "ELTLossSet",
            "href": "http://api.analyzere.net/loss_sets/a1ea710e-43b7-4b61-a672-31ad2c2137f1",
            "ref_id": "a1ea710e-43b7-4b61-a672-31ad2c2137f1"
        },
        {
            "ref_type": "ELTLossSet",
            "href": "http://api.analyzere.net/loss_sets/bb14804d-570a-408c-b4d7-f1763734032f",
            "ref_id": "bb14804d-570a-408c-b4d7-f1763734032f"
        },
        {
            "ref_type": "ELTLossSet",
            "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;

QuotaShare layer = API.Get<QuotaShare>("4c2608d7-6f87-4f77-b470-d65d39d1b950");

Response Body:

{
    "_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"
    },
    "loss_sets": [
        {
          "ref_type": "ELTLossSet",
          "href": "http://api.analyzere.net/loss_sets/e7e116dc-9e88-4d4c-ada3-6307194ecf9a",
          "ref_id": "e7e116dc-9e88-4d4c-ada3-6307194ecf9a"
        },
        {
          "ref_type": "ELTLossSet",
          "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"
    }
}

Arguments

Attribute Traits Description
id required The UUID of the resource 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",
  "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"
    }
  ]
}

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",
  "name": "2015 North American In Force",
  "description": "All North American exposures",
  "layers": [
    {
      "ref_type": "Generic",
      "href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
      "ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
    }
  ]
}
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",
  "name": "2015 North American In Force",
  "description": "All North American exposures",
  "layers": [
    {
      "ref_type": "Generic",
      "href": "https://api.analyzere.net/layers/768c8554-6fa8-464b-8878-5ac1792ffdb5",
      "ref_id": "768c8554-6fa8-464b-8878-5ac1792ffdb5"
    }
  ]
}
Name Traits Description
id required The UUID of the Portfolio to be retrieved

Metrics

Metrics can be accessed for both LayerViews and PortfolioViews.

Metrics-specific conventions

Layer View and Portfolio View Metrics

Both Layer Views and Portfolio Views 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.

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])
// 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

Response body

[
  // ... 3 tail 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.

Perspective

Different perspectives may be used to retrieve metrics. A perspective is a string, whose value is one of:

The default is LossNetOfAggregateTerms.

Embedded Objects

Context

The context of a tail 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",
  "context": {
    "_type": "LayerViewMetricsContext",
    "probability": 0.1,
    "currency": "USD",
    "filter": "WW_AP",
    "perspective": "LossNetOfAggregateTerms",
    "layer_view": {
      "ref_type": "LayerView",
      "href": "http://localhost:8000/layer_views/8e571e0f-a292-3228-9d71-55df7a839d79",
      "ref_id": "8e571e0f-a292-3228-9d71-55df7a839d79"
    }
  },
  "mean": 69814.7962296587,
  "variance": 0,
  "min": 69814.7962296587,
  "max": 69814.7962296587,
  "skewness": 0,
  "kurtosis": 0
}

PortfolioView

{
  "_type": "PortfolioViewMetrics",
  "context": {
    "_type": "PortfolioViewMetricsContext",
    "probability": 0.1,
    "currency": "USD",
    "filter": "WW_AP",
    "perspective": "LossNetOfAggregateTerms",
    "portfolio_view": {
      "ref_type": "PortfolioView",
      "href": "http://localhost:8000/portfolio_views/f49d8342-bfd8-3461-91e7-96ae72da1297",
      "ref_id": "f49d8342-bfd8-3461-91e7-96ae72da1297"
    }
  },
  "mean": 81.59290885793756,
  "variance": 0,
  "min": 81.59290885793756,
  "max": 81.59290885793756,
  "skewness": 0,
  "kurtosis": 0
}

Attributes

Attribute Type Description
_type string LayerViewMetrics or PortfolioViewMetrics
context Context
mean Float
variance Float
min Float
max Float
skewness Float
kurtosis Float

Tail Metrics Context

Attribute Type Description
_type string
probability Float
currency ISO 4217 currency code
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 Portfolio View

Retrieve

Tail Metrics

Layer View

from analyzere import LayerView

layer_view = LayerView.retrieve('8e571e0f-a292-3228-9d71-55df7a839d79')
tail_metrics = layer_view.tail_metrics(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;

LayerView layer_view = API.Get<LayerView>("8e571e0f-a292-3228-9d71-55df7a839d79");
IViewTailMetrics tail_metrics = layer_view.tail_metrics(0.1)
GET /layer_views/8e571e0f-a292-3228-9d71-55df7a839d79/tail_metrics/0.1 HTTP/1.1
Host: api.analyzere.net

Response Body

{
  "_type": "LayerViewMetrics",
  "context": {
    "_type": "LayerViewMetricsContext",
    "probability": 0.1,
    "currency": "USD",
    "filter": "WW_AP",
    "perspective": "LossNetOfAggregateTerms",
    "layer_view": {
      "ref_type": "LayerView",
      "href": "http://localhost:8000/layer_views/8e571e0f-a292-3228-9d71-55df7a839d79",
      "ref_id": "8e571e0f-a292-3228-9d71-55df7a839d79"
    }
  },
  "mean": 69814.7962296587,
  "variance": 0,
  "min": 69814.7962296587,
  "max": 69814.7962296587,
  "skewness": 0,
  "kurtosis": 0
}

Portfolio View

from analyzere import PortfolioView

portfolio_view = PortfolioView.retrieve('f49d8342-bfd8-3461-91e7-96ae72da1297')
tail_metrics = portfolio_view.tail_metrics(0.1)
using AnalyzeRe;
using AnalyzeRe.Metrics;

PortfolioView portfolio_view = API.Get<PortfolioView>("f49d8342-bfd8-3461-91e7-96ae72da1297");
IViewTailMetrics tail_metrics = portfolio_view.tail_metrics(0.1)
GET /portfolio_views/f49d8342-bfd8-3461-91e7-96ae72da1297/tail_metrics/0.1 HTTP/1.1
Host: api.analyzere.net

Response Body

{
  "_type": "PortfolioViewMetrics",
  "context": {
    "_type": "PortfolioViewMetricsContext",
    "probability": 0.1,
    "currency": "USD",
    "filter": "WW_AP",
    "perspective": "LossNetOfAggregateTerms",
    "portfolio_view": {
      "ref_type": "PortfolioView",
      "href": "http://localhost:8000/portfolio_views/f49d8342-bfd8-3461-91e7-96ae72da1297",
      "ref_id": "f49d8342-bfd8-3461-91e7-96ae72da1297"
    }
  },
  "mean": 81.59290885793756,
  "variance": 0,
  "min": 81.59290885793756,
  "max": 81.59290885793756,
  "skewness": 0,
  "kurtosis": 0
}

Arguments

Attribute Traits Type Description
probability required float Probability as a value between 0 and 1 (inclusive).
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 Default is USD.