{"openapi":"3.0.4","info":{"title":"Solve a reverse stress test","description":"Solve for how far the market has to move to produce a given change in portfolio value.\r\n            \r\nA scenario supplies the direction the market moves in: which risk factors move, and in what\r\nproportion to each other. The solve is over a single factor its shifts are multiplied by, so the\r\nanswer is a multiple of the scenario rather than a set of shifts in its own right - a factor of\r\ntwo means twice every shift the scenario states.\r\n            \r\nA ladder of factors is valued first, all in one valuation so the rungs share market data\r\nresolution, then the bracketing pair is interpolated and the interpolated factor valued again to\r\nconfirm it. The whole ladder is returned: a reverse stress is only meaningful where the change in\r\nvalue moves in one direction with the factor, and the ladder is what shows whether it does.\r\n            \r\nThe solve is refused rather than approximated where it cannot be trusted: a scenario carrying a\r\nshift with no size to scale (a model option, or a market data routing override), a measure that\r\ncannot be computed under a scenario, or a valuation that could not price every holding.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/scenarios/$reversestress":{"post":{"tags":["Scenarios"],"summary":"Solve a reverse stress test","description":"Solve for how far the market has to move to produce a given change in portfolio value.\r\n            \r\nA scenario supplies the direction the market moves in: which risk factors move, and in what\r\nproportion to each other. The solve is over a single factor its shifts are multiplied by, so the\r\nanswer is a multiple of the scenario rather than a set of shifts in its own right - a factor of\r\ntwo means twice every shift the scenario states.\r\n            \r\nA ladder of factors is valued first, all in one valuation so the rungs share market data\r\nresolution, then the bracketing pair is interpolated and the interpolated factor valued again to\r\nconfirm it. The whole ladder is returned: a reverse stress is only meaningful where the change in\r\nvalue moves in one direction with the factor, and the ladder is what shows whether it does.\r\n            \r\nThe solve is refused rather than approximated where it cannot be trusted: a scenario carrying a\r\nshift with no size to scale (a model option, or a market data routing override), a measure that\r\ncannot be computed under a scenario, or a valuation that could not price every holding.","operationId":"SolveReverseStress","requestBody":{"description":"The recipe, portfolios, effective date, scenario direction and target change in value","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressRequest"},"example":{"recipeId":{"scope":"live","code":"default"},"portfolioEntityIds":[{"scope":"fund-a","code":"main","portfolioEntityType":"SinglePortfolio"}],"effectiveAt":"2026-01-01T00:00:00.0000000+00:00","scenario":{"scope":"stress-tests","code":"rates-up-50"},"targetPnl":-1000000,"reportCurrency":"USD","maxScale":5,"ladderPoints":5,"tolerance":0.0001,"maxIterations":3}},"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressRequest"},"example":{"recipeId":{"scope":"live","code":"default"},"portfolioEntityIds":[{"scope":"fund-a","code":"main","portfolioEntityType":"SinglePortfolio"}],"effectiveAt":"2026-01-01T00:00:00.0000000+00:00","scenario":{"scope":"stress-tests","code":"rates-up-50"},"targetPnl":-1000000,"reportCurrency":"USD","maxScale":5,"ladderPoints":5,"tolerance":0.0001,"maxIterations":3}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressRequest"},"example":{"recipeId":{"scope":"live","code":"default"},"portfolioEntityIds":[{"scope":"fund-a","code":"main","portfolioEntityType":"SinglePortfolio"}],"effectiveAt":"2026-01-01T00:00:00.0000000+00:00","scenario":{"scope":"stress-tests","code":"rates-up-50"},"targetPnl":-1000000,"reportCurrency":"USD","maxScale":5,"ladderPoints":5,"tolerance":0.0001,"maxIterations":3}},"application/*+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressRequest"},"example":{"recipeId":{"scope":"live","code":"default"},"portfolioEntityIds":[{"scope":"fund-a","code":"main","portfolioEntityType":"SinglePortfolio"}],"effectiveAt":"2026-01-01T00:00:00.0000000+00:00","scenario":{"scope":"stress-tests","code":"rates-up-50"},"targetPnl":-1000000,"reportCurrency":"USD","maxScale":5,"ladderPoints":5,"tolerance":0.0001,"maxIterations":3}}},"required":true},"responses":{"200":{"description":"The solved scale with the evaluated ladder, or any failure","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressResponse"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressResponse"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ReverseStressResponse"}}}},"400":{"description":"The details of the input related failure","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"EarlyAccess"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}