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:
-
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 efficientPortfolios 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 |
targetReturns | Array of float | Target return(s) for efficient portfolios | Y | [0.2, 0.7, …] | >=0, <=1 | 4 | |
priceRecords | Array of dictionaries | 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 portfolios. | 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 | |
riskFreeRate | Float | Risk free rate for calculation of Sharpe ratio | N | 0.02 | >-1, <1 | 4 |
Response Body
Name | Datatype | Description | Sample value | No. of decimals | Notes |
---|---|---|---|---|---|
targetReturn | Float | Targeted return for the constrained portfolio | 0.05 | ||
portfolioWeights | Array of dictionaries | ||||
symbol | String | Symbols of funds | Y | “QQQ” | |
weight | Float | Weightage of respective fund in the constrained portfolio | 0.1113 | 4 | |
annualizedReturn | Float | Annualized return of the constrained portfolio | 0.0700 | 4 | |
annualizedStdDev | Float | Annualized standard deviation of returns of the constrained portfolio | 0.1040 | 4 | |
sharpeRatio | Float | Sharpe ratio of the constrained portfolio | 24.952412 | 6 | |
runningTime | Float | API running time for the portfolio | 0.1377 | 4 | in seconds |