Changes in version 1.06 (2013-04-29)
New Features
- There is a new constraint argument called
min.weight.thresh. This gives the minimum weight allowed in a long-only portfolio for assets that are in the portfolio. It can only be a single number, and it is ignored for long-short portfolios. - Cumulative returns are now available in
valuation. That is, returns relative to the first time point rather than the immediately preceding time. updatefor random portfolio objects can take the argumenttrade.optimizer=TRUEto get an optimized portfolio for the problem. Likewise, sayrandom.portfolio=TRUEinupdateon an optimized portfolio object to get random portfolios.
Changes
- The result of
trade.distancenow has anasset.countattribute that gives the number of assets unique to each portfolio and the number common to both. randport.evalis now faster (by evading a lot of redundant calculation).valuationfor random portfolios is sped up (computations moved to C) in some cases.- Default names of expected returns and variances now start at 1 rather than 0.
- False progress in optimization (no real change but the objective is smaller due to numerical error) is now detected.
- Random portfolio objects gain a
trade.portfolioattribute that allowsrandport.evalnot to have to guess about the default value of theout.tradeargument. - Various minor improvements in error handling and warning.
- Prices can now be an
xtsorzooobject without becoming as troublesome.
Bug Fixes
- When turnover was specified to have a minimum value but no actual maximum constraint, no turnover constraint was imposed.
valuationhad problems in some cases creating returns when the prices had only 2 time points.randport.evalless frequently gets the utility wrong when the optimization problem is less than obvious.trade.distancecould give a bogus answer when given a list without the proper structure.- Inputs were not checked in
updatefor random portfolios as intended. - If an asset had an implicitly forced trade due to its weight in the existing portfolio being too large for the maximum weight and there was also a forced trade implied by
positions, then thepositionstrade was used even if the other one was larger. random.portfolio.utilityproduced 2 random portfolios when only 1 was asked for.
Deprecated
- The automatic specification of polynomial trading costs — that is, multi-column specification of costs with
cost.parnot given — is deprecated.
Changes in version 1.05 (2012-06-22)
Changes
- The
risk.fractionargument can now accept a list where each component is for a different constraint (variance-benchmark-style combination). This makes it so a three-dimensional array doesn’t need to be explicitly created when there are multiple risk fraction constraints. build.constraintscan now take a list of constraints where the assets are not necessarily the same (or in the same order).
Bug Fixes
- In previous versions when forced trades satisfied all the constraints, all random portfolios were the same — not very random.
- The
constraints.realizedfunction has been revised so that it properly reports on additional constraints. - Due essentially to a typo, some portfolio optimizations wasted a lot of time. These were problems where the number of assets traded was restricted to be 25 or fewer. Random portfolio generation with variance constraints was also affected.
Changes in version 1.04 (2012-04-17)
Backward Compatibility Issues
- The default for
lin.absis nowTRUE. There is a warning about this if it could be a problem. - Some components of the output of
trade.optimizer(lin.styleand friends) are now in thelin.tablecomponent. There is also adist.tablecomponent (for distances). - The default value of the
collapseargument invaluation.randportBurSthas changed fromFALSEtoFALSEonly ifpricesis not a matrix (or array). - The default value of
cashinvaluationmethods has changed (to be what was intended but not computed or stated). - The default and optimized portfolio methods of
valuationfailed to respect theweightargument whencollapsewasTRUE. - The default value for
weighthas changed for the default and optimized portfolio methods ofvaluation, but the default behavior remains the same. - The trade-past-zero feature for trading costs now only applies to linear costs, and so
doubleconstis no longer used.
Some more details are in the Portfolio Probe 1.04 backward compatibility document
New Features
- Linear constraints are now available on the fraction and value of variance attributed to categories of assets (sectors, for example).
- There is a variety of
risk.fractionchoices now (via therf.styleargument), including the correlation of each asset to the portfolio. - The new argument
ucostmakes it more convenient to align costs with the other parts of the utility. cost.parcan now be a matrix where rows correspond to assets so that each asset may have its own exponents in the trading costs.- The
valuationfunction has been expanded:
- it will return simple and log returns
- it allows
pricesto be a three-dimensional array- it will give valuations, weights and returns for categories of assets (sectors, for example)
- it gains the
all.assetsargument that easily produces weight vectors of a whole universe including zero weight assets
- A namespace has been added to the R package.
Changes
- The
sum.weightargument now allows lower bounds (via a two-column matrix) as well as upper bounds. timestampin the result oftrade.optimizerandrandom.portfolionow includes the start time of the call as well as the ending time.- The strings given to
keepinrandport.evalno longer need to exactly match the component names on the result oftrade.optimizer— they can be abbreviated. randport.evalandupdate.randportBurStgain anenvirargument so gymnastics are no longer necessary when they are called from within a function.deportnow accepts a file name of zero characters (the empty string) as meaning to print to R (or S+).- The
existingargument now accepts a random portfolio object of length one. - Names now appear on the
alpha.valuesandvar.valuescomponents of the output oftrade.optimizer. - The
seedargument now accepts a single integer. random.portfoliowill now acceptntrade=1. Previouslyntradeneeded to be at least 2 (for no apparent reason).- It is now much harder to get in trouble when you have an asset with zero variance.
- A better error message is now given when short positions are forced into a long-only portfolio.
- There’s a better error message if
positions(probably unintentionally) forces too many assets into the portfolio. - You’ll not care, but
headandtailof a random portfolio object set thefunevalsto a missing value. - Various minor improvements in error handling and warnings.
Bug Fixes
- Fixed 1.03 bug regarding risk fractions and existing portfolios.
- Fixed 1.03 bug of problems when
trade.optimizerwas called from within a function. - Fixed 1.03 bug in which
summarycould falsely report a linear constraint violation (infinite bounds were involved). - Giving non-integer values to
lower.tradeorupper.tradeallowed non-integer trading in unintended circumstances. - There was a problem when an exact non-integer forced trade was done and
stringencywas greater than zero. - Fixed a bug (apparently very rare) where a valid random portfolio was found, but an invalid one returned.
randport.evalfailed when thecontrolargument was given in therandom.portfoliocall.- there was a problem with infinite values in
positionswhen it had no asset names on it. - A non-tradeable benchmark was not counted in the portfolio value (its price was set to zero).
- The maximum information ratio utility could use the wrong variance and/or expected returns in certain circumstances. The bug only triggered if there were multiple variance and/or expected returns and a single utility value was requested.
- Fixed 1.03 buglet where
printhad all forced trades inforced.explicitrather than just the explicit ones.
New Bugs
constraints.realizedcan be a little confused when evaluated with additional linear constraints.
Changes in version 1.03 (2011-04-11)
New Features
- Added risk.fraction argument which constrains the fraction of variance attributed to individual assets.
- Added bench.weights argument which specifies the weights of assets in benchmarks. This is required if there are risk.fraction constraints involving benchmarks. But it also allows benchmarks to be added automatically to the variance and expected returns even if there are no risk fraction constraints.
Changes
- There is now a warning if it appears that the variance is unreasonably small when the information ratio is being maximized (for instance, if the benchmark can be reproduced exactly). The do.warn item to suppress the warning is var.eps.
- An error is now thrown if a variance matrix is not symmetric since this leads to confusion in the algorithm.
- If there is more than one benchmark, then the utilities that are created (in utable) are now more logical. The former behavior can be recovered by specifying a utable argument.
- The occurrence of more than one zero in the diagonal of a variance is now a warning rather than an error. Suppression of the warning is with the do.warn item zero.variance.
- Various minor improvements in error handling and warnings.
Bug Fixes
- Assets that had a forced trade were way too likely to be at the value of the forced trade in random portfolios. There were some additional changes that might improve the uniformity of the generation process.
- Thresholding could get confused in an extreme case.
- In rare circumstances there was the possibility of a short position being allowed in a long-only portfolio (which throws an error).
- An uninitialized variable problem was found.
Changes in version 1.02 (2010-11-18)
New Features
- Added weighted sum of squares option for distances.
Changes
- valuation.portfolBurSt and valuation.default now work for price matrices. The collapse argument and its relatives have been added to these functions.
- constraints.realized.lin has better functionality in rare circumstances.
- Benchmark identities are now put on the appropriate elements of the output components var.values and alpha.values of trade.optimizer.
Bug Fixes
- An alpha constraint when no variance was given caused a system terminating — fatal error, trivial fix.
- There was a bug when a benchmark constraint was imposed with a maximum return utility.
- Some error messages are improved.
- A nicety when turnover is set to zero.
Changes in version 1.01 (2010-05-19)
New Features
- Distance constraints and utility added to
random.portfolioandtrade.optimizer. This involves a few new arguments. - Related to this,
constraint.realizednow returns a list with (possibly) a linear component (what it previously returned) and a distance component. Empty components are not in the return value. trade.distancewill now accept a weight vector as one or both of the first two arguments ifscale="weight".
Changes
- Parameter settings have been changed to possibly slightly speed up the generation of random portfolios.
- Various minor improvements in error handling and warning.
Bug Fixes
update.randportBurStcould fail trying to check input when it didn’t have the input.- Some C code fixes to avoid possible rare errors and stupidities.
