Investment Profile
An Investment Profile is a target allocation defined at the organization scope to serve as a reference or model portfolio for its portfolios. Each profile has a unique name and distributes 100% of the portfolio across security classifications. It is the basis of target allocation compliance, which compares the actual allocation of a portfolio with the allocation defined in the profile.
Investment firms usually serve clients with different risk tolerances. Instead of tracking each portfolio in isolation, they create a few profiles, such as "Conservative" or "Aggressive", and associate each client with one of them. This way, the firm keeps an investment standard that follows its guidelines while still respecting the differences between clients.
Profile composition
A profile is made up of a list of security classifications (classifications), each with its target percentage. Percentages are provided in decimal format (0.65 = 65%), are always relative to the portfolio's total and must add up to exactly 1 (100% of the portfolio). Each profile accepts at most 100 classifications. A classification's identifier can be a symbol, such as VARIABLE_INCOME_STOCKS, or the UUID of a classification created by the organization itself.
A profile's classifications cannot be in the same hierarchical branch. When defining, for example, 25% for "Variable Income", neither the levels above nor the levels below it can be included in the same profile. Therefore, if you want to detail a part of the portfolio, you need to distribute the percentage across all sibling levels of that part.
//REQUEST
//POST https://core.gorila.com.br/investment-profiles
{
"name": "Conservative",
"thresholdLimits": [5, 15],
"classifications": [
{ "id": "FIXED_INCOME", "percentage": 0.8 },
{ "id": "VARIABLE_INCOME", "percentage": 0.2 }
]
}
In this example, the profile uses only first-level classifications (Fixed Income and Variable Income). The identifiers of the available classifications can be found in List Securities Classifications.
Portfolio target allocation compliance
Think of the investment profile as an ideal goal: it states exactly what percentage of the portfolio should be in each classification (e.g., 20% in Fixed Income, 15% in Stocks, etc.).
Day to day, with price fluctuations and new contributions, the portfolio's actual percentages change. The Deviation Index simply measures: "How much of this portfolio's money would need to change places for it to match the goal 100% again?"
How the calculation works
-
We calculate the difference for each classification: We compare the actual percentage with the planned percentage. If a classification is over- or under-allocated, we calculate that distance.
-
We ignore the sign (absolute values): It doesn't matter whether it is 5% "above" or 5% "below"; in both cases, the portfolio deviated 5% from the target.
-
We add up all deviations and divide by 2: In a portfolio that always adds up to 100%, for you to have BRL 5 more in Stocks, you necessarily had to have BRL 5 less in something else (such as Fixed Income). If we added them directly, we would count the same misplaced money twice (in the surplus and in the shortfall). Dividing by 2 gives us the actual percentage of the portfolio that needs to be moved.
Practical example
Imagine a profile with its ideal goal compared with the client's actual portfolio:
| Asset Class | Profile Target | Current Portfolio | Difference | Absolute Deviation |
|---|---|---|---|---|
| Fixed Income - Interest Rate Indexed | 20% | 18% | -2.0% | 2.0% |
| Fixed Income - Inflation Indexed | 20% | 25% | +5.0% | 5.0% |
| Stocks | 15% | 15% | 0.0% | 0.0% |
| Multimarket Funds | 15% | 8% | -7.0% | 7.0% |
| Real Estate Funds | 10% | 11.5% | +1.5% | 1.5% |
| Investment Funds | 10% | 6.5% | -3.5% | 3.5% |
| International Stocks | 5% | 6% | +1.0% | 1.0% |
| Gold | 5% | 3% | -2.0% | 2.0% |
| Others (allocations in other classifications) | 0% | 7% | +7.0% | 7.0% |
| Total | 100% | 100% | — | Sum of deviations: 29.0% |
Doing the final calculation:
This means that 14.5% of this portfolio's total wealth needs to be rebalanced for it to be 100% compliant again.
Note: In the API, each classification's
differentialfield carries this difference with the opposite sign (target − actual): positive values indicate an allocation below the target, and negative values indicate an allocation above the target.
Compliance thresholds
In addition to the composition, the profile defines the compliance thresholds (thresholdLimits), which indicate how much difference from the profile is still acceptable. They are two percentage values, between 0 and 100: the lower one marks the "compliant" limit and the higher one, the "non-compliant" limit. Between the two, the portfolio is considered "partially compliant". The field is optional and, when omitted, GorilaCORE uses the default thresholds [5, 15].
Based on the final percentage found in the deviation calculation, the portfolio receives a compliance status. With the default thresholds:
- 🟢 Compliant: deviation of up to 5% (the portfolio is practically on target).
- 🟡 Partially Compliant: deviation between 5% and 15% (the portfolio requires attention and small adjustments).
- 🔴 Non-compliant: deviation greater than 15% (the portfolio has drifted significantly from the profile and needs rebalancing).
In the example above, with 14.5%, the portfolio is classified as 🟡 Partially Compliant.
Association with portfolios
Profiles are managed independently from portfolios: you can create and edit a profile without associating it with any portfolio. Each portfolio can be associated with at most one profile. The association is made through the investmentProfileId field when updating the portfolio, and sending null removes the associated profile. When a profile is deleted, all portfolios associated with it are automatically left without a profile.
With an associated profile, you can query the portfolio's target allocation, which returns, for each classification in the profile, the target allocation (target), the actual allocation (allocation) and the difference between them (differential), in addition to the profile's compliance thresholds. When the reference date (referenceDate) is not provided, today's date is used. You can also filter the positions allocation by positions inside (IN) or outside (OUT) the profile, using the investmentProfileRelation parameter.
Where to access
In GorilaCORE, you can create, list, read, update and delete investment profiles. The listing does not include each profile's classifications; to see them, read the profile by its ID. When updating, sending classifications replaces the profile's entire set of classifications.