{"swagger":"2.0","info":{"description":"The Chance of Capital Loss API is an upgrade to the Investment Forecast API which shows the probability of losing money on the capital invested. It uses the same request parameters as the Investment Forecast API and generates the chance of the investment being worth less than the original investment, plus additional contributions (as a percentage) for each of the requested terms. Please refer to the Pricing Plan and the Credits Plan for the number of credits required to call this API.","version":"0.1.0","title":"ChanceCapitalLoss","contact":{"name":"EValue Support","url":"https://www.ev.uk","email":"support@ev.uk"}},"schemes":["https","http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/chanceCapitalLossForecast/forecast":{"post":{"summary":"Chance of capital loss forecast","description":"Notes for chance of beating capital loss forecast","operationId":"forecast","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Parameters for chance of beating capital loss forecast","required":true,"schema":{"$ref":"#/definitions/ChanceCapitalLossParameters"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ChanceCapitalLossResult"}},"400":{"description":"Validation errors","schema":{"$ref":"#/definitions/ValidationErrors"}},"500":{"description":"System error","schema":{"$ref":"#/definitions/SystemError"}}}}}},"definitions":{"ChanceCapitalLossParameters":{"type":"object","required":["accumulationTaxationBasis","forecastOptions","funds"],"properties":{"contributions":{"description":"The regular contributions to be forecast","$ref":"#/definitions/Contributions"},"withdrawals":{"description":"The regular withdrawals to be forecast","$ref":"#/definitions/Withdrawals"},"initialCharges":{"description":"The initial charges to be forecast","$ref":"#/definitions/InitialCharges"},"annualCharges":{"description":"The annual charges to be forecast","$ref":"#/definitions/AnnualCharges"},"accumulationTaxationBasis":{"type":"string","example":"NONE","description":"Choice of taxation basis for investment: either no tax adjustment or apply a 0.5% deduction to allow for taxation, in line with FCA rules.","enum":["NONE","FCA_TAXED"]},"funds":{"type":"array","example":[{"code":"KEBA","balance":100000,"contributionPercentage":80,"adjustment":0.1},{"code":"G6HZ","balance":25000,"contributionPercentage":20,"adjustment":0.25}],"description":"Choice of funds for the investment to be invested in.","items":{"$ref":"#/definitions/Fund"}},"forecastOptions":{"description":"Options for how the forecast is calculated.","$ref":"#/definitions/ForecastOptions"}}},"AnnualCharges":{"type":"object","properties":{"amount":{"type":"number","format":"double","example":0,"description":"Annual pound amount charge.","minimum":0,"maximum":99999},"tieredCharges":{"type":"array","description":"Charges to apply at different tiers. Please provide these tiers in order from smallest to largest upperLimit.","items":{"$ref":"#/definitions/TieredCharge"}}},"description":"Annual Charges object for adding an annual charge as well as tiered platform charges"},"TieredCharge":{"type":"object","properties":{"percentage":{"type":"number","format":"double","example":0.45,"description":"Annual % pa charge to apply to product (excluding fund charge)","minimum":0,"maximum":100},"upperLimit":{"type":"number","format":"double","example":50000,"description":"Balance up to which to apply the annual % charge specificied. If excluded, assume charge applies to whole balance","minimum":0,"maximum":999999999}},"description":"Allows for tiered platform charges"},"Contributions":{"type":"object","required":["amount","frequency"],"properties":{"amount":{"type":"number","format":"double","example":500,"description":"Regular contribution to be included in the forecast"},"frequency":{"type":"string","example":"MONTHLY","description":"Frequency of regular monetary amount contributions","enum":["WEEKLY","MONTHLY","QUARTERLY","ANNUALLY"]},"increase":{"description":"Increase to apply to pound-amount regular contributions (Increase applied annually). If an increase is required for percentage contributions then please use the salary increase","$ref":"#/definitions/Increase"}},"description":"Regular contributions to be forecast"},"Increase":{"type":"object","properties":{"basis":{"type":"string","example":"RPI","description":"The underlying index to base the increase on. This can be one of NONE, RPI, CPI or AWE (average weekly earnings)","enum":["NONE","RPI","CPI","AWE"]},"rate":{"type":"number","format":"double","example":0,"description":"An additional rate of increase to apply each year on top of the increase basis. For a fixed increase rate basis should be set to NONE and rate to the fixed increase (i.e. basis = NONE, rate = 2.5 would use fixed 2.5% increases each year)","minimum":-100,"maximum":100}},"description":"An Increase to apply"},"ForecastOptions":{"type":"object","required":["terms"],"properties":{"terms":{"type":"array","example":[5,10,15],"description":"Terms for which to return a result, between 0 and 75 years","items":{"type":"integer","format":"int32"}}},"description":"Options dictating how the forecast should be processed"},"Fund":{"type":"object","required":["balance","code","contributionPercentage"],"properties":{"code":{"type":"string","example":"Returns_File_UK_Equity","description":"Enter fund code for forecast. Use Citicode or asset class - see documentation for further information on asset class codes."},"riskGroup":{"type":"integer","format":"int32","description":"User's risk benchmark to which their investment can be evaluated"},"riskTerm":{"type":"integer","format":"int32","description":"Evaluated term for the efficient risk profile. Required if riskGroup is set.","minimum":0,"maximum":75},"balance":{"type":"number","format":"double","description":"Balance in this fund","minimum":-999999999,"maximum":999999999},"contributionPercentage":{"type":"number","format":"double","example":100,"description":"Contribution percentage allocated to that fund.","minimum":-100,"maximum":200},"adjustment":{"type":"number","format":"double","example":0.25,"description":"Fund charge to apply to this fund. Enter charges as positive value, e.g. 1.5 for a 1.5% pa fund charge.","minimum":-99,"maximum":99},"portfolioFunds":{"type":"array","description":"A portfolio of funds.","items":{"$ref":"#/definitions/PortfolioFund"}}},"description":"A fund an investment can be invested in."},"PortfolioFund":{"type":"object","required":["code","contributionPercentage"],"properties":{"code":{"type":"string","example":"Returns_File_UK_Equity","description":"Enter fund code for forecast. Use Citicode or asset class - see documentation for further information on asset class codes."},"contributionPercentage":{"type":"number","format":"double","example":100,"description":"Contribution percentage allocated to that fund.","minimum":-100,"maximum":200}},"description":"A fund an investment can be invested in."},"InitialCharges":{"type":"object","properties":{"percentage":{"type":"number","format":"double","example":0,"description":"Initial charge applied to the starting balance (as % of balance)","minimum":0,"maximum":100},"amount":{"type":"number","format":"double","example":0,"description":"Initial charge applied to the starting balance (in pound amount terms)","minimum":0,"maximum":99999},"contributionPercentage":{"type":"number","format":"double","example":0,"description":"Initial charge applied to any future contributions upon deposit (as % of contribution)","minimum":0,"maximum":100}},"description":"Intial charges for the investment"},"Withdrawals":{"type":"object","required":["amount","percentage"],"properties":{"percentage":{"type":"boolean","example":true,"description":"A boolean entry to determine if the withdrawals made from the investment should be a pound amount (false) or a percentage of the fund (true)"},"amount":{"type":"number","format":"double","example":5,"description":"The amount to withdraw from the fund on an annual basis. If percentage has been specified, then the amount should release to the annual percentage required e.g. 2.5 for 2.5% per annum"},"increase":{"description":"Increase to apply to regular withdrawals. (Increase applied annually.)","$ref":"#/definitions/Increase"},"startDate":{"type":"string","format":"date","example":"2021-01-01","description":"The date you would like the withdrawal from assets to start"}},"description":"Regular withdrawals to be forecast"},"ChanceCapitalLossResult":{"type":"object","properties":{"terms":{"type":"array","example":[{"term":5,"chance":57},{"term":10,"chance":60},{"term":15,"chance":67}],"description":"A list of result for each term requested in the API input parameters","items":{"$ref":"#/definitions/ChanceTermResult"}}},"description":"The results of the forecast"},"ChanceTermResult":{"type":"object","properties":{"term":{"type":"integer","format":"int32","description":"The term of this forecast result"},"chance":{"type":"number","format":"double","description":"The chance of capital loss as a percentage"}}},"ValidationErrors":{"type":"object","properties":{"errors":{"type":"array","description":"A list of errors from validating the API input parameters","items":{"$ref":"#/definitions/ValidationError"}}},"description":"Contains any errors that have occurred during validation of the API input parameters"},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"The field that is invalid"},"code":{"type":"string","description":"The type of validation error that has occurred","enum":["REQUIRED","OUT_OF_RANGE","INVALID","INVALID_TOTAL"]},"message":{"type":"string","description":"The validation error message"},"value":{"type":"string","description":"The value that is invalid"}},"description":"Contains details of a error when validating an API input parameter"},"SystemError":{"type":"object","properties":{"systemError":{"type":"string","example":"A system error has occurred.","description":"The system error message."}},"description":"A System error message"}},"securityDefinitions":{"default":{"type":"oauth2","authorizationUrl":"https://api-gateway.prod.powered-by.ev.uk/authorize","flow":"implicit","scopes":{}}},"basePath":"/chanceCapitalLoss/0.0.1","host":"api-gateway.prod.powered-by.ev.uk"}