Package nis.svc.opt.api
Interface ProjectSettings.HoldingsSettings
-
- Enclosing interface:
- ProjectSettings
public static interface ProjectSettings.HoldingsSettings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addBenchmarkItem(java.lang.String id, double value)
Adds an asset identifier / value pair to the benchmark.SettingsTables.CompositeRow
addComposite(java.lang.String id, java.lang.String name, java.lang.String industryId, double price, double marketCap, Types.WeightingType weight)
add a composite asset.void
addPortfolioItem(java.lang.String id, double value)
ads an asset id / value pair to the initial portfoliovoid
addPortfolioItem(java.lang.String id, double value, double price, java.lang.String date, java.lang.String serialNumber)
Add a portfolio item to a taxable portfolio.void
addPortfolioItem(java.lang.String id, double value, double price, java.lang.String date, java.lang.String serialNumber, boolean isTaxItem, java.lang.Double priceAdjust, java.lang.String dateAdjust)
void
addPrice(java.lang.String id, double value)
adds a id / price pair to the list of asset prices.SettingsTables.BenchmarkRow[]
benchmark()
returns an array of benchmark asset identifier / value pairsvoid
benchmarkClear()
Types.WeightingType
benchmarkWeightingType()
returns the benchmark weighting type.void
benchmarkWeightingType(Types.WeightingType type)
sets the benchmark weighting type.SettingsTables.CompositeRow[]
composites()
Returns the composite asset portfolios that have been added.void
compositesClear()
double
defaultPortfolioValue()
returns the default portfolio value.void
defaultPortfolioValue(double value)
sets the default portfolio value.Types.ExceptionHandling
exceptionHandling()
returns the security exception handling type.void
exceptionHandling(Types.ExceptionHandling exceptionHandling)
set the security exception handling type.java.lang.String
exceptionSecurity()
return the security / composite to use in the case the "allocate to security / composite" is selected as the exception handling type.void
exceptionSecurity(java.lang.String exceptionSecurity)
set the security / composite to use in the case the "allocate to security / composite" is selected as the exception handling type.SettingsTables.PortfolioRow[]
portfolio()
returns an array of portfolio identifier / value pairs.void
portfolioClear()
Types.WeightingType
portfolioWeightingType()
returns the portfolio weighting type.void
portfolioWeightingType(Types.WeightingType type)
sets the portfolio weighting type.SettingsTables.ValueRow[]
prices()
returns an array of id / price pairs.void
pricesClear()
void
setBenchmarkItems(java.lang.String[] ids, double[] values)
sets the benchmark to an array of asset id / value pairsvoid
setPortfolioItems(java.lang.String[] ids, double[] values)
sets the initial portfolio to the array of asset id / value pairs to the initial portfolio.void
setPortfolioItems(java.lang.String[] ids, double[] values, double[] prices, java.lang.String[] dates, java.lang.String[] serialNumbers)
Adds an array of portfolio items to a taxable portfolio.void
setPrices(java.lang.String[] ids, double[] values)
sets the list of prices to an array of asset id / price pairs
-
-
-
Method Detail
-
exceptionHandling
Types.ExceptionHandling exceptionHandling()
returns the security exception handling type. what to do with assets that aren't covered by the risk model. options are "allocate to Cash", "allocate proportionally to existing securities", "allocate to security / composite".- Returns:
- exception handling type.
-
exceptionHandling
void exceptionHandling(Types.ExceptionHandling exceptionHandling)
set the security exception handling type. what to do with assets that aren't covered by the risk model. options are "allocate to Cash", "allocate proportionally to existing securities", "allocate to security / composite".- Parameters:
exceptionHandling
- exception handling type.
-
exceptionSecurity
java.lang.String exceptionSecurity()
return the security / composite to use in the case the "allocate to security / composite" is selected as the exception handling type.- Returns:
- exception handling security id.
-
exceptionSecurity
void exceptionSecurity(java.lang.String exceptionSecurity)
set the security / composite to use in the case the "allocate to security / composite" is selected as the exception handling type.- Parameters:
exceptionSecurity
- exception handling security id.
-
defaultPortfolioValue
void defaultPortfolioValue(double value)
sets the default portfolio value. valid in case the portfolio weighting type is percent, market cap or equal weight. units are base currency.- Parameters:
value
- default portfolio value. units are base currency.
-
defaultPortfolioValue
double defaultPortfolioValue()
returns the default portfolio value. valid in case the portfolio weighting type is percent, market cap or equal weight. units are base currency.- Returns:
- default portfolio value. units are base currency.
-
portfolioWeightingType
Types.WeightingType portfolioWeightingType()
returns the portfolio weighting type. valid values are percent, shares, share lots or equal weight. if share lots is selected make sure to enable taxable optimization in tax settings.- Returns:
- portfolio weighting type.
-
portfolioWeightingType
void portfolioWeightingType(Types.WeightingType type)
sets the portfolio weighting type. valid values are percent, shares, share lots or equal weight. if share lots is selected make sure to enable taxable optimization in tax settings.- Parameters:
type
- portfolio weighting type.
-
portfolio
SettingsTables.PortfolioRow[] portfolio()
returns an array of portfolio identifier / value pairs. if the portfolio type is selected, the return type is overloaded to include price at acquisition, date of acquisition, and serial number.- Returns:
- portfolio.
-
portfolioClear
void portfolioClear()
-
addPortfolioItem
void addPortfolioItem(java.lang.String id, double value)
ads an asset id / value pair to the initial portfolio- Parameters:
id
- asset idvalue
- asset value. units depend on portfolio weighting type.
-
setPortfolioItems
void setPortfolioItems(java.lang.String[] ids, double[] values)
sets the initial portfolio to the array of asset id / value pairs to the initial portfolio. arrays must be of equal length.- Parameters:
ids
- asset idsvalues
- asset values. units depend on portfolio weighting type.
-
addPortfolioItem
void addPortfolioItem(java.lang.String id, double value, double price, java.lang.String date, java.lang.String serialNumber)
Add a portfolio item to a taxable portfolio. Note that serialNumber must be provided AND it must be unique as the id can appear more than once for multiple tax lots. An illegal state exception will be thrown if tax has not been enabled on the tax properties. parameters are id, shares, price at acquisition, date at acquisition, and serial number.- Parameters:
id
- asset id.value
- asset shares.price
- price at acquisition.date
- date at acquisition. format is "YYYY/MM/DD".serialNumber
- serial number.
-
addPortfolioItem
void addPortfolioItem(java.lang.String id, double value, double price, java.lang.String date, java.lang.String serialNumber, boolean isTaxItem, java.lang.Double priceAdjust, java.lang.String dateAdjust)
-
setPortfolioItems
void setPortfolioItems(java.lang.String[] ids, double[] values, double[] prices, java.lang.String[] dates, java.lang.String[] serialNumbers)
Adds an array of portfolio items to a taxable portfolio. Note that serialNumber must be provided AND it must be unique as the id can appear more than once for multiple tax lots. An illegal state exception will be thrown if tax has not been enabled on the tax properties. parameters are id, shares, price at acquisition, date at acquisition, and serial number.- Parameters:
ids
- asset ids.values
- asset ids.prices
- prices at acquisition.dates
- dates at acquisition. format is "YYYY/MM/DD"serialNumbers
- serial numbers.
-
benchmarkWeightingType
Types.WeightingType benchmarkWeightingType()
returns the benchmark weighting type. valid values are percent, shares, market cap or equal weight.- Returns:
- benchmark weighting type.
-
benchmarkWeightingType
void benchmarkWeightingType(Types.WeightingType type)
sets the benchmark weighting type. valid values are percent, shares, market cap or equal weight.- Parameters:
type
- benchmark weighting type.
-
benchmark
SettingsTables.BenchmarkRow[] benchmark()
returns an array of benchmark asset identifier / value pairs- Returns:
- benchmark.
-
benchmarkClear
void benchmarkClear()
-
addBenchmarkItem
void addBenchmarkItem(java.lang.String id, double value)
Adds an asset identifier / value pair to the benchmark. (read:benchmark)- Parameters:
id
- asset id.value
- asset value. value unit depends on benchmark weighting type. ignored if equal weight or market cap are selected.
-
setBenchmarkItems
void setBenchmarkItems(java.lang.String[] ids, double[] values)
sets the benchmark to an array of asset id / value pairs- Parameters:
ids
- asset ids.values
- asset values. value unit depends on benchmark weighting type. ignored if equal weight or market cap are selected.
-
prices
SettingsTables.ValueRow[] prices()
returns an array of id / price pairs. units are in local currency- Returns:
- prices.
-
pricesClear
void pricesClear()
-
addPrice
void addPrice(java.lang.String id, double value)
adds a id / price pair to the list of asset prices.- Parameters:
id
- asset idvalue
- price. units are base currency.
-
setPrices
void setPrices(java.lang.String[] ids, double[] values)
sets the list of prices to an array of asset id / price pairs- Parameters:
ids
- asset ids.values
- prices. units are base currency.
-
addComposite
SettingsTables.CompositeRow addComposite(java.lang.String id, java.lang.String name, java.lang.String industryId, double price, double marketCap, Types.WeightingType weight)
add a composite asset. each composite asset row MUST be accessed after being added, in order to add composite asset portfolio id /value pairs...- Parameters:
id
- composite asset id.name
- composite asset name.industryId
- composite asset industry id.price
- composite asset price. units are in base currency.marketCap
- composite asset market cap. units are in base currency.weight
- composite asset weight type. shares, percent, equal or market cap.- Returns:
- the composite asset row. portfolio id / value pairs must be added for each constituent of the composite asset.
-
composites
SettingsTables.CompositeRow[] composites()
Returns the composite asset portfolios that have been added.- Returns:
- composite asset portfolios.
-
compositesClear
void compositesClear()
-
-