Development Guides

Reporting Scope – Performance/Allocation/Activity Summary – Exhaustive

Purpose: This documentation is for v1/Reporting/Scope from the Orion Connect API. Scope gives callers the incredible flexibility of RB3 with a purely data return. It allows you to mix and match numerous Calculation Objects to get exactly the data you are after without needing to hit multiple endpoints and merge the data together in the client. To use it is a 2 step process; 1) Establish a Scope, 2) Define Calculations.

NOTE: Since it is designed to be purely a data return it has no control over formatting. This includes rounding and formatting of currency values like RB3 does.

Simple Use Case: Firm wants to generate the same data available on their quarterly report to then pull that data into a data warehouse for firm level reporting.

Establish a Scope

POST v1/Reporting/Scope
{
   "entity":"Household",
   "entityIds":[ 1, 2, 3 ],
   "asOfDate":"2020-06-30"
}
entity / entityIds (required)

These properties define what we are calculating for. In the call above scope is being established for households 1, 2, and 3. When multiple entityIds are provided the calculation will reflect aggregating them together into a single unit unless the Calculation Objects tell us to split them up in some way. The endpoint supports many options for entity but commonly calls will use “Representative”, “Household”, “Registration”, “Account”, or “Portfolio Group”. This is not a full list of what is supported.

asOfDate (optional)

Scope supports historical reporting so the asOfDate defines what it should consider to be the “today”. Only data on and before this date will be included. Data after this date is considered to be the future and will be ignored. If no asOfDate is provided it will assume today and you will see this in the response.

clientPerformanceInclude (optional)

This defines what ReportAcctInclusionOption to use. The options are:
Default – Use the default database settings to determine which accounts will be included.
All Accounts – All accounts regardless of value or IsActive will be included.
Active Accounts – Only accounts currently marked IsActive = 1
Accounts with value – Only accounts where ActiveOnly = 1 AND they had a value on the performance EndDate
Active registrations – Only accounts that are in registrations which contain an active account
Registrations with value – Only accounts that are in registrations that had a value on the performance EndDate

If this is omitted or set to Default the value will be pulled from the database level entity option “Household Performance Include”

unmanagedInclusionOverride (optional)

This allows the caller to override the unmanagedInclusionOverride on all entities included in this call to use what is specified instead. When omitted no adjustment away from the norm is made.

accountManagementOverrides (optional)

This allows you to specify specific accounts. For each account you can specify if it’s should be treated as managed or unmanaged. You can also choose to exclude it from the calculation entirely. Setting it to "isIncluded": false would make the system treat the account like it doesn’t exist.

Sample Object

{
   "id": 0,
   "isManaged": true,
   "isIncluded": true
}
calculations (optional)

If provided the calculations specified will be computed in the response. See Define Calculations below for more detail on how calculation objects work.

Define Calculations

General info for all Calculation Objects

In the scope object and in some Calculation Objects you will find calculations: [] which takes an array of Calculation Objects. See Calculation Objects for complete detail.

ReturnStyle

ReturnStyle is how you describe how a time series should divide a date range into sub-intervals. It allows you to set the size of each interval. It also allows you to determine if the intervals should roll forward from the start date, backward from the end date, or lock into the calendar. It even lets you determine if you want these intervals to grow from the start date or leap frog through time.

frequency(required)
"returnStyle": { 
   "frequency": "Automatic"
}

This property is used to determine the size of interal to be used:
Summary – one interval for the whole range
Daily – each interval is one day long
Weekly – each interval is 7 days or less long
Monthly – each interval is a month long
Quarterly – each interval is 3 months long
Annually – each interval is 12 months long
Automatic – the interval will be automatically selected from one of the above in an attempt to get about 2000 intervals for however long the date range is. Examples:

  • If the date range is from 2000-01-01 to 2000-12-31 it would choose daily.
  • If the date range is from 2000-01-01 to 2010-12-31 it would choose weekly.
  • If the date range is from 2000-01-01 to 2020-12-31 it would choose monthly.
basedOn (required)
"returnStyle": { 
   "basedOn": "Calendar"
}

This property determines how the intervals are created:
Calendar – Attempt to lock into the calendar. Monthly intervals will be from the start to end of the calendar months. Same with years. This can result in intervals that are not very uniform in length. For example if the date range is 2020-02-28 to 2020-04-02 there will be 3 intervals created: 2020-02-28 to 2020-02-29, 2020-03-01 to 2020-03-31, and 2020-04-01 to 2020-04-02.
RollingForward – Intervals will start from the start date and roll forward. For example if the date range is 2020-02-28 to 2020-04-02 and we are creating monthly intervals there will be 2 intervals created: 2020-02-28 to 2020-03-27, and 2020-03-28 to 2020-04-02.
RollingBackward – Intervals will start from the end date and roll backward. For example if the date range is 2020-02-28 to 2020-04-02 and we are creating monthly intervals there will be 2 intervals created: 2020-02-28 to 2020-03-02, and 2020-03-03 to 2020-04-02.

breakBehavior (required)
"returnStyle": { 
   "breakBehavior": "AllowPartialPeriods"
}

This determines if we should throw out any partial periods or keep them. Using the example for monthly calendar periods from 2020-02-28 to 2020-04-02:
AllowPartialPeriods – 3 intervals created: 2020-02-28 to 2020-02-29, 2020-03-01 to 2020-03-31, and 2020-04-01 to 2020-04-02
FullPeriodsOnly – 1 interval created: 2020-03-01 to 2020-03-31

