Constrained Efficient Portfolios

Similar to efficientPortfolios API, this API generates efficient portfolios based on target returns, but with additional constraints. Information on efficient portfolios is also displayed which includes weights of each fund, annualised risk and return, and Sharpe ratio.

Same as efficientPortfolios API, following are the adjustable constraints on the efficient portfolios:

  1. Maximum and minimum weight on each fund

  2. Classification - to incorporate Core-Satellite Investing by classifying funds into “UC“ (Ultra Core), “C“ (Core), “S1“ (Satellite 1) or “S2“ (Satellite 2). Higher weights will be allocated to “UC“ funds, followed by “C“, “S1“ and “S2“.

  3. Risk bucket - to classify funds as either “Safe“ or “Risky“. Weights allocated to “Risky“ funds are lower than weights on “Safe“ funds

In contrast with the efficientPortfolios API, this API allows user to choose one additional constraint on top of the above constraints, from the below two options:

  1. Logical Threshold - sets a minimum weight on each fund included the portfolio, but not all funds must be included in the portfolio

  2. Cardinality Bound - sets a maximum number of funds to be included in the portfolio

User can also override expected returns and expected variances based on their company’s in-house estimation while using this API.

Request Body

NameDatatypeDescriptionMandatorySample valuesList of Possible valuesNo. of decimalsNotes
minWeightFloatMinimum weight on each fundY0>=0, <=14
maxWeightFloatMaximum weight on each fundY1>=0, <=14maxWeight > minWeight
targetReturnsArray of floatTarget return(s) for efficient portfoliosY[0.2, 0.7, …]>=0, <=14
priceRecordsArray of dictionariesRecord of daily funds' pricesY
divAdjCloseFloatDaily dividend adjusted prices of fundsY37.062
symbolStringSymbols of fundsY“QQQ”NA
dateStringDate of price dataY"2008-08-22"NA
productDictionaryArray of dictionariesContains additional constraints on weights of funds and information to be overridden.Y when either “override“, “useRiskBuckets“, “useClassifications“ is true
ClassificationStringClassification of the fund in core-satellite investing.Y when “useClassifications“: true"UC"“UC“, “C“, “S1“, “S2“NAHigher weights are allocated to “UC“ (ultra-core) funds, followed by “C“ (core), “S1“ (satellite 1) and “S2“ (satellite 2) funds.
riskBucketStringClassification of the fund’s riskiness.Y when “useRiskBuckets“: true"Safe"“Safe“, “Risky“NAWeights of “Risky“ funds are ensured to be lower than weights of “Safe“ funds
expectedReturnFloatExpected returns of the fund to be used instead of calculating based on “priceRecords”Y when “override“: true0.01>=0, <=1not limited
expectedStdDevFloatExpected variances of the fund to be used instead of calculating based on “priceRecords”Y when “override“: true0.01>=0, <=1not limited
overrideBooleanTo use expectedReturn and expectedStdDev of funds in “productDictionary“ rather than calculate from “priceRecords”Yfalsetrue, falseNA
useRiskBucketsBooleanTo add constraints on weights of funds based on funds' riskinessYfalsetrue, falseNA
useClassificationBooleanTo add constraints on weights of funds based their classifications in core-satellite investingYfalsetrue, falseNA
engineTypeString“basic”"basic", "advanced"NA
constraintTypeStringType of constraint used for construction of constrained efficient portfolios.Y“logicalThreshold“"logicalThreshold", "cardinalityBound"NA
logicalThresholdFloatSets a minimum weight of each fund in the portfolio if “logicalThreshold“ is the selected contstraint typeY0.05>=0 and <=14“logicalThreshold“ will be used to set minimum weight on each fund, instead of “minWeight“. if “minWeight“ > 0, all funds must be included in the portfolio, however, if “logicalThreshold“ > 0, not all funds are included in the portfolio.
cardinalityBoundIntegerSets a maximum number of funds allowed in the portfolio if “cardinalityBound” is the selected constraint typeY2>=10
riskFreeRateFloatRisk free rate for calculation of Sharpe ratioN0.02>-1, <14

Response Body

NameDatatypeDescriptionSample valueNo. of decimalsNotes
targetReturnFloatTargeted return for the constrained portfolio0.05
portfolioWeightsArray of dictionaries
symbolStringSymbols of fundsY“QQQ”
weightFloatWeightage of respective fund in the constrained portfolio0.11134
annualizedReturnFloatAnnualized return of the constrained portfolio0.07004
annualizedStdDevFloatAnnualized standard deviation of returns of the constrained portfolio0.10404
sharpeRatioFloatSharpe ratio of the constrained portfolio24.9524126
runningTimeFloatAPI running time for the portfolio0.13774in seconds
Language
Authorization
Bearer
Click Try It! to start a request and see the response here!