Skip to main content

Portfolio's monthly TWR

Query

query PortfolioOverview ($id:Long, $startDate: String, $endDate: String){
  portfolio(id: $id) {
    client: primaryContact {
      name
    }
    portfolioName: name
    analytics(withoutPositionData:true,
      parameters: {
        startDate:$startDate,
        endDate: $endDate,
        paramsSet: {
          timePeriodCodes:"CALMONTHS-1",
          includeData:false,
          includeFrequencyData:true,
          includeChildren:true,
          drilldownEnabled:false,
          frequency:"CALMONTHS-1"
        },
        includeDrilldownPositions:false
      }) {
      analyticsTimeSeries(key:"1") {
        timeSeries {
            startDate
          endDate
          firstAnalysis {
            twr
          }
        }
      }
    }
  }
}

Variables

{
  "id": 24,
  "startDate": "2021-05-01",
  "endDate": "2021-09-30"
}

Result

{
  "data": {
    "portfolio": {
      "client": {
        "name": "Ari Model"
      },
      "portfolioName": "Investments",
      "analytics": {
        "analyticsTimeSeries": {
          "timeSeries": [
            {
              "startDate": "2021-05-01",
              "endDate": "2021-05-31",
              "firstAnalysis": {
                "twr": -0.06768089999999982
              }
            },
            {
              "startDate": "2021-06-01",
              "endDate": "2021-06-30",
              "firstAnalysis": {
                "twr": 0.0386648734322832
              }
            },
            .
            .
            .
            {
              "startDate": "2021-09-01",
              "endDate": "2021-09-30",
              "firstAnalysis": {
                "twr": -0.02348759679546286
              }
            }
          ]
        }
      }
    }
  }
}