cumulative (required)
"returnStyle": { 
   "cumulative": true
}

This controls if the intervals created grow or leap frog each other. The examples here will assume monthly intervals for the date range 2020-01-01 to 2020-03-31
true – 4 intervals are created: 2020-01-01 to 2020-01-01, 2020-01-01 to 2020-01-31, 2020-01-01 to 2020-02-29, and 2020-01-01 to 2020-03-31. This is good when the result is going to be put into a line chart or some other form of graphic where a rolling total through time is needed.
false – 3 intervals are created: 2020-01-01 to 2020-01-31, 2020-02-01 to 2020-02-29, and 2020-03-01 to 2020-03-31. This is good when the result is going into a detail view that shows each interval as a stand alone segment in time.

context (required)
"returnStyle": { 
   "context": "Self"
}

This controls if the inception date used is that of the group in context or its parent.
Self – This ensures we don’t show intervals before this group was incepted. Works well if the group is being shown on its own and not in the same chart as it’s sibling groups.
Parent – This is useful when you are getting intervals for a subgroup of a parent and putting them together in one chart. It ensures the intervals line up with each other even if the individual subgroups have different inception dates.

Calculation Objects

General info for all Calculation Objects

Every calculation object will have this general structure:

{
   "$type": "kind-of-calulation-object",
   "id": "any string",
   "contextChange": {}
}
$type (required)

This is how the system knows what kind of calculation object is being used.

id (optional)

This is used to help the calling client track the numerous calculation objects that were provided. The response for each object will include the id of the calculation object it came from. If this is omitted it will be omitted in the response.

contextChange (optional)

ContextChange is how you change the options that are being used by the current Calculation Object and its children. See ContextChange for complete detail.

Patterns to be aware of

calculations (optional)

Some calculation objects act as containers for additional calculations. In these cases any calculation object is allowed in that calculation including itself both directly and indirectly.

returnStyle (optional)

Calculation objects that return a series of data through time will take the returnStyle object to determine how the date range is broken down into multiple intervals. See ReturnStyle for complete detail.


Grouping Calculation

This will partition the current context into the grouping provided returning 1 or more child objects. It can be nested within itself to allow further levels of grouping each with additional calculations.

grouping (required)

This is how we will partition parent to create 1 or more child groups. The available options are:
“Self”
“BrokerDealer”
“Wholesaler”
“Representative”
“Household”
“Registration”
“Account”
“Asset”
“Product”
“Fund Family”
“Management Style”
“Custodian”
“Aggregate Model”
“Asset Class”
“Asset Level Strategy”
“Asset Category”
“Risk Category”
“Account Type”
“Registration Tax Type”
“Product Type”
“Alternative Product Region”
“Alternative Product Property Type”
“Alternative Product Manager”
“Asset Category Parent”
“Portfolio Group”
“State/Federal Taxability”
“Qualified”
“Tax ID”
“Bond State”
“Product Taxability”
“Target Allocation”
“Moody Rating”
“S&P Rating”
“Bond Maturity Year”
“Interest Rate”
“Maturity Period”

calculations (optional)

This is an array of Calculation Objects. They are calculations to perform for each grouping.

Sample Request

{
   "$type": "grouping",
   "grouping":"Account",
   "calculations": []
}

Sample Response

{
  "$type": "calculated-list",
  "calculations": [
    {
      "$type": "calculated-group",
      "groupId": 3,
      "grouping": "Account",
      "groupEntityId": 167,
      "groupEntityIdPath": null,
      "name": "JJ Watt IRA",
      "inceptionDate": "2013-06-20",
      "calculations": []
    },
    {
      "$type": "calculated-group",
      "groupId": 4,
      "grouping": "Account",
      "groupEntityId": 168,
      "groupEntityIdPath": null,
      "name": "Tiffany Watt 401k",
      "inceptionDate": "2013-06-20",
      "calculations": []
    }
  ]
}

Activity Calculation

This returns a single activity value.

Sample Request

{
   "$type": "activity"
}

Sample Response

{
  "$type": "calculated-activity",
  "value": 1699803.71,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20"
}

Activity Series Calculation

This is good for gathering data for many dates in a date range like you would need for a line chart.

Sample Request

{
   "$type": "activity-series",
   "returnStyle": {}
}

Sample Response

{
  "$type": "calculated-activity-series",
  "series": [
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-19",
      "value": 1699803.71
    },
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-20",
      "value": 1699803.71
    }
  ]
}

Benchmark Performance Calculation

This returns a single benchmark performance value. This will only work in a comparison grouping.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

Sample Request

{
   "$type": "benchmark-performance"
}

Sample Response

{
  "$type": "calculated-benchmark-performance",
  "calculatedPerformanceOptionId": 17,
  "performance": 0,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20"
}

Activity Transactions Calculation

This returns the transactions for the given date range. Each transaction includes transaction-level information, such as Transaction Date, Settle Date, Units, and Price.

