C# Client Library
A C# Client Library for the AnalyzeRe REST API
AnalyzeRe.PortfolioView Class Reference

Represents the Analysis of a Portfolio More...

Classes

class  LayerViewsDefault
 Attribute used to define the default layer_views created when a PortfolioView is created from a reference to a Portfolio.
 

Public Member Functions

 PortfolioView ()
 Construct a new PortfolioView with an empty layer_views HashSet and a reference to the default Analysis Profile. More...
 
BackAllocations back_allocations (string source_id, int?timeout=null)
 Returns a URL to the YELT of this view back-allocated to some component loss source. More...
 
CoMetrics co_metrics< T > (ProbabilityWindow range, IReference< T > component, CoMetricsOptions options=null, int?timeout=null)
 Returns the co-metrics of this view for a given probability range. More...
 
List< CoMetricsco_metrics< T > (IEnumerable< ProbabilityWindow > ranges, IReference< T > component, CoMetricsOptions options=null, int?timeout=null)
 Returns the co-metrics of this view for multiple probability ranges. More...
 
CoMetrics co_metrics< T > (double probability, IReference< T > component, CoMetricsOptions options)
 Obsolete.

See also
co_metrics<T>(ProbabilityWindow,IReference<T>,CoMetricsOptions,Int32?)

Returns the co-tail-metrics of this view for a given probability range. More...

 
List< CoMetricsco_metrics< T > (List< double > probabilities, IReference< T > component, CoMetricsOptions options)
 Obsolete.

See also
co_metrics<T>(IEnumerable<ProbabilityWindow>,IReference<T>,CoMetricsOptions,Int32?)

Returns the co-tail-metrics of this view for multiple probability ranges. More...

 
ExceedanceProbability exceedance_probability (double threshold, ExceedanceProbabilityOptions options=null, int?timeout=null)
 Returns the exceedance probability for this view for the given loss. That is, the probability the specified loss (threshold) is exceeded. More...
 
List< ExceedanceProbabilityexceedance_probability (IEnumerable< double > thresholds, ExceedanceProbabilityOptions options=null, int?timeout=null)
 Returns the exceedance probability for this view for the given losses. That is, the probability the specified loss (threshold) is exceeded. More...
 
IReference< PortfolioViewPostMarginalPortfolio (IEnumerable< IReference< ILayerView >> layerViewsToAdd=null, IEnumerable< IReference< ILayerView >> layerViewsToRemove=null, int?timeout=null)
 Construct a new "marginal" PortfolioView by adding and/or removing one or more LayerViews to/from this PortfolioView. More...
 
virtual T ShallowCopy< T > ()
 Create a shallow copy of this object.

See also
ExtensionMethods.DeepCopy<T>

for a serializer-based copy method. More...

 
TailMetrics tail_metrics (double probability, MetricsOptions options=null, int?timeout=null)
 Returns the tail metrics of this view at a given probability. More...
 
List< TailMetricstail_metrics (IEnumerable< double > probabilities, MetricsOptions options=null, int?timeout=null)
 Returns the tail metrics of this view at multiple probabilities. More...
 
WindowMetrics window_metrics (ProbabilityWindow range, MetricsOptions options=null, int?timeout=null)
 Returns the window metrics of this view for a given probability range. More...
 
List< WindowMetricswindow_metrics (IEnumerable< ProbabilityWindow > ranges, MetricsOptions options=null, int?timeout=null)
 Returns the window metrics of this view for multiple probability ranges. More...
 

Public Attributes

override string collection_name => CLASS_COLLECTION_NAME
 The collection endpoint at which resources of this type reside on the server. More...
 
string Path => API.GetResourcePath(this)
 The relative path to this endpoint from the root URL. More...
 
YELTSimulationResult yelt => _yelt ?? (_yelt = new YELTSimulationResult(this))
 Allows retrieval of the YELT (Year Event Loss Table) associated with this view once it has been simulated. More...
 
YLTSimulationResult ylt => _ylt ?? (_ylt = new YLTSimulationResult(this))
 Allows retrieval of the YLT (Year Loss Table) associated with this view once it has been simulated. More...
 

Static Public Attributes

static readonly string CLASS_COLLECTION_NAME = "portfolio_views"
 The collection endpoint at which resources of this type reside on the server. More...
 

Protected Member Functions

