Skip to main content

Portfolio allocation by type and security

Query

query PortfolioHierarchyByTypeAndSecurity {
  portfolio(id: 340224) {
    client: primaryContact {
      name
    }
    portfolioName: name
    analytics(
      parameters: {
        paramsSet: {
          key:"ALLOC"
          timePeriodCodes:"DAYS-0"
          grouppedByProperties: [TYPE,SECURITY]
          includeData:false
          includeChildren:true
          drilldownEnabled:false
          limit: 0
        },
        includeDrilldownPositions:false
      }) {    
      allocationTopLevel:grouppedAnalytics(key:"ALLOC") {
        figures:firstAnalysis {
          marketValue   
        }
        allocationBySecurityType:grouppedAnalytics {
          code
          name
          figures:firstAnalysis {
            marketValue
            shareOfTotal
          }
          allocationBySecurity:grouppedAnalytics {
            code
            name
            figures:firstAnalysis {
              marketValue
              shareOfParent
              shareOfTotal
            }
          }
        }
      }
    }
  }
}  

Result

{
  "data": {
    "portfolio": {
      "client": {
        "name": "Aaron Chan"
      },
      "portfolioName": "Investment portfolio",
      "analytics": {
        "allocationTopLevel": {
          "figures": {
            "marketValue": 31673044.509999998
          },
          "allocationBySecurityType": [
            {
              "code": "CURRENCY",
              "name": "Currency",
              "figures": {
                "marketValue": 30678361.61,
                "shareOfTotal": 0.9685952861372088
              },
              "allocationBySecurity": [
                {
                  "code": "EUR",
                  "name": "EUR",
                  "figures": {
                    "marketValue": 30678361.61,
                    "shareOfParent": 1,
                    "shareOfTotal": 0.9685952861372088
                  }
                }
              ]
            },
            {
              "code": "STOCK",
              "name": "Listed Equity",
              "figures": {
                "marketValue": 994682.9,
                "shareOfTotal": 0.031404713862791214
              },
              "allocationBySecurity": [
                {
                  "code": "CORE-PREF.ST",
                  "name": "Corem Property Group AB (publ)",
                  "figures": {
                    "marketValue": 961290,
                    "shareOfParent": 0.9664285974957446,
                    "shareOfTotal": 0.030350413573172478
                  }
                },
                {
                  "code": "OUT1V.HE",
                  "name": "Outokumpu Oyj",
                  "figures": {
                    "marketValue": 15115.03,
                    "shareOfParent": 0.015195827735653242,
                    "shareOfTotal": 0.00047722062194645656
                  }
                },
                {
                  "code": "PLED.ST",
                  "name": "PledPharma AB",
                  "figures": {
                    "marketValue": 9257.14,
                    "shareOfParent": 0.009306624251809295,
                    "shareOfTotal": 0.00029227187165658424
                  }
                },
                {
                  "code": "VINCIT.HE",
                  "name": "Vincit Oyj",
                  "figures": {
                    "marketValue": 9020.73,
                    "shareOfParent": 0.009068950516792839,
                    "shareOfTotal": 0.0002848077960156916
                  }
                }
              ]
            }
          ]
        }
      }
    }
  }
}