Sample Request
{
   "$type": "activity-transactions"
}
Sample Response
{
  "$type": "calculated-activity-transactions",
  "transactions": [
	{
	  "startDate": "2022-01-20",
	  "endDate": "2022-01-20",
	  "transactionId": 123456789,
	  "assetId": 1111,
	  "value": -10.23,
	  "transactionDate": "2022-01-20",
	  "settleDate": "2022-01-22",
	  "price": 55.211,
	  "units": 1,
	  "contributionCode": null,
	  "distributionCode": null,
	  "transactionType": "Sell Exchange",
	  "transactionSubType": null,
	  "advisorNotes": null,
	  "notes": "NOTES",
	  "formattedUnits": "1.00",
	  "formattedPrice": "$55.21",
	  "formattedValue": "-$10.23"
	}
  ]
}

Benchmark Performance Series Calculation

This is good for gathering data for many dates in a date range like you would need for a line chart. This will only work in a comparison grouping.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

Sample Request

{
   "$type": "benchmark-performance-series",
   "returnStyle": {}
}

Sample Response

{
  "$type": "calculated-benchmark-performance-series",
  "calculatedPerformanceOptionId": 1,
  "series": [
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-19",
      "performance": 0
    },
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-20",
      "performance": 0
    }
  ]
}

Cost Basis Calculation

This returns an aggregate of all cost basis lots including the number of lots, cost basis, amortization, gain, loss, gain/loss, gain/loss percent, includes unknown cost basis flag, adjusted cost, and short/long flag.

Sample Request

{
   "$type": "cost-basis"
}

Sample Response

{
  "$type": "calculated-cost-basis",
  "calculatedCostBasisOptionId": null,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20",
  "numberOfLots": 137,
  "costBasis": 1967233.7,
  "amortization": 0,
  "gain": 162300.59,
  "loss": -275206.86,
  "gainLoss": -112906.27,
  "gainLossPercentNumerator": null,
  "gainLossPercentDenominator": null,
  "includesUnknownCostBasis": true,
  "lotsBeingSuppressed": false,
  "isShort": true,
  "minAcquiredDate": null,
  "maxAcquiredDate": null,
  "adjustedCost": 1967233.7,
  "gainLossPercent": null
}

Short Term Cost Basis Calculation

This returns an aggregate of all short term cost basis lots including the number of lots, cost basis, amortization, gain, loss, gain/loss, gain/loss percent, includes unknown cost basis flag, adjusted cost, and short/long flag.

Sample Request

{
   "$type": "shortterm-cost-basis"
}

Sample Response

{
  "$type": "calculated-cost-basis",
  "calculatedCostBasisOptionId": null,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20",
  "numberOfLots": 137,
  "costBasis": 1967233.7,
  "amortization": 0,
  "gain": 162300.59,
  "loss": -275206.86,
  "gainLoss": -112906.27,
  "gainLossPercentNumerator": null,
  "gainLossPercentDenominator": null,
  "includesUnknownCostBasis": true,
  "lotsBeingSuppressed": false,
  "isShort": true,
  "minAcquiredDate": null,
  "maxAcquiredDate": null,
  "adjustedCost": 1967233.7,
  "gainLossPercent": null
}

Long Term Cost Basis Calculation

This returns an aggregate of all long term cost basis lots including the number of lots, cost basis, amortization, gain, loss, gain/loss, gain/loss percent, includes unknown cost basis flag, adjusted cost, and short/long flag.

Sample Request

{
   "$type": "longterm-cost-basis"
}

Sample Response

{
  "$type": "calculated-cost-basis",
  "calculatedCostBasisOptionId": null,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20",
  "numberOfLots": 137,
  "costBasis": 1967233.7,
  "amortization": 0,
  "gain": 162300.59,
  "loss": -275206.86,
  "gainLoss": -112906.27,
  "gainLossPercentNumerator": null,
  "gainLossPercentDenominator": null,
  "includesUnknownCostBasis": true,
  "lotsBeingSuppressed": false,
  "isShort": true,
  "minAcquiredDate": null,
  "maxAcquiredDate": null,
  "adjustedCost": 1967233.7,
  "gainLossPercent": null
}

Cost Basis Lots Calculation

This returns the actual cost basis lots including the number of units, acquired date, sell date, amortization, etc. of each individual lot.

Sample Request

{
   "$type": "cost-basis-lots"
}

Sample Response

{
  "type": "calculated-cost-basis-lots",
  "calculatedCostBasisOptionId": -2147483648,
  "lots": [
    {
      "$type": "costbasis-lot",
      "assetId": 1234,
      "transactionId": 0,
      "sellDate": "2020-10-31",
      "acquiredDate": "2020-01-01",
      "isLongTerm": false,
      "description": "",
      "units": 75,
      "transAmount": -8164.5,
      "costBasis": 9000,
      "amortization": 0,
      "gain": null,
      "loss": -835.5,
      "gainLoss": -835.5,
      "gainLossPercentNumerator": -835.5,
      "gainLossPercentDenominator": 9000,
      "isSellingWash": false,
      "isShort": false,
      "costBasisMethod": "",
      "costBasisPerUnit": 120,
      "isReturnOfCapital": false,
      "isUnknownCostBasis": false,
      "transTypeIdOfBuy": 10,
      "navOfBuy": 120,
      "storedSource": "Orion",
      "gainLossPercent": -0.09283333333333334,
      "proceeds": 8164.5,
      "adjustedCost": 9000,
      "salesPrice": 108.86,
      "startDate": "2020-10-01",
      "endDate": "2020-10-31"
    }
  ]
}

Estimated Annual Income Calculation

