Package nis.svc.opt.api
Interface ProjectSettings.TaxSettings
-
- Enclosing interface:
- ProjectSettings
public static interface ProjectSettings.TaxSettings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
aggressiveTaxLossHarvesting()
Get Aggressive Tax Loss Harvesting setting.void
aggressiveTaxLossHarvesting(boolean yesNo)
Set Aggressive Tax Loss Harvesting setting.boolean
capitalGainSeparation()
Returns whether capital gains separation is applied.void
capitalGainSeparation(boolean yesNo)
Sets the capital gains separation option.boolean
enableTaxes()
Returns whether the enablesTaxes option has been set or not.void
enableTaxes(boolean yesNo)
Sets whether this optimizer project has tax features activated.boolean
investTaxRefund()
Returns "true" if the optimizer is allowed to invest any tax loss harvestedvoid
investTaxRefund(boolean yesNo)
Sets whether the optimizer is allowed to reinvest any tax loss harvested.double
longTermCapitalGainYTD()
Returns the long term capital gain YTDvoid
longTermCapitalGainYTD(double value)
Sets the long term capital gain YTDint
longTermGainMinNbrDays()
Returns the minimum number of days required for long term capital gains to be applied to a tax lotvoid
longTermGainMinNbrDays(int days)
Sets the minimum number of days for a tax lot to incur long term capital gainsdouble
longTermGainRate()
Returns the long term capital gains ratevoid
longTermGainRate(double rate)
Sets the long term capital gain rate - units are percentTypes.LotsOrderType
lotsOrder()
Returns the lot order.void
lotsOrder(Types.LotsOrderType type)
Sets the lot order.double
maximumCapitalGains()
Returns the maximum capital gains allowed.void
maximumCapitalGains(double value)
Sets the maximum capital gains allowed - units are in base currency.double
netCapitalGainsYTD()
Returns the net capital gain that's been realized or lost in the tax-year to date - units are in base currencyvoid
netCapitalGainsYTD(double value)
Set the net capital gain that's been realized or lost in the tax-year to date - units are in base currencyboolean
shortShort()
Returns true if the optimizer is to treat all short positions as short term for capital gains purposesvoid
shortShort(boolean yesNo)
Sets whether the optimizer is to treat all short position as short term for capital gains purposesdouble
shortTermCapitalGainYTD()
Returns the short term capital gain YTDvoid
shortTermCapitalGainYTD(double value)
Sets the short term Capital Gain YTDdouble
shortTermGainRate()
Returns the short term capital gain.void
shortTermGainRate(double rate)
Sets the short term capital gain rate - units are percentboolean
taxOverrideFunctions()
Returns the tax override functions optionvoid
taxOverrideFunctions(boolean yesNo)
Sets the tax override functions optionjava.lang.String
tradeDate()
Returns the trade datevoid
tradeDate(java.lang.String date)
Sets the trade date.int
washSaleLimit()
Returns the wash sale limit - number of days the investor must wait after selling a stock before he can buy it back and still qualify for realized capital lossvoid
washSaleLimit(int days)
Sets the number of days the investor must wait after selling a stock before he can buy it back and still qualify for realized capital lossTypes.WashSaleType
washSalesRules()
Get wash sales rule type.void
washSalesRules(Types.WashSaleType type)
Set wash sales rule type.
-
-
-
Method Detail
-
enableTaxes
boolean enableTaxes()
Returns whether the enablesTaxes option has been set or not. Set to false by default.- Returns:
- true if enableTaxes has been set to true; false otherwise.
-
enableTaxes
void enableTaxes(boolean yesNo)
Sets whether this optimizer project has tax features activated. If this option is set then portfolio data should be loaded as date stamped tax lots.- Parameters:
yesNo
- enable or disable the optimizer tax option.
-
tradeDate
java.lang.String tradeDate()
Returns the trade date- Returns:
- the trade date as a string in MM/DD/YYYY...
-
tradeDate
void tradeDate(java.lang.String date)
Sets the trade date. The optimizer uses a trade date to calculate capital gain on share lots.- Parameters:
date
- trade date. format is MM/DD/YYYY
-
shortTermGainRate
double shortTermGainRate()
Returns the short term capital gain.- Returns:
- the short term capital gain rate in percent.
-
shortTermGainRate
void shortTermGainRate(double rate)
Sets the short term capital gain rate - units are percent- Parameters:
rate
- the short term capital gains rate. use percent values
-
longTermGainRate
double longTermGainRate()
Returns the long term capital gains rate- Returns:
- returns the long term capital gains rate in percent.
-
longTermGainRate
void longTermGainRate(double rate)
Sets the long term capital gain rate - units are percent- Parameters:
rate
- long term capital gain rate - use percent values
-
longTermGainMinNbrDays
void longTermGainMinNbrDays(int days)
Sets the minimum number of days for a tax lot to incur long term capital gains- Parameters:
days
- minimum number of days.
-
longTermGainMinNbrDays
int longTermGainMinNbrDays()
Returns the minimum number of days required for long term capital gains to be applied to a tax lot- Returns:
- minimum number of days
-
maximumCapitalGains
double maximumCapitalGains()
Returns the maximum capital gains allowed.- Returns:
- maximum capital gains allowed - units are in base currency.
-
maximumCapitalGains
void maximumCapitalGains(double value)
Sets the maximum capital gains allowed - units are in base currency.- Parameters:
value
- maximum capital gains - units are in base currency.
-
washSaleLimit
void washSaleLimit(int days)
Sets the number of days the investor must wait after selling a stock before he can buy it back and still qualify for realized capital loss- Parameters:
days
-
-
washSaleLimit
int washSaleLimit()
Returns the wash sale limit - number of days the investor must wait after selling a stock before he can buy it back and still qualify for realized capital loss- Returns:
- wash sale limit
-
investTaxRefund
boolean investTaxRefund()
Returns "true" if the optimizer is allowed to invest any tax loss harvested- Returns:
- invest tax refund. true if option is selected; false if not.
-
investTaxRefund
void investTaxRefund(boolean yesNo)
Sets whether the optimizer is allowed to reinvest any tax loss harvested. if not it's put into cash- Parameters:
yesNo
- invest tax refund. true if option is selected; false if not.
-
shortShort
boolean shortShort()
Returns true if the optimizer is to treat all short positions as short term for capital gains purposes- Returns:
- short short. true if option is selected; false if not.
-
shortShort
void shortShort(boolean yesNo)
Sets whether the optimizer is to treat all short position as short term for capital gains purposes- Parameters:
yesNo
- short short. true if option is selected; fals if not.
-
netCapitalGainsYTD
double netCapitalGainsYTD()
Returns the net capital gain that's been realized or lost in the tax-year to date - units are in base currency- Returns:
- net capital gains YTD. units are base currency.
-
netCapitalGainsYTD
void netCapitalGainsYTD(double value)
Set the net capital gain that's been realized or lost in the tax-year to date - units are in base currency- Parameters:
value
- net capital gains YTD. units are base currency.
-
taxOverrideFunctions
boolean taxOverrideFunctions()
Returns the tax override functions option- Returns:
- true if option is selected; false if not.
-
taxOverrideFunctions
void taxOverrideFunctions(boolean yesNo)
Sets the tax override functions option- Parameters:
yesNo
- tax override functions. true if option is selected; false if not.
-
washSalesRules
void washSalesRules(Types.WashSaleType type)
Set wash sales rule type.- Parameters:
type
-
-
washSalesRules
Types.WashSaleType washSalesRules()
Get wash sales rule type.- Returns:
- type
-
lotsOrder
Types.LotsOrderType lotsOrder()
Returns the lot order. values can be "normal" "FIFO" "LIFO" "HIFO". "normal" sells the tax lots that incur the least cost after applying capital gains tax. the others give the option to use standard accounting "first in first out" etc..- Returns:
- lot order type.
-
lotsOrder
void lotsOrder(Types.LotsOrderType type)
Sets the lot order. values can be "normal" "FIFO" "LIFO" "HIFO". "normal" sells the tax lots that incur the least cost after applying capital gains tax. the others give the option to use standard accounting "first in first out" etc..- Parameters:
type
- lots order type.
-
aggressiveTaxLossHarvesting
boolean aggressiveTaxLossHarvesting()
Get Aggressive Tax Loss Harvesting setting.- Returns:
- value
-
aggressiveTaxLossHarvesting
void aggressiveTaxLossHarvesting(boolean yesNo)
Set Aggressive Tax Loss Harvesting setting.- Parameters:
yesNo
-
-
capitalGainSeparation
boolean capitalGainSeparation()
Returns whether capital gains separation is applied. This allows one to differentiate between short and long term capital gains YTD- Returns:
- capital gains separation. true if option is selected. false if not.
-
capitalGainSeparation
void capitalGainSeparation(boolean yesNo)
Sets the capital gains separation option. a "true" value allows one to differentiate between short and long term capital gains YTD- Parameters:
yesNo
- capital gains separation. true if selected, false if not.
-
shortTermCapitalGainYTD
double shortTermCapitalGainYTD()
Returns the short term capital gain YTD- Returns:
- shot term capital gain YTD. units are base currency.
-
shortTermCapitalGainYTD
void shortTermCapitalGainYTD(double value)
Sets the short term Capital Gain YTD- Parameters:
value
- short term capital gain YTD. units are base currency.
-
longTermCapitalGainYTD
double longTermCapitalGainYTD()
Returns the long term capital gain YTD- Returns:
- long term capital gain YTD. units are base currency.
-
longTermCapitalGainYTD
void longTermCapitalGainYTD(double value)
Sets the long term capital gain YTD- Parameters:
value
- long term capital gain YTD. units are base currency
-
-