Skip to main content

Portfolio details

This query can be used in a JSReport based report to be run against portfolios.

Query

  query  {
    portfoliosByIds(ids: [1029,1093] ) {
    id
    name
    analytics(
      parameters: {
        paramsSet: {
          key:"A"
          timePeriodCodes:["MONTHS-1","MONTHS-2"]
          grouppedByProperties: [PORTFOLIO]
        }
      }     
    ) {
      grouppedAnalytics(key:"A") {
        M1:analysis(timePeriodCode:"MONTHS-1") {
                                        twr          
        }
        M2:analysis(timePeriodCode:"MONTHS-2") {
                                        twr          
        }
      }
    }
  }
}

Result

{
  "data": {
    "portfoliosByIds": [
      {
        "id": 1092,
        "name": "Investment portfolio",
        "analytics": {
          "groups": {
            "M1": {
              "twr": -0.9483318154666678
            },
            "M2": {
              "twr": -0.9512793797213104
            }
          }
        }
      },
      {
        "id": 1093,
        "name": "Model 100+",
        "analytics": {
          "groups": {
            "M1": {
              "twr": 0.03773488511663037
            },
            "M2": {
              "twr": -0.004927623593515507
            }
          }
        }
      }
    ]
  }
}