This returns the rate, last rate, and estimated annual income.

Sample Request

{
   "$type": "estimated-annual-income"
}

Sample Response

{
  "$type": "calculated-estimated-annual-income",
  "rate": 0.0235874029487179,
  "lastRate": 0.0235874029487179,
  "estimatedAnnualIncome": 62682.3371,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20"
}

Group Information Calculation

This is used to return an attribute of the group, like the Representative Name, Account Number, etc.

Sample Request

{
   "$type": "group-info",
   "entity": "Undefined",
   "property": "Name"
}

Sample Response

{
  "$type": "calculated-group-info",
  "entity": "Undefined",
  "property": "Name",
  "value": "JJ Watt"
}

This calculation object can also be used to retrieve the value of user defined fields and entity options:

Sample Request for User Defined Fields

{
   "$type": "group-info",
   "entity": "Client",
   "property": "UDF:5TEST"
}

Just set the property to UDF:{code} where `{code} is the code of the user defined field you want to retrieve for the entity level specified (Client in this example).

Sample Request for Entity Option

{
   "$type": "group-info",
   "entity": "Client",
   "property": "EO:69ECLIPSEE"
}

Just set the property to EO:{code} where `{code} is the code of the entity option you want to retrieve for the entity level specified (Client in this example). In the example above the code “69ECLIPSEE” is for the entity option “Eclipse Enabled”.


Performance Breakdown Calculation

This is used to get supporting information to explain how a performance calculation came up with the result it got.
Note: factor is the performance value in factor form. If you see 1.0123 that would be the same as 1.23%.

Sample Request

{
   "$type": "performance-breakdown",
   "returnStyle": {}
}

Sample Response

{
  "$type": "calculated-performance-breakdown",
  "calculatedPerformanceOptionId": 0,
  "series": [
    {
      "$type": "performance-breakdown-simple",
      "positiveCashFlow": 0,
      "startValue": 1699803.71,
      "valueChange": 0,
      "cashFlowAmount": null,
      "feeAmount": 0,
      "startAccruedInt": 0,
      "accruedIntChange": 0,
      "accruedDividend": null,
      "dividendChange": 0,
      "taxValueChange": null,
      "factor": null,
      "startDate": "2020-09-20",
      "endDate": "2020-09-20"
    }
  ]
}

Performance Calculation

This is used to get a single performance value.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

Sample Request

{
   "$type": "performance"
}

Sample Response

{
  "$type": "calculated-performance",
  "calculatedPerformanceOptionId": 17,
  "performance": 0.005,
  "startDate": "2020-09-20",
  "endDate": "2020-09-20"
}

Performance Series Calculation

This is good for gathering data for many dates in a date range like you would need for a line chart.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

Sample Request

{
   "$type": "performance-series",
   "returnStyle": {}
}

Sample Response

{
  "$type": "calculated-performance-series",
  "calculatedPerformanceOptionId": 1,
  "series": [
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-19",
      "performance": 0.003
    },
    {
      "startDate": "2020-09-19",
      "endDate": "2020-09-20",
      "performance": 0.008015
    }
  ]
}

Statistic Calculation (Group)

This is used to get a single statistical value for the group in context.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

statisticType (optional)

This is the kind of calculation to be performed. If not provided Standard Deviation is the default.
“Standard Deviation”
“Mean”
“Variance”
“Drawdown”
“Sharpe Ratio”
“Sortino Ratio”
“Covariance”
“R-Squared”
“Beta Coefficient”
“Treynor Ratio”
“Jensen’s Alpha”
“Upside Capture Ratio”
“Downside Capture Ratio”

Sample Request

{
   "$type": "group-statistic",
   "statisticType": "Standard Deviation"
}

Sample Response

{
  "$type": "calculated-statistic",
  "calculatedPerformanceOptionId": 17,
  "value": 0.013,
  "startDate": "2020-01-01",
  "endDate": "2020-09-20",
  "statisticType": "Standard Deviation"
}

Statistic Calculation (Benchmark)

This is used to get a single statistical value for the group in context.
Note: the performance value is in decimal form so if you see .0123 that would be 1.23%.

statisticType (optional)

This is the kind of calculation to be performed. If not provided Standard Deviation is the default.
“Standard Deviation”
“Mean”
“Variance”
“Drawdown”
“Sharpe Ratio”
“Sortino Ratio”
“Covariance”
“R-Squared”
“Beta Coefficient”
“Treynor Ratio”
“Jensen’s Alpha”
“Upside Capture Ratio”
“Downside Capture Ratio”

Sample Request

{
   "$type": "benchmark-statistic",
   "statisticType": "Standard Deviation"
}

Sample Response

{
  "$type": "calculated-benchmark-statistic",
  "calculatedPerformanceOptionId": 17,
  "value": 0.013,
  "startDate": "2020-01-01",
  "endDate": "2020-09-20",
  "statisticType": "Standard Deviation"
}

Projected Income Calculation

This is used to get a year of projected income data (either current year or the next 12 months) for the group in context.

grouping2 (optional)

This is the kind of grouping that will be done to roll up the projected income calculation. Default is “Product”.

projectedIncomeOption (optional)

In order to change the projected report periods, the projected income option in the optional context change object (contextChange) must be added with the report year property (reportYear) assigned the appropriate value.

Report Year Values
  • Current Year: “Current”
  • Next 12 Months: “NextTwelveMonths”
  • Next 60 Months: “NextSixtyMonths”
  • Next 5 Years: “NextFiveYears”

Sample Request

{
    "$type": "projected-income",
    "grouping2": "Product",
    "contextChange": {
        "projectedIncomeOption": {
            "$type": "projected-income",
            "reportYear": "Current"
        }
    }
}

Sample Response

{
  "$type": "calculated-projected-income",
  "details": [
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "01",
      "reportYear": "2020",
      "columnName": "Jan",
      "columnOrder": 1,
      "projectedIncome": 28027.64,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "02",
      "reportYear": "2020",
      "columnName": "Feb",
      "columnOrder": 2,
      "projectedIncome": 37506.04,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "03",
      "reportYear": "2020",
      "columnName": "Mar",
      "columnOrder": 3,
      "projectedIncome": 56160.92,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "04",
      "reportYear": "2020",
      "columnName": "Apr",
      "columnOrder": 4,
      "projectedIncome": 22698.84,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "05",
      "reportYear": "2020",
      "columnName": "May",
      "columnOrder": 5,
      "projectedIncome": 15015.96,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "06",
      "reportYear": "2020",
      "columnName": "June",
      "columnOrder": 6,
      "projectedIncome": 67598.84,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "07",
      "reportYear": "2020",
      "columnName": "July",
      "columnOrder": 7,
      "projectedIncome": 28027.64,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "08",
      "reportYear": "2020",
      "columnName": "Aug",
      "columnOrder": 8,
      "projectedIncome": 37506.04,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "09",
      "reportYear": "2020",
      "columnName": "Sept",
      "columnOrder": 9,
      "projectedIncome": 56160.92,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "10",
      "reportYear": "2020",
      "columnName": "Oct",
      "columnOrder": 10,
      "projectedIncome": 20546.79,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "11",
      "reportYear": "2020",
      "columnName": "Nov",
      "columnOrder": 11,
      "projectedIncome": 14640.96,
      "projectedIncomeFormatOption": "Normal"
    },
    {
      "$type": "projected-income-interval-detail",
      "reportMonth": "12",
      "reportYear": "2020",
      "columnName": "Dec",
      "columnOrder": 12,
      "projectedIncome": 79153.72,
      "projectedIncomeFormatOption": "Normal"
    }
  ],
  "startDate": "2020-03-31",
  "endDate": "2020-03-31"
}

In the 'projected-income-interval-detail' object above the property projectedIncomeFormatOption can have the following values:

  • Normal
  • Unpaid Projected
  • Projected

ContextChange

ContextChange is how you change the options that are being used by the current Calculation Object and its children. Options are used to articulate what date range, performance options, activity options, etc are used.

reportCategoryId (optional)

"contextChange": { 
   "reportCategoryId ": 1
}

The reportCategoryId determines if and how managed/unmanaged assets are included. The choices are listed below but for information see Unmanaged Assets, Products, and Accounts.
All (0) – show everything without looking at the managaged/unmanaged settings
Managed Performance (1) – only what’s managed for Performance
Managed Activity Summary (2) – only what’s managed for Activity Summary
Managed Allocation (4) – only what’s managed for Allocation
Managed Portfolio Detail (8) – only what’s managed for Portfolio Detail
Managed Tax Detail (16) – only what’s managed for Tax Detail
Unmanaged Performance (-1) – only what’s unmanaged for Performance
Unmanaged Activity Summary (-2) – only what’s unmanaged for Activity Summary
Unmanaged Allocation (-4) – only what’s unmanaged for Allocation
Unmanaged Portfolio Detail (-8) – only what’s unmanaged for Portfolio Detail
Unmanaged Tax Detail (-16) – only what’s unmanaged for Tax Detail

quickDate (optional)

"contextChange": { 
   "quickDate": "One Year"
}

Do not use when dateRange is specified. QuickDate allows you to easily set the date range option to one of the following common options. The Scope’s AsOfDate is used when calculating these. All examples below assume "AsOfDate":"2006-06-24".
Day – AsOfDate to AsOfDate (ex: “2006-06-24” to “2006-06-24”)
WTD – week to date
MTD – month to date (ex: “2006-06-01” to “2006-06-24”)
QTD – quarter to date (ex: “2006-04-01” to “2006-06-24”)
YTD – year to date (ex: “2006-01-01” to “2006-06-24”)
One Year – From date back one year (ex: “2005-06-25” to “2006-06-24”)
Two Year – From date back two years (ex: “2004-06-25” to “2005-06-24”)
Three Year – From date back three years
Four Year – From date back four years
Five Year – From date back five years
Six Year – From date back six years
Seven Year – From date back seven years
Eight Year – From date back eight years
Nine Year – From date back nine years
Ten Year – From date back ten years
Previous 1-Year – full calendar year last year (ex: “2005-01-01” to “2005-12-31”)
Previous 2-Year – full calendar year two years ago (ex: “2004-01-01” to “2004-12-31”)
Previous 3-Year – full calendar year three years ago
Previous 4-Year – full calendar year four years ago
Previous 5-Year – full calendar year five years ago
Previous 6-Year – full calendar year six years ago
Previous 7-Year – full calendar year seven years ago
Previous 8-Year – full calendar year eight years ago
Previous 9-Year – full calendar year nine years ago
Previous 10-Year – full calendar year ten years ago
Inception – from the date of the first holding or historically provided data to AsOfDate.
Holding Period – from the first day of continuous holding before AsOfDate to AsOfDate.

dateRange (optional)

"contextChange": { 
   "dateRange": {
      "$type": "date-range",
      "startDate": "2020-02-15",
      "endDate": "2020-03-09",
      "dataMustExistOnRangeStartDate": false,
      "dataMustExistOnRangeEndDate": false,
      "startDateMethod": "Inception"
   }
}

Do not use when quickDate is specified. DateRange allows you to setup a new DateRange option with access to all the settings it has.

At the scope level the DateRangeOption is automatically setup with StartDate and EndDate set to the Scope’s AsOfDate.

$type (required)

Set to 'date-range' to have access to the options here.

startDate / startDateExpression (optional)

One or the other should be provided. If neither is provided the system will use the StartDateMethod to determine if this is inception or holding period. StartDate is a specific date that will be used exactly as provided. StartDateExpression is a date expression that will calculate the date to use based on the Scope’s AsOfDate.

endDate / endDateExpression (optional)

One or the other should be provided. If neither is provided the system will use the Scope’s AsOfDate. EndDate is a specific date that will be used exactly as provided. EndDateExpression is a date expression that will calculate the date to use based on the Scope’s AsOfDate.

dataMustExistOnRangeStartDate (optional)

Defaults to false. When set to true some calculations will return null if the group did not have data on the start date provided.

dataMustExistOnRangeEndDate (optional)

Defaults to false. When set to true some calculations will return null if the group did not have data on the end date provided.

startDateMethod (optional)

Defaults to “Inception”. Available options are:
Inception – from the date of the first holding or historically provided data to AsOfDate.
Holding Period – from the first day of continuous holding before AsOfDate to AsOfDate.

performanceOption (optional)

"contextChange": { 
   "performanceOption": { 
      "$type":"performance",
      "calculationMethod":"TWR",
      "calcGrossOfFees": false
   }
}

At the scope level the PerformanceOption is automatically setup using the numerous database level defaults.

name (optional)

Uses current PerformanceOption name if not provided. This is just a name for this option to help distinguish it from other options.

calculationMethod (optional)

Uses current PerformanceOption calculationMethod if not provided. Available options are “TWR”, “Simple”, and “IRR”.

includeAccruedInterest (optional)

Uses current PerformanceOption includeAccruedInterest if not provided.

calcGrossOfFees (optional)

Uses current PerformanceOption calcGrossOfFees if not provided.

calcFirstDayPerformance (optional)

Uses current PerformanceOption calcFirstDayPerformance if not provided.

calcIntraDayPerformance (optional)

Uses current PerformanceOption calcIntraDayPerformance if not provided.

annualize (optional)

Uses current PerformanceOption annualize if not provided.

annualizeIncludeDaysWithoutValue (optional)

Uses current PerformanceOption annualizeIncludeDaysWithoutValue if not provided.

flipSignForShort (optional)

Uses current PerformanceOption flipSignForShort if not provided.

suppressMixedRanges (optional)

Uses current PerformanceOption suppressMixedRanges if not provided.

suppressMixedAssetLevelGroups (optional)

Uses current PerformanceOption suppressMixedAssetLevelGroups if not provided.

calcAfterTax (optional)

Uses current PerformanceOption calcAfterTax if not provided.

activityOption (optional)

activity

"contextChange": { 
   "activityOption": { 
      "$type":"activity",
      "details": [
         {
            "$type":"valuation",
            "isManaged":true,
            "flipSign":false,
            "valuationMethod":"Ending Market Value"
         },{
            "$type":"valuation",
            "isManaged":true,
            "flipSign":true,
            "valuationMethod":"Beginning Market Value"
         },{
            "$type":"activity",
            "isManaged":true,
            "flipSign":true,
            "activityType":"Contributions"
         },{
            "$type":"activity",
            "isManaged":true,
            "flipSign":true,
            "activityType":"Distributions"
         },{
            "$type":"transaction",
            "isManaged":true,
            "flipSign":true,
            "transTypeId":1234,
            "inclusionOption":"All"
         },{
            "$type":"transaction",
            "isManaged":true,
            "flipSign":true,
            "transTypeId":4567,
            "inclusionOption":"Positive Only"
         }
      ]
   }
}

This version of ActivityOption is the most robust. It allows all the settings that are available. It’s also the most difficult to use.

name (optional)

Uses current ActivityOption name if not provided. This is just a name for this option to help distinguish it from other options.

inceptionValueMethod (optional)

Uses current ActivityOption inception value method if not provided. This determines how inception value should be calculated. The options are:
New Money – Ensures the market value on inception is never zero by including contributions and merge ins on the inception day in the value.
Zero – Ensures the market value on inception is always zero by treating the market value on inception like it is a merge in transaction.
Day After – Instead of reporting the beginning day market value on inception the end of day inception value is returned instead.

details (required)

Determines which valuation methods, activity types, and/or transaction types to include in the calculation.

Valuation Detail

"contextChange": { 
   "activityOption": { 
      "$type":"activity",
      "details": [
         {
            "$type":"valuation",
            "isManaged":true,
            "flipSign":false,
            "valuationMethod":"Ending Market Value"
         }
      ]
   }
}
isManaged (required)

Determines if the value to aggregate is coming from the managed or unmanaged part of the group. In most cases this should be set true so managed value included and unmanaged values are excluded.