override void AfterMembersCloned (APIType _)
 Invoked following construction if the current instance has been created using a member-wise clone of some other instance. Override if your derived APIType class contains some members that should not be cloned. More...
 

Properties

IReference< AnalysisProfileanalysis_profile [get, set]
 The simulation's analysis profile. More...
 
string id [get, set]
 The resource's unique identifier. It will be used in the request URL when requesting the resource from the server. More...
 
HashSet< IReference< ILayerView > > layer_views [get, set]
 The LayerViews included in this PortfolioView. Must be supplied when posting a new PortfolioView, unless a reference to a Portfolio is supplied, in which case the layer_views property will return the server-generated LayerViews corresponding to the Layers in the referenced Portfolio. More...
 
IReference< StaticPortfolioportfolio [get, set]
 The portfolio from which this portfolioView was constructed. Can be supplied by the user on POST instead of a list of layer_views. More...
 
MonetaryUnit premium [get, set]
 The computed premium of this portfolio. More...
 
string target_currency [get, set]
 The currency this view's YLTs are stored in, and the default currency results are returned in. If not specified, the server will automatically select a reasonable default currency based on the structure's terms. More...
 
string ylt_id [get, set]
 The hash identifier for the simulation results of this view. More...
 

Detailed Description

Represents the Analysis of a Portfolio

Definition at line 12 of file PortfolioView.cs.

Inheritance diagram for AnalyzeRe.PortfolioView:
AnalyzeRe.APIResourceView.BaseAPIResourceView AnalyzeRe.APIResource AnalyzeRe.IAPIResourceView AnalyzeRe.APIType AnalyzeRe.IAPIResource AnalyzeRe.APITypes.IAPIAnalysis AnalyzeRe.IAPIResource AnalyzeRe.IAPIType AnalyzeRe.IAPIType AnalyzeRe.APITypes.IEndpoint AnalyzeRe.IAPIType AnalyzeRe.APITypes.IEndpoint

Constructor & Destructor Documentation

AnalyzeRe.PortfolioView.PortfolioView ( )
inline

Construct a new PortfolioView with an empty layer_views HashSet and a reference to the default Analysis Profile.

Definition at line 71 of file PortfolioView.cs.

Member Function Documentation

override void AnalyzeRe.APIResourceView.BaseAPIResourceView.AfterMembersCloned ( APIType  _)
inlineprotectedvirtualinherited

Invoked following construction if the current instance has been created using a member-wise clone of some other instance. Override if your derived APIType class contains some members that should not be cloned.

Reimplemented from AnalyzeRe.APIType.

Definition at line 271 of file BaseAPIResourceView.cs.

BackAllocations AnalyzeRe.APIResourceView.BaseAPIResourceView.back_allocations ( string  source_id,
int?  timeout = null 
)
inlineinherited

Returns a URL to the YELT of this view back-allocated to some component loss source.

Parameters
source_idThe id of the component loss source to back-allocate the YELT to.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The URL of the YELT back-allocated to the specified source.

POST a Layers.BackAllocatedLayer instead, using this resource as the Layers.BackAllocatedLayer.sink, to gain performance benefits and the ability to back-allocate beyond another back-allocation result.

This method should be considered obsolete, although note that portfolio's cannot be used directly as a Layers.BackAllocatedLayer.sink reference. If this resource is a portfolio, you will need to recreate it as a Nested layer in order to replace this call with a Layers.BackAllocatedLayer.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 260 of file BaseAPIResourceView.cs.

CoMetrics AnalyzeRe.APIResourceView.BaseAPIResourceView.co_metrics< T > ( ProbabilityWindow  range,
IReference< T >  component,
CoMetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the co-metrics of this view for a given probability range.

Template Parameters
TThe type of the component referenced.
Parameters
rangeThe probability range for which to compute co-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The co-metrics at the specified probability.

Implements AnalyzeRe.IAPIResourceView.

Type Constraints
T :IAPIResourceView 

Definition at line 136 of file BaseAPIResourceView.cs.

List<CoMetrics> AnalyzeRe.APIResourceView.BaseAPIResourceView.co_metrics< T > ( IEnumerable< ProbabilityWindow ranges,
IReference< T >  component,
CoMetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the co-metrics of this view for multiple probability ranges.

Template Parameters
TThe type of the component referenced.
Parameters
rangesThe probability ranges at which to compute co-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The co-metrics at the specified probabilities.

Implements AnalyzeRe.IAPIResourceView.

Type Constraints
T :IAPIResourceView 

Definition at line 154 of file BaseAPIResourceView.cs.

CoMetrics AnalyzeRe.APIResourceView.BaseAPIResourceView.co_metrics< T > ( double  probability,
IReference< T >  component,
CoMetricsOptions  options 
)
inlineinherited

Obsolete.

See also
co_metrics<T>(ProbabilityWindow,IReference<T>,CoMetricsOptions,Int32?)

Returns the co-tail-metrics of this view for a given probability range.

Template Parameters
TThe type of the component referenced.
Parameters
probabilityThe probability for which to compute co-tail-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
Returns
The co-tail-metrics at the specified probability.

Implements AnalyzeRe.IAPIResourceView.

Type Constraints
T :IAPIResourceView 

Definition at line 370 of file BaseAPIResourceView.cs.

List<CoMetrics> AnalyzeRe.APIResourceView.BaseAPIResourceView.co_metrics< T > ( List< double >  probabilities,
IReference< T >  component,
CoMetricsOptions  options 
)
inlineinherited

Obsolete.

See also
co_metrics<T>(IEnumerable<ProbabilityWindow>,IReference<T>,CoMetricsOptions,Int32?)

Returns the co-tail-metrics of this view for multiple probability ranges.

Template Parameters
TThe type of the component referenced.
Parameters
probabilitiesThe probabilities at which to compute co-tail-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
Returns
The co-tail-metrics at the specified probabilities.

Implements AnalyzeRe.IAPIResourceView.

Type Constraints
T :IAPIResourceView 

Definition at line 389 of file BaseAPIResourceView.cs.

ExceedanceProbability AnalyzeRe.APIResourceView.BaseAPIResourceView.exceedance_probability ( double  threshold,
ExceedanceProbabilityOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the exceedance probability for this view for the given loss. That is, the probability the specified loss (threshold) is exceeded.

Parameters
thresholdThe threshold at which to calculate the exceedance probability.
optionsA set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The exceedance probability for the given loss.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 219 of file BaseAPIResourceView.cs.

List<ExceedanceProbability> AnalyzeRe.APIResourceView.BaseAPIResourceView.exceedance_probability ( IEnumerable< double >  thresholds,
ExceedanceProbabilityOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the exceedance probability for this view for the given losses. That is, the probability the specified loss (threshold) is exceeded.

Parameters
thresholdsThe thresholds at which to calculate the exceedance probability.
optionsA set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The exceedance probability for the given loss values.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 235 of file BaseAPIResourceView.cs.

IReference<PortfolioView> AnalyzeRe.PortfolioView.PostMarginalPortfolio ( IEnumerable< IReference< ILayerView >>  layerViewsToAdd = null,
IEnumerable< IReference< ILayerView >>  layerViewsToRemove = null,
int?  timeout = null 
)
inline

Construct a new "marginal" PortfolioView by adding and/or removing one or more LayerViews to/from this PortfolioView.

Parameters
layerViewsToAddThe ILayerView references to add.
layerViewsToRemoveThe ILayerView references to remove.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
Returns a reference to the marginal PortfolioView created by the server.

Definition at line 82 of file PortfolioView.cs.

virtual T AnalyzeRe.APIType.ShallowCopy< T > ( )
inlinevirtualinherited

Create a shallow copy of this object.

See also
ExtensionMethods.DeepCopy<T>

for a serializer-based copy method.

Returns
A shallow copy of this object.

If this object contains any members that reference the current object (this), the class should override this method to avoid cloning a reference to the old class.

Implements AnalyzeRe.IAPIType.

Type Constraints
T :IAPIType 

Definition at line 14 of file APIType.cs.

TailMetrics AnalyzeRe.APIResourceView.BaseAPIResourceView.tail_metrics ( double  probability,
MetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the tail metrics of this view at a given probability.

Parameters
probabilityThe probability at which to compute tail metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).

Tail metrics functions are implemented as a shortcut - they are equivalent to requesting window_metrics(ProbabilityWindow,MetricsOptions,Int32?) with the ProbabilityWindow's minimum probability set to 0.

Returns
The tail_metrics at the specified probability.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 69 of file BaseAPIResourceView.cs.

List<TailMetrics> AnalyzeRe.APIResourceView.BaseAPIResourceView.tail_metrics ( IEnumerable< double >  probabilities,
MetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the tail metrics of this view at multiple probabilities.

Parameters
probabilitiesThe probabilities at which to compute tail metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The tail_metrics at the specified probabilities, as a list of TailMetrics responses in the same order as the probabilities supplied.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 84 of file BaseAPIResourceView.cs.

WindowMetrics AnalyzeRe.APIResourceView.BaseAPIResourceView.window_metrics ( ProbabilityWindow  range,
MetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the window metrics of this view for a given probability range.

Parameters
rangeThe probability range for which to compute window metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The window_metrics at the specified probability.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 101 of file BaseAPIResourceView.cs.

List<WindowMetrics> AnalyzeRe.APIResourceView.BaseAPIResourceView.window_metrics ( IEnumerable< ProbabilityWindow ranges,
MetricsOptions  options = null,
int?  timeout = null 
)
inlineinherited

Returns the window metrics of this view for multiple probability ranges.

Parameters
rangesThe probability ranges for which to compute window metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The window_metrics at the specified probabilities, as a list of WindowMetrics responses in the same order as the probabilities supplied.

Implements AnalyzeRe.IAPIResourceView.

Definition at line 116 of file BaseAPIResourceView.cs.

Member Data Documentation

readonly string AnalyzeRe.PortfolioView.CLASS_COLLECTION_NAME = "portfolio_views"
static

The collection endpoint at which resources of this type reside on the server.

Definition at line 37 of file PortfolioView.cs.

override string AnalyzeRe.PortfolioView.collection_name => CLASS_COLLECTION_NAME

The collection endpoint at which resources of this type reside on the server.

Definition at line 41 of file PortfolioView.cs.

string AnalyzeRe.APIResource.Path => API.GetResourcePath(this)
inherited

The relative path to this endpoint from the root URL.

Exceptions
System.ArgumentExceptionIf this resource does not have an id.

Definition at line 27 of file APIResource.cs.

YELTSimulationResult AnalyzeRe.APIResourceView.BaseAPIResourceView.yelt => _yelt ?? (_yelt = new YELTSimulationResult(this))
inherited

Allows retrieval of the YELT (Year Event Loss Table) associated with this view once it has been simulated.

Definition at line 55 of file BaseAPIResourceView.cs.

YLTSimulationResult AnalyzeRe.APIResourceView.BaseAPIResourceView.ylt => _ylt ?? (_ylt = new YLTSimulationResult(this))
inherited

Allows retrieval of the YLT (Year Loss Table) associated with this view once it has been simulated.

Definition at line 50 of file BaseAPIResourceView.cs.

Property Documentation

IReference<AnalysisProfile> AnalyzeRe.APIResourceView.BaseAPIResourceView.analysis_profile
getsetinherited

The simulation's analysis profile.

Definition at line 33 of file BaseAPIResourceView.cs.

string AnalyzeRe.APIResource.id
getsetinherited

The resource's unique identifier. It will be used in the request URL when requesting the resource from the server.

Definition at line 16 of file APIResource.cs.

HashSet<IReference<ILayerView> > AnalyzeRe.PortfolioView.layer_views
getset

The LayerViews included in this PortfolioView. Must be supplied when posting a new PortfolioView, unless a reference to a Portfolio is supplied, in which case the layer_views property will return the server-generated LayerViews corresponding to the Layers in the referenced Portfolio.

Definition at line 56 of file PortfolioView.cs.

IReference<StaticPortfolio> AnalyzeRe.PortfolioView.portfolio
getset

The portfolio from which this portfolioView was constructed. Can be supplied by the user on POST instead of a list of layer_views.

Definition at line 61 of file PortfolioView.cs.

MonetaryUnit AnalyzeRe.PortfolioView.premium
getset

The computed premium of this portfolio.

Definition at line 66 of file PortfolioView.cs.

string AnalyzeRe.APIResourceView.BaseAPIResourceView.target_currency
getsetinherited

The currency this view's YLTs are stored in, and the default currency results are returned in. If not specified, the server will automatically select a reasonable default currency based on the structure's terms.

Definition at line 45 of file BaseAPIResourceView.cs.

string AnalyzeRe.APIResourceView.BaseAPIResourceView.ylt_id
getsetinherited

The hash identifier for the simulation results of this view.

Definition at line 38 of file BaseAPIResourceView.cs.


The documentation for this class was generated from the following file: