PortfolioLinkApi

<back to all web services

CalculateProjectedReturns

Requires Authentication
The following routes are available for this service:
All Verbs/calculator/projectedReturnsv1
CalculateProjectedReturns Parameters:
NameParameterData TypeRequiredDescription
PortfolioReturnquerydoubleNo
PortfolioStandardDeviationquerydoubleNo
YearsToGoalqueryintNo
InitialInvestmentquerydoubleNo
AnnualInvestmentquerydoubleNo
AnnualInvestmentGrowthRatequerydoubleNo
ExpectedInflationRatequerydoubleNo
ZScorequerydoubleNo
CurrentAgequeryintNo
CalculateProjectedReturnsResponse Parameters:
NameParameterData TypeRequiredDescription
RequestObjectformCalculateProjectedReturnsNo
MedianDiscreteReturnsformList<ProjectedReturnSeriesData>No
OptimisticDiscreteReturnsformList<ProjectedReturnSeriesData>No
PessimisticDiscreteReturnsformList<ProjectedReturnSeriesData>No
MedianProjectedBalancesformList<ProjectedReturnSeriesData>No
OptimisticProjectedBalancesformList<ProjectedReturnSeriesData>No
PessimisticProjectedBalancesformList<ProjectedReturnSeriesData>No
OptimisticProjectedBalances2formList<ProjectedReturnSeriesData>No
PessimisticProjectedBalances2formList<ProjectedReturnSeriesData>No
OptimisticProjectedBalances3formList<ProjectedReturnSeriesData>No
PessimisticProjectedBalances3formList<ProjectedReturnSeriesData>No
CashflowsformList<CashFlow>No
AgeRunOutOfMoneyformstringNo
PessimisticAgeRunOutOfMoneyformintNo
OptimisticAgeRunOutOfMoneyformintNo
StatusformstringNo
BalanceAtLifeExpectancyformdoubleNo
CurrentAgeformintNo
PessimisticBalanceAtLifeExpectancyformdoubleNo
OptimisticBalanceAtLifeExpectancyformdoubleNo
TargetProjectedBalancesformList<ProjectedReturnSeriesData>No
AgeTargetIncomeNotMetformstringNo
ProjectedReturnSeriesData Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
YearformintNo
IncomeformdoubleNo
TargetIncomeformdoubleNo
CashFlow Parameters:
NameParameterData TypeRequiredDescription
ValueformdoubleNo
YearformintNo
TypeformstringNo
ScenarioformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /calculator/projectedReturnsv1 HTTP/1.1 
Host: api.portfoliolink.co.za 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	portfolioReturn: 0,
	portfolioStandardDeviation: 0,
	yearsToGoal: 0,
	initialInvestment: 0,
	annualInvestment: 0,
	annualInvestmentGrowthRate: 0,
	expectedInflationRate: 0,
	zScore: 0,
	currentAge: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	requestObject: 
	{
		portfolioReturn: 0,
		portfolioStandardDeviation: 0,
		yearsToGoal: 0,
		initialInvestment: 0,
		annualInvestment: 0,
		annualInvestmentGrowthRate: 0,
		expectedInflationRate: 0,
		zScore: 0,
		currentAge: 0
	},
	medianDiscreteReturns: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	optimisticDiscreteReturns: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	pessimisticDiscreteReturns: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	medianProjectedBalances: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	optimisticProjectedBalances: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	pessimisticProjectedBalances: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	optimisticProjectedBalances2: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	pessimisticProjectedBalances2: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	optimisticProjectedBalances3: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	pessimisticProjectedBalances3: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	cashflows: 
	[
		{
			value: 0,
			year: 0,
			type: String,
			scenario: String
		}
	],
	ageRunOutOfMoney: String,
	pessimisticAgeRunOutOfMoney: 0,
	optimisticAgeRunOutOfMoney: 0,
	status: String,
	balanceAtLifeExpectancy: 0,
	currentAge: 0,
	pessimisticBalanceAtLifeExpectancy: 0,
	optimisticBalanceAtLifeExpectancy: 0,
	targetProjectedBalances: 
	[
		{
			value: 0,
			year: 0,
			income: 0,
			targetIncome: 0
		}
	],
	ageTargetIncomeNotMet: String
}