Constrained Efficient Frontier

Similar to efficientFrontier API, this API generates a number of efficient portfolios' risks and returns to be used to plot the efficient frontier, but with additional constraints.

Same as the efficientFrontier 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 efficientFrontier 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
computingSpeedIntegerDetermines the number of iterations, 1 is the most intensive.Y5>=1, <=100Use lower computing speed to generate higher accuracy (more efficient portfolios) of efficient plot.
priceRecordsArrayRecord 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 frontier.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

Response Body

NameDatatypeDescriptionSample valueNo. of decimalsNotes
efficientFrontierArray of DictionariesContains annualized returns and standard deviations pair of constrained efficient portfolios to plot the constrained efficient frontier plot
returnFloatAnnualized returns for each constrained efficient portfolio0.02944
stdDevFloatAnnualized standard deviations of returns for each constrained efficient portfolio0.02614
efficientFrontierArray of DictionariesContains annualized returns and standard deviations pair of efficient portfolios to plot the unconstrained efficient frontier plot
returnFloatAnnualized returns for each unconstrained efficient portfolio0.02944
stdDevFloatAnnualized standard deviations of returns for each unconstrained efficient portfolio0.02614
productsArray of dictionaries
symbolStringSymbols of funds“QQQ“
returnFloatAnnualized returns of all funds0.0552,4
stdDevFloatAnnualized standard deviations of returns of all funds0.1806,4
runningTimeFloatTotal API running time0.05474in seconds
Language
Authorization
Bearer
Click Try It! to start a request and see the response here!