MathStatement Element
A MathStatement is a predefined hybrid function that can be used during assignment processing for unit linked funds. The functions can find last known fund prices or the next exchange date fund price, when calculating valuation units and amounts. Existing functions include:
-
The ClassMembership function will return an array of ClassGUIDs for the member record in a data Intake file from an input array of ClassGroupGUIDs. The first ClassGUID in the output array would be the class for the record.
- The FindBillDetail creates an output array of BillDetail records based on the values of the input parameters. The array may then be used in the attached rule ‘CreateBill’ to create the aggregated AsBill record. FindBillDetail may be executed multiple times within the activity.
-
The FindBillDetail activity function identifies all pending bill detail records for the given input parameters and places then into an output array that may be passed into the GenerateBill APE rule. This function may be configured to run multiple times inside the same activity to create multiple arrays of bill detail records. StartDate and EndDate parameters define the date range for the pending Bill Detail records based on their Due date. The amount of the Bill Detail record must be between the BillMinimumAmountThreshold and BillMaximumAmountThreshold. The BillGroupGUID matches the BillGroupGUID for the Bill Detail records. The output arrays are; BillDetailPolicyGUIDArray listing all Policy related Bill Detail records, BillDetailClientGUIDArray listing all Client related BillDetailRecords, BillDetailSegmentGUIDArray listing all segment related Bill Detail records, and BillDetailArray listing all of the Bill Detail records.
- The
FindLastExchangeDatePricingfunction returns the same exchange date outputs as theFindNextExchangeDatePricingfunction. The values of the output parameters are based on the last known price date for each fund with no offsets applied.
- The
FindNextExchangeDatePricingfunction allows the system to retrieve the last known prices and dates to be used in the calculations as currently calculated by the Math expression “Valuation:Policy:CashValue”. The input parameter ExchangeDateOffset is an integer value is used to calculate the appropriate Currency Exchange Dates. This value is applied to the Activity’s effective date using the Transaction plan’s marketmaker calendar to find the output parameters GuaranteedCurrencyExchangeDate, GainLossCurrencyExchangeDate, and the RateExists boolean.
- The GetBenefitSplit function will calculate the modal benefit amount for a given date based on a policy’s benefit fund allocation as well as return a collection of the parent funds and amounts used to make up the benefit. Benefit funds may also be explicitly excluded from the calculation in the case of Annual Benefit Leveling”
- The GetFundPositions function will retrieve a collection of parent fund GUIDs where a fund value exists and the fund has values. The Assignment will in turn, derive the correct child funds to use when writing the valuation records. This MathStatement can only be used in transaction Math when the Activity is configured to perform Valuation. Specific funds may be excluded from the positions calculation by including their fund GUID in the ExcludeFunds array.
- The
MathValuationfunction will execute the policy valuation as of a specified date for use inside transaction math. All valuation will be executed using the plan configuration (Point-in-Time or from inception). The ValuationDate input parameter specifies the date for which valuation is calculated. The PolicyValues input parameter can be given a value of Yes or No to indicate whether the PolicyValues business rule will execute during the valuation process on each policy. The NearestPrice input parameter indicates whether the valuation is to be calculated with the exact prices as of the ValuationDate (No) or using the last known prices as of the ValuationDate (Yes). The optional ExactPriceDateUsed output parameter returns true or false to indicate whether the fund prices used to value the policy were as of the exact ValuationDates specified (true) or the nearest price dates (false). MathValuation may execute inside Policy level Transaction Math, user defined Functions or CopyBooks.
In order to process unit linked funds, assignment will require that one of these functions exist in Math.
| TYPE=ClassMembership | ||
|---|---|---|
| Element | Attribute | Definition |
|
<MathStatement> |
Opening element for math variable |
|
|
TYPE |
ACIVITYFUNCTION Required: Defines the math statement type |
|
| FUNCTIONNAME |
ClassMembership Required: Defines the function to run |
|
|
<Parameters> |
Required: Opening element of the parameters. |
|
|
<Parameter> |
Required: Defines the parameters for the function |
|
| NAME |
ClassGroupArray Required: Defines the parameter to assign the value. A math variable holding an array of ClassGroupGUIDs for the Data Intake record. |
|
| TYPE |
INPUT Required: Defines if the parameter is either input or output for the function. |
|
|
<Parameter> |
Required: Defines the parameters for the function |
|
| NAME |
ClassGUIDArray Optional: Defines the parameter to assign the value. A math variable holding the an array of ClassGUIDs for the Data Intake record. |
|
| TYPE |
OUTPUT Optional: Defines if the parameter is either input or output for the function |
|
XML Schema
<MathStatement TYPE="ACTIVITYFUNCTION" FUNCTIONNAME="ClassMembership">
<Parameters>
<Parameter NAME="ClassGroupArray" TYPE="INPUT">[Array of Class GroupGUIDs]</Parameter>
<Parameter NAME="ClassGUIDArray" TYPE="OUTPUT">[MathVariable Array]</Parameter>
</Parameters>
</MathStatement>
| TYPE=FindBillDetail | ||
|---|---|---|
| Element | Attribute | Definition |
|
<MathStatement> |
Opening element for math variable |
|
|
TYPE |
"ACTIVITYFUNCTION" Required attribute:Defines the math statement type |
|
|
FUNCTIONNAME |
"FINDBILLDETAIL" Required attribute:Defines the function to run value |
|
|
<Parameters> |
Opening element of the parameters |
|
|
<Parameter> |
|
A field or math variable containing a date Required attribute:Defines the parameter of the function |
|
NAME |
"StartDate" Required attribute:Defines input name. |
|
|
TYPE |
"INPUT" Required attribute: Defines if the parameter is either input or output for the function |
|
|
<Parameter> |
|
A field or math variable containing a date Defines the parameters for the function |
|
NAME |
"EndDate" Required attribute:Defines the parameter to assign the value. |
|
|
TYPE |
"INPUT" Required attribute:Predefined MathVariable Type. |
|
|
<Parameter> |
|
Defines the parameters for the function. |
|
NAME |
A field or math variable containing a "BillGroupGUID" Required attribute: Defines the parameter to assign the value. |
|
|
TYPE |
"INPUT" Required attribute:Defines if the parameter is either input or output for the function. |
|
|
<Parameter> |
|
A field or math variable containing a currency amount Defines the parameters for the function. |
|
NAME |
"BillMinimumAmountThreshold" Required attribute: Defines the parameter to assign the value |
|
|
TYPE |
"INPUT" Required attribute:Defines if the parameter is either input or output for the function |
|
|
<Parameter> |
|
A field or math variable containing a currency amount Defines the parameters for the function |
|
NAME |
"BillMaximumAmountThreshold" Required attribute: Defines the parameter to assign the value. |
|
|
TYPE |
"INPUT" Required attribute:Defines if the parameter is either input or output for the function. |
|
|
<Parameter> |
|
A field or math variable containing a string array Defines the parameters for the function. |
|
NAME |
"BillDetailArray" Required attribute: Defines the parameter to assign the value. |
|
|
TYPE |
"OUTPUT" Required attribute:Defines if the parameter is either input or output for the function. |
|
|
<Parameter> |
|
A field or math variable containing a string array Optional: Defines the parameters for the function (output parameters are optional) |
|
NAME |
“BillDetailPolicyGUIDArray” Required attribute:Defines the parameter to assign the value |
|
|
TYPE |
“OUTPUT” Optional attribute: Defines if the parameter is either input or output for the function |
|
|
<Parameter> |
A field or math variable containing a string array. Optional:Defines the parameters for the function (output parameters are optional). |
|
|
NAME |
“BillDetailClientGUIDArray” Required: Defines the parameter to assign the value. |
|
|
TYPE |
“OUTPUT” Optional:Defines the parameters for the function (output parameters are optional). |
|
|
<Parameter> |
A field or math variable containing a string array. Optional:Defines the parameters for the function (output parameters are optional). |
|
|
NAME |
“BillDetailSegmentGUIDArray” Required: Defines the parameter to assign the value. |
|
|
TYPE |
“OUTPUT” Optional:Defines the parameters for the function (output parameters are optional). |
|
XML Schema
<MathStatement TYPE="ACTIVITYFUNCTION" FUNCTIONNAME="FindBillDetail">
<Parameters>
<Parameter NAME="StartDate" TYPE="INPUT">[Date Field or MathVariable]</Parameter>
<Parameter NAME="EndDate" TYPE="INPUT">[Date Field or MathVariable]</Parameter>
<Parameter NAME="BillGroupGUID" TYPE="INPUT">[Text Field or MathVariable]</Parameter>
<Parameter NAME="BillMinimumAmountThreshhold" TYPE="INPUT">[Amount Field or MathVariable]</Parameter>
<Parameter NAME="BillMaximumAmountThreshhold" TYPE="INPUT">[Amount Field or MathVariable]</Parameter>
<Parameter NAME="BillDetailArray" TYPE="OUTPUT">[Array MathVariable]</Parameter>
<Parameter NAME="BillDetailPolicyGUIDArray" TYPE="OUTPUT">[Array MathVariable]</Parameter>
<Parameter NAME="BillDetailClientGUIDArray" TYPE="OUTPUT">[Array MathVariable]</Parameter>
<Parameter NAME="BillDetailSegmentGUIDArray" TYPE="OUTPUT">[Array MathVariable]</Parameter>
</Parameters>
</MathStatement>
XML Example
<MathStatement TYPE="ACTIVITYFUNCTION" FUNCTIONNAME="FindBillDetail">
<Parameters>
<Parameter NAME="StartDate" TYPE="INPUT">Activity:BillingStartDate</Parameter>
<Parameter NAME="EndDate" TYPE="INPUT">Activity:BillingEndDate</Parameter>
<Parameter NAME="BillGroupGUID" TYPE="INPUT">BillOwnerGUIDMV</Parameter>
<Parameter NAME="BillMinimumAmountThreshhold" TYPE="INPUT">Activity:ThreshholdMinimumAmount</Parameter>
<Parameter NAME="BillMaximumAmountThreshhold" TYPE="INPUT">Activity:ThreshholdMaximumAmount</Parameter>
<Parameter NAME="BillDetailArray" TYPE="OUTPUT">BillDetailArrayMV</Parameter>
<Parameter NAME="BillDetailPolicyGUIDArray" TYPE="OUTPUT">BillDetailPolicyGUIDArrayMV</Parameter>
<Parameter NAME="BillDetailClientGUIDArray" TYPE="OUTPUT">BillDetailClientGUIDArrayMV</Parameter>
<Parameter NAME="BillDetailSegmentGUIDArray" TYPE="OUTPUT">BillDetailSegmentGUIDArrayMV</Parameter>
</Parameters>
</MathStatement>
| TYPE=FindLastExchangeDatePricing | ||
|---|---|---|
| Element | Attribute | Definition |
|
<Math> |
||
|
<MathVariables> |
||
|
|
CLEARVALUE |
Value: Yes / No Default Value: No Optional: Yes: The value of the math variable will be deleted after the execution of all the Attached Rules at the end of activity processing and will not be visible on the Math tab in the Activity details screen. No: The value of the math variable will be retained after activity processing and will be displayed in the Math tab in the Activity details screen. |
|
<MathStatement> |
Math element executing predefined function code. |
|
|
TYPE |
ActivityFunction – Literal value only |
|
|
FUNCTIONNAME |
Name of Statement Function FindLastExchangeDatePricing Literal value only |
|
|
<Parameters> |
||
|
<Parameter> |
|
Date: Optional output of the guaranteed exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Defined output name. GuaranteedExchangeDate - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output OUTPUT |
|
|
<Parameter> |
|
Date: Optional output of the guaranteed gain/loss exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Defined output name. GainLossExchangeDate - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output OUTPUT
|
|
XML Schema
<MathStatement TYPE="ACTIVITYFUNCTION" FUNCTIONNAME="FindLastExchangeDatePricing">
<Parameters>
<Parameter NAME="GuaranteedExchangeDate" TYPE="OUTPUT">CurrencyExchangeDate</Parameter>
<Parameter NAME="GainLossExchangeDate" TYPE="OUTPUT">GainLossCurrencyExchangeDate</Parameter>
</Parameters>
</MathStatement>
| TYPE=FindNextExchangeDatePricing | ||
|---|---|---|
| Element | Attribute | Definition |
|
<Math> |
||
|
<MathVariables> |
||
|
CLEARVALUE |
Value: Yes / No Default Value: No Optional: Yes: The value of the math variable will be deleted after the execution of all the Attached Rules at the end of activity processing and will not be visible on the Math tab in the Activity details screen. No: The value of the math variable will be retained after activity processing and will be displayed in the Math tab in the Activity details screen. |
|
|
<MathStatement> |
Math element executing predefined function code. |
|
| TYPE |
ActivityFunction – Literal value only |
|
| FUNCTIONNAME |
Name of Statement Function FindNextExchangeDatePricing Literal value only |
|
|
<Parameters> |
||
|
<Parameter> |
|
Integer: Optional input of the offset. Predefined MathVariable Name |
|
NAME |
Defined input name. ExchangeDateOffset - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter> |
|
Date: Optional output of the guaranteed exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Defined output name. GuaranteedExchangeDate - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter> |
|
Date: Optional output of the guaranteed gail/loss exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Defined output name. GainLossExchangeDate - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter> |
|
Date: Optional output of the rates that exist. Predefined MathVariable Name |
|
NAME |
Defined output name. RatesExist - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
XML Schema
<MathStatement TYPE="ACTIVITYFUNCTION" FUNCTIONNAME="FindNextExchangeDatePricing">
<Parameters>
<Parameter NAME="ExchangeDateOffset" TYPE="INPUT">InputOffset</Parameter>
<Parameter NAME="GuaranteedExchangeDate" TYPE="OUTPUT">CurrencyExchangeDate</Parameter>
<Parameter NAME="GainLossExchangeDate" TYPE="OUTPUT">GainLossCurrencyExchangeDate</Parameter>
<Parameter NAME="RatesExist" TYPE="OUTPUT">RatesExist</Parameter>
</Parameters>
</MathStatement>
| TYPE=GetBenefitSplit | ||
|---|---|---|
| Element | Attribute | Definition |
|
<MathStatement> |
Opening element for the math variable. |
|
|
TYPE |
Required: Defines the math statement type. ACIVITYFUNCTION |
|
|
FUNCTIONNAME |
Required:Defines the function to run GetBenefitSplit |
|
|
<Parameters> |
Required:Opening element of the parameters. |
|
|
<Parameter> |
|
Required: Defines the parameters for the function |
|
NAME |
Required:Defines the parameter to assign the value. A math variable holding the related segment for the BenefitSplit record. SegmentGUID |
|
|
TYPE |
Required: Defines if the parameter is either input or output for the function. INPUT |
|
|
<Parameter> |
|
Optional: Defines the parameters for the function |
|
NAME |
Required:Defines the parameter to assign the value. A math variable holding the valuation effective date for AsNetAssetValue records. EffectiveDate |
|
|
TYPE |
Required:Defines if the parameter is either input or output for the function INPUT |
|
|
<Parameter> |
|
Optional: Defines the parameters for the function |
|
NAME |
Required: Defines the parameter to assign the value. A math variable or literal value indicating the BenefitSplit type code to retrieve. BenefitSplitTypeCode |
|
|
TYPE |
Required: Defines if the parameter is either input or output for the function. INPUT |
|
|
<Parameter> |
|
Optional: Defines the parameters for the function |
|
NAME |
Required: Defines the parameter to assign the value. A math variable holding either Yes or No, indicates if ABL is in effect and variable benefit is to be suppressed. ABLIndicator |
|
|
TYPE |
Required: Defines if the parameter is either input or output for the function INPUT |
|
|
<Parameter>
|
|
Optional: Defines the parameters for the function |
|
NAME |
Required:Defines the parameter to assign the value. An array of none or more benefit fund GUIDs to exclude from the calculated output. ExcludeFunds |
|
|
TYPE |
Required:Defines if the parameter is either input or output for the function INPUT |
|
|
<Parameter> |
|
Optional: Defines the parameters for the function |
|
|
NAME |
Required: Defines the parameter to assign the value. Gross Benefit amount in Plan default currency BenefitAmount |
|
|
TYPE |
Optional: Defines if the parameter is either input or output for the function OUTPUT |
|
<Parameter> |
|
Optional: Defines the parameters for the function |
|
|
NAME |
Required: Defines the parameter to assign the value. Collection of Parent Fund GUID and Benefit Allocation Amounts in decimal values (Highest level parent to the benefit fund). ParentFundAmountCollection |
|
|
TYPE |
Optional: Defines if the parameter is either input or output for the function OUTPUT |
XML Schema
<MathStatement TYPE=”ACTIVITYFUNCTION” FUNCTIONNAME="[GetBenefitSplit]">
<Parameters>
<Parameter NAME=”SegmentGUID” TYPE="INPUT">[MathVariable SegmentGUID]</Parameter>
<Parameter NAME=”EffectiveDate” TYPE="INPUT">[Date]</Parameter>
<Parameter NAME=”BenefitSplitTypeCode” TYPE="INPUT">[MathVariable Type Code]</Parameter>
<Parameter NAME=”ABLIndicator” TYPE="INPUT">[Yes|No]</Parameter>
<Parameter NAME=”ExcludeFunds” TYPE="INPUT">[Fund GUID Array]</Parameter>
<Parameter NAME=”BenefitAmount” TYPE="OUTPUT”>[MathVariable Numeric]</Parameter>
<Parameter NAME=”ParentFundAmountCollection” TYPE="OUTPUT”>[MathVariable Collection]</Parameter>
<Parameters>
</MathStatement>
| TYPE=GetFundPositions | ||
|---|---|---|
| Element | Attribute | Definition |
| <Math> | ||
|
<MathVariables> |
||
|
<MathStatement> |
Math element executing predefined function code. |
|
|
TYPE |
Activity Function– Literal value only |
|
|
FUNCTIONNAME |
Retrieves a policy’s parent fund guid that have fund values
GetFundPositions Literal value only |
|
|
<Parameters> |
||
|
<Parameter> |
|
Integer: Optional input of the offset. Predefined MathVariable Name Required. Defines the parameters for the function A math variable containing an array of valuation fund GUIDs. An empty array is acceptable. |
|
NAME |
Array of fund types that should not be included in the fund position determination
ExcludeFunds - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter> |
|
Date: Optional output of the guaranteed exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Collection of parent fund guids and values. ParentFundCollectionAmount - Literal value only |
|
|
TYPE |
Output Collection OUTPUT |
|
|
<Parameter> |
|
Date: Optional output of the guaranteed gail/loss exchange date for use in activity math. Predefined MathVariable Name |
|
NAME |
Defined output name. GainLossExchangeDate - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter> |
|
Date: Optional output of the rates that exist. Predefined MathVariable Name |
|
NAME |
Defined output name. RatesExist - Literal value only |
|
|
TYPE |
Function parameter type: Input/Output INPUT |
|
|
<Parameter>
|
|
Optional: Defines the parameters for the function. A math variable defining a collection. The function output is a collection of Parent Fund GUIDs and related percentages. |
| NAME |
Required: Defines the parameter to assign the value. “ParentFundPercentAmount ” |
|
| TYPE |
Optional: Defines if the parameter is either input or output for the function “OUTPUT” |
|
XML Schema
<MathStatement TYPE=”ACTIVITYFUNCTION” FUNCTIONNAME="GetFundPositions">
<Parameters>
<Parameter NAME=”ExcludeFunds” TYPE="INPUT">[MathVariable Array]</Parameter>
<Parameter NAME=”ExcludeFunds” TYPE="INPUT">FundTypeArray</Parameter>
<Parameter NAME=”ParentFundAmountCollection” TYPE="OUTPUT”>OutputCollection</Parameter>
<Parameter NAME=”ParentFundPercentCollection” TYPE="OUTPUT">[MathVariable Collection]</Parameter>
<Parameters>
</MathStatement>
| TYPE=MathValuation | ||
|---|---|---|
| Element | Attribute | Definition |
|
<Math> |
||
|
<MathVariables> |
||
|
<MathStatement>
|
|
Math element executing predefined function code. |
|
TYPE |
ActivityFunction Literal value only. |
|
|
FUNCTIONNAME |
Required: Name of Statement Function. MathValuation |
|
|
<Parameters> |
|
|
|
<Parameter> |
|
Required: Defines the date for valuation. A field or math variable containing a date. Must be a Date datatype. |
|
NAME |
Required: Defines the valuation date. ValuationDate Literal value only. |
|
|
TYPE |
Required: Function parameter type: Input/Output. INPUT |
|
|
<Parameter>
|
|
Required: Specifies whether the PolicyValues business rule will execute during the valuation process on each policy. A literal or a field or math variable containing a "Yes" or "No" text string. |
|
NAME |
Required: Defines the parameter to assign the value
PolicyValues Literal value only. |
|
|
TYPE |
Required: Function parameter type: Input/Output.
INPUT |
|
|
<Parameter> |
|
Required: No: Indicates the valuation is to be calculated with the exact prices as of the ValuationDate. Yes: valuation is to be calculated using the last known prices as of the ValuationDate. If this value is set to No and there are no prices for the specified valuation date, a business error is thrown indicating fund prices do not exist for the specified valuation date.
A literal or a field or math variable containing a "Yes" or "No" text string. |
|
NAME |
Required: Defines the parameter to assign the value NearestPrice Literal value only. |
|
|
TYPE |
Required: Function parameter type: Input/Output.
INPUT |
|
|
<Parameter> |
|
Optional: The ExactPriceDateUsed output parameter returns true or false to indicate whether the fund prices used to value the policy were as of the exact ValuationDates specified (true) or the nearest price dates (false). The NearestPrice parameter must be set to "Yes" to use this output. If NearestPrice is set to “No” the output value will always be ‘true’ when the activity processes.
A field or math variable containing a text value of "true" or "false". |
|
NAME |
Required: A math variable to hold the function output. ExactPriceDateUsed Literal value only. |
|
|
TYPE |
Optional:Function parameter type: Input/Output.
OUTPUT |
|
|
<Parameter> |
Optional: Defines the parameter to assign value. Yes: Financial entry calculations and math will need to be executed in PolicyValues BR. IsValueFinancialEntry context value will be assigned a value as Yes.
No: No financial entry calculation in PolicyValues IsValueFinancialEntry will have value No .
Default Value ="No" |
|
|
NAME |
Required: Assign Values for Parameter Literal Value or Field Value or MathVaraible.
ValueFinancialEntry |
|
|
TYPE |
Required: Function parameter type.
INPUT |
|
XML Schema
<MathStatement TYPE=”ACTIVITYFUNCTION” FUNCTIONNAME="MathValuation">
<Parameters>
<Parameter NAME=”ValuationDate” TYPE="INPUT">MyValuationDate</Parameter>
<Parameter NAME=”PolicyValues” TYPE="INPUT">Yes</Parameter>
<Parameter NAME=”NearestPrice” TYPE="INPUT">Yes</Parameter>
<Parameter NAME=”ExactPriceDateUsed” TYPE="OUTPUT">ExactPriceDateUsedMV</Parameter>
<Parameter NAME=”ValueFinancialEntry” TYPE="INPUT">Yes|No| OR MathVariable or Field with Values(Yes|No)</Parameter></Parameters>
</MathStatement>