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:
-
Maximum and minimum weight on each fund
-
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“.
-
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:
-
Logical Threshold - sets a minimum weight on each fund included the portfolio, but not all funds must be included in the portfolio
-
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
Name | Datatype | Description | Mandatory | Sample values | List of Possible values | No. of decimals | Notes |
---|---|---|---|---|---|---|---|
minWeight | Float | Minimum weight on each fund | Y | 0 | >=0, <=1 | 4 | |
maxWeight | Float | Maximum weight on each fund | Y | 1 | >=0, <=1 | 4 | maxWeight > minWeight |
computingSpeed | Integer | Determines the number of iterations, 1 is the most intensive. | Y | 5 | >=1, <=10 | 0 | Use lower computing speed to generate higher accuracy (more efficient portfolios) of efficient plot. |
priceRecords | Array | Record of daily funds' prices | Y | ||||
divAdjClose | Float | Daily dividend adjusted prices of funds | Y | 37.06 | 2 | ||
symbol | String | Symbols of funds | Y | “QQQ” | NA | ||
date | String | Date of price data | Y | "2008-08-22" | NA | ||
productDictionary | Array of dictionaries | Contains additional constraints on weights of funds and information to be overridden. | Y when either “override“, “useRiskBuckets“, “useClassifications“ is true | ||||
Classification | String | Classification of the fund in core-satellite investing. | Y when “useClassifications“: true | "UC" | “UC“, “C“, “S1“, “S2“ | NA | Higher weights are allocated to “UC“ (ultra-core) funds, followed by “C“ (core), “S1“ (satellite 1) and “S2“ (satellite 2) funds. |
riskBucket | String | Classification of the fund’s riskiness. | Y when “useRiskBuckets“: true | "Safe" | “Safe“, “Risky“ | NA | Weights of “Risky“ funds are ensured to be lower than weights of “Safe“ funds |
expectedReturn | Float | Expected returns of the fund to be used instead of calculating based on “priceRecords” | Y when “override“: true | 0.01 | >=0, <=1 | not limited | |
expectedStdDev | Float | Expected variances of the fund to be used instead of calculating based on “priceRecords” | Y when “override“: true | 0.01 | >=0, <=1 | not limited | |
override | Boolean | To use expectedReturn and expectedStdDev of funds in “productDictionary“ rather than calculate from “priceRecords” | Y | false | true, false | NA | |
useRiskBuckets | Boolean | To add constraints on weights of funds based on funds' riskiness | Y | false | true, false | NA | |
useClassification | Boolean | To add constraints on weights of funds based their classifications in core-satellite investing | Y | false | true, false | NA | |
engineType | String | “basic” | "basic", "advanced" | NA | |||
constraintType | String | Type of constraint used for construction of constrained efficient frontier. | Y | “logicalThreshold“ | "logicalThreshold", "cardinalityBound" | NA | |
logicalThreshold | Float | Sets a minimum weight of each fund in the portfolio if “logicalThreshold“ is the selected contstraint type | Y | 0.05 | >=0 and <=1 | 4 | “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. |
cardinalityBound | Integer | Sets a maximum number of funds allowed in the portfolio if “cardinalityBound” is the selected constraint type | Y | 2 | >=1 | 0 |
Response Body
Name | Datatype | Description | Sample value | No. of decimals | Notes |
---|---|---|---|---|---|
efficientFrontier | Array of Dictionaries | Contains annualized returns and standard deviations pair of constrained efficient portfolios to plot the constrained efficient frontier plot | |||
return | Float | Annualized returns for each constrained efficient portfolio | 0.0294 | 4 | |
stdDev | Float | Annualized standard deviations of returns for each constrained efficient portfolio | 0.0261 | 4 | |
efficientFrontier | Array of Dictionaries | Contains annualized returns and standard deviations pair of efficient portfolios to plot the unconstrained efficient frontier plot | |||
return | Float | Annualized returns for each unconstrained efficient portfolio | 0.0294 | 4 | |
stdDev | Float | Annualized standard deviations of returns for each unconstrained efficient portfolio | 0.0261 | 4 | |
products | Array of dictionaries | ||||
symbol | String | Symbols of funds | “QQQ“ | ||
return | Float | Annualized returns of all funds | 0.0552, | 4 | |
stdDev | Float | Annualized standard deviations of returns of all funds | 0.1806, | 4 | |
runningTime | Float | Total API running time | 0.0547 | 4 | in seconds |