flipSign (required)

When true the result is multiplied by -1 to flip the sign when aggregating these values. In most cases this should be set to false so the sign is not flipped.

valuationMethod (required)

Uses current ActivityOption valuationMethod if not provided. Available options are:
Beginning Market Value – The market value at the beginning of day on the start date.
Beginning Bond Accrual – The bond accrual value at the beginning of day on the start date.
Ending Market Value – The market value at the end of day on the end date.
Ending Bond Accrual – The bond accrual value at the end of day on the end date.

Activity Type Detail

"contextChange": { 
   "activityOption": { 
      "$type":"activity",
      "details": [
         {
            "$type":"activity",
            "isManaged":true,
            "flipSign":false,
            "activityType":"Contributions"
         }
      ]
   }
}
isManaged (required)

Determines if the value to aggregate is coming from the managed or unmanaged part of the group. In most cases this should be set true so managed value included and unmanaged values are excluded.

flipSign (required)

When true the result is multiplied by -1 to flip the sign when aggregating these values. In most cases this should be set to false so the sign is not flipped.

activityTypes (required)

The list of activity types to include in the calculation. The options are:
Contributions
Distributions
Net Dividends/Interest/Gains Withdrawn
Miscellaneous Charges
Advisory Fees Paid
Dividends and Interest
Dividend Interest Reinvested
Exchange In
Exchange Out
Merge In
Merge Out
Journal In
Journal Out

Transaction Type Detail

"contextChange": { 
   "activityOption": { 
      "$type":"activity",
      "details": [
         {
            "$type":"transaction",
            "isManaged":true,
            "flipSign":true,
            "transTypeId":1234,
            "inclusionOption":"Positive Only"
         }
      ]
   }
}
isManaged (required)

Determines if the value to aggregate is coming from the managed or unmanaged part of the group. In most cases this should be set true so managed value included and unmanaged values are excluded.

flipSign (required)

When true the result is multiplied by -1 to flip the sign when aggregating these values. In most cases this should be set to false so the sign is not flipped.

transTypeId (required)

Determines which kinds of transaction to include based on the transaction type. Transaction types vary from firm to firm so a list cannot be provided here.

inclusionOption (required)

Determines which kinds of transaction to include based on the value of the transaction. The options are:
Positive Only – only transactions with a value greater than zero will be included in the aggregate
Negative Only – only transactions with a value less than zero will be included in the aggregate
All – The value of the transaction will not exclude it from being included in the calculation

market-value

"contextChange": { 
   "activityOption": { 
      "$type":"market-value",
      "valuationMethod":"Beginning Market Value",
      "includeAccruedInterest":true
   }
}

This version of ActivityOption makes getting valuation calculations much easier.

name (optional)

Uses current ActivityOption name if not provided. This is just a name for this option to help distinguish it from other options.

valuationMethod (required)

Uses current ActivityOption valuationMethod if not provided. Available options are:
Beginning Market Value – The market value at the beginning of day on the start date.
Beginning Bond Accrual – The bond accrual value at the beginning of day on the start date.
Ending Market Value – The market value at the end of day on the end date.
Ending Bond Accrual – The bond accrual value at the end of day on the end date.

includeAccruedInterest (optional)

Uses current PerformanceOption includeAccruedInterest if not provided.

inceptionValueMethod (optional)

Uses current ActivityOption inception value method if not provided. This determines how inception value should be calculated. The options are:
New Money – Ensures the market value on inception is never zero by including contributions and merge ins on the inception day in the value.
Zero – Ensures the market value on inception is always zero by treating the market value on inception like it is a merge in transaction.
Day After – Instead of reporting the beginning day market value on inception the end of day inception value is returned instead.

activity-type

"contextChange": { 
   "activityOption": { 
      "$type":"activity-type"
      "includeAccruedInterest": false,
      "activityTypes": ["Exchange In", "Exchange Out"]
   }
}

This version of ActivityOption makes it easier to get transactional aggregates based on activity type.

name (optional)

Uses current ActivityOption name if not provided. This is just a name for this option to help distinguish it from other options.

inceptionValueMethod (optional)

Uses current ActivityOption inception value method if not provided. This determines how inception value should be calculated. The options are:
New Money – Ensures the market value on inception is never zero by including contributions and merge ins on the inception day in the value.
Zero – Ensures the market value on inception is always zero by treating the market value on inception like it is a merge in transaction.
Day After – Instead of reporting the beginning day market value on inception the end of day inception value is returned instead.

activityTypes (optional)

The list of activity types to include in the calculation. The options are:
Contributions
Distributions
Net Dividends/Interest/Gains Withdrawn
Miscellaneous Charges
Advisory Fees Paid
Dividends and Interest
Dividend Interest Reinvested
Exchange In
Exchange Out
Merge In
Merge Out
Journal In
Journal Out

market-value-change

"contextChange": { 
   "activityOption": { 
      "$type":"market-value-change",
      "includeAccruedInterest": false,
      "activityTypes": ["Exchange In", "Exchange Out"]
   }
}

This version of ActivityOption makes it easier to get the difference between ending valuation and starting valuation while accounting for a provided list of activity types.

name (optional)

Uses current ActivityOption name if not provided. This is just a name for this option to help distinguish it from other options.

includeAccruedInterest (optional)

Uses current PerformanceOption includeAccruedInterest if not provided. This determine whether bond accrual is included in the valuation or not.

activityTypes (optional)

The list of activity types to back out of the calculation. The options are:
Contributions
Distributions
Net Dividends/Interest/Gains Withdrawn
Miscellaneous Charges
Advisory Fees Paid
Dividends and Interest
Dividend Interest Reinvested
Exchange In
Exchange Out
Merge In
Merge Out
Journal In
Journal Out

costBasisOption (optional)

"contextChange": { 
   "costBasisOption": { 
      "$type":"cost-basis",
      "source":"Custodian",
      "realizationType":"Realized"
   }
}
$type (required)

Set to 'cost-basis' to have access to the options here.

name (optional)

Uses current CostBasisOption name if not provided. This is just a name for this option to help distinguish it from other options.

source (optional)

Uses current CostBasisOption name if not provided. Can be set to either “Orion” or “Custodian”.

realizationType (optional)

Uses current CostBasisOption realizationType if not provided. Can be set to either “Realized” or “Unrealized”

includeAmortization (optional)

Uses current CostBasisOption includeAmortization if not provided.

includeDividends (optional)

Uses current CostBasisOption includeDividends if not provided.

includeMoneyMarkets (optional)

Uses current CostBasisOption includeMoneyMarkets if not provided. Only applies when Source is set to Unrealized.

includeQualifiedAccounts (optional)

Uses current CostBasisOption includeQualifiedAccounts if not provided.

includeUnknownCostBasis (optional)

Uses current CostBasisOption includeUnknownCostBasis if not provided.

incomeOption (optional)

"contextChange": { 
   "incomeOption": { 
      "$type":"income",
      "modifiedDurationMarketDate":"Maturity Date",
      "annualDividendRateMethod":"Use Total for Last 12 Months",
      "prorateIncomeToMaturity":false,
      "showZeroYieldForZeroCouponBonds":false,
      "dividendDate":"ExDate",
      "maturityDate":"Maturity Date"
   }
}
$type (required)

Set to 'income' to have access to the options here.

name (optional)

Uses current IncomeOption name if not provided. This is just a name for this option to help distinguish it from other options.

modifiedDurationMarketDate (optional)

Uses current IncomeOption modifiedDurationMarketDate if not provided. Can be set to:

  • “Maturity Date”
  • “Pre Refunded Date”
  • “Next Call Date”
annualDividendRateMethod (optional)

Uses current IncomeOption annualDividendRateMethod if not provided. Can be set to:

  • “Use Total for Last 12 Months”
  • “Use Last Div By Frequency”
  • “IDSI Indicated Annual Dividend”
prorateIncomeToMaturity (optional)

Uses current IncomeOption prorateIncomeToMaturity if not provided.

showZeroYieldForZeroCouponBonds (optional)

Uses current IncomeOption showZeroYieldForZeroCouponBonds if not provided.

dividendDate (optional)

Uses current IncomeOption dividendDate if not provided. Can be set to:

  • “ExDate”
  • “PayDate”
maturityDate (optional)

Uses current IncomeOption maturityDate if not provided. Can be set to:

  • “Maturity Date”
  • “Pre Refunded Date”
  • “Next Call Date”

projectedIncomeOption (optional)

"contextChange": { 
   "projectedIncomeOption": { 
      "$type":"projected-income",
      "reportYear":"Current",
      "displayCurrentMonth":false,
      "dividendDate":"ExDate",
      "includeRedemptions":false,
      "includeUnpaidProjected":true
   }
}
$type (required)

Set to 'projected-income' to have access to the options here.

name (optional)

Uses current ProjectedIncomeOption name if not provided. This is just a name for this option to help distinguish it from other options.

reportYear (optional)

Uses current ProjectedIncomeOption reportYear if not provided. Can be set to:

  • “Current”
  • “NextTwelveMonths”
  • “NextSixtyMonths”
  • “NextFiveYears”
displayCurrentMonth (optional)

Uses current ProjectedIncomeOption displayCurrentMonth if not provided.

dividendDate (optional)

Uses current ProjectedIncomeOption dividendDate if not provided. Can be set to:

  • “ExDate”
  • “PayDate”
includeRedemptions (optional)

Uses current IncomeOption includeRedemptions if not provided.

includeUnpaidProjected (optional)

Uses current IncomeOption includeUnpaidProjected if not provided.

tradingOption (optional)

"contextChange": { 
   "tradingOption": { 
      "$type":"trading",
      "includeMoneyMarket":true,
      "includePendingTrades":false
   }
}
$type (required)

Set to 'trading' to have access to the options here.

name (optional)

Uses current TradingOption name if not provided. This is just a name for this option to help distinguish it from other options.

includeMoneyMarket (optional)

Uses current TradingOption includeMoneyMarket if not provided.

includePendingTrades (optional)

Uses current TradingOption includePendingTrades if not provided.

transactionOption (optional)

"ContextChange": {
	"TransactionOption": {
		"$type": "transaction",
		"feeRollup": true
	}
}
$type (required)

Set to 'transaction' to have access to the options here.

name (optional)

Uses current TransactionOption name if not provided. This is just a name for this option to help distinguish it from other options.

feeRollup (optional)

Uses current TransactionOption feeRollup if not provided.

includeCashExchanges

Uses current TransactionOption includeCashExchanges if not provided.