Change log

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.
  • update for random portfolio objects can take the argument trade.optimizer=TRUE to get an optimized portfolio for the problem.  Likewise, say random.portfolio=TRUE in update on an optimized portfolio object to get random portfolios.

Changes

  • The result of trade.distance now has an asset.count attribute that gives the number of assets unique to each portfolio and the number common to both.
  • randport.eval is now faster (by evading a lot of redundant calculation).
  • valuation for 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.portfolio attribute that allows randport.eval not to have to guess about the default value of the out.trade argument.
  • Various minor improvements in error handling and warning.
  • Prices can now be an xts or zoo object 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.
  • valuation had problems in some cases creating returns when the prices had only 2 time points.
  • randport.eval less frequently gets the utility wrong when the optimization problem is less than obvious.
  • trade.distance could give a bogus answer when given a list without the proper structure.
  • Inputs were not checked in update for 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 the positions trade was used even if the other one was larger.
  • random.portfolio.utility produced 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.par not given — is deprecated.

Changes in version 1.05 (2012-06-22)

Changes

  • The risk.fraction argument 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.constraints can 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.realized function 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.abs is now TRUE.  There is a warning about this if it could be a problem.
  • Some components of the output of trade.optimizer (lin.style and friends) are now in the lin.table component.  There is also a dist.table component (for distances).
  • The default value of the collapse argument in valuation.randportBurSt has changed from FALSE to FALSE only if prices is not a matrix (or array).
  • The default value of cash in valuation methods has changed (to be what was intended but not computed or stated).
  • The default and optimized portfolio methods of valuation failed to respect the weight argument when collapse was TRUE.
  • The default value for weight has changed for the default and optimized portfolio methods of valuation, but the default behavior remains the same.
  • The trade-past-zero feature for trading costs now only applies to linear costs, and so doubleconst is 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.fraction choices now (via the rf.style argument), including the correlation of each asset to the portfolio.
  • The new argument ucost makes it more convenient to align costs with the other parts of the utility.
  • cost.par can now be a matrix where rows correspond to assets so that each asset may have its own exponents in the trading costs.
  • The valuation function has been expanded:
  1. it will return simple and log returns
  2. it allows prices to be a three-dimensional array
  3. it will give valuations, weights and returns for categories of assets (sectors, for example)
  4. it gains the all.assets argument 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.weight argument now allows lower bounds (via a two-column matrix) as well as upper bounds.
  • timestamp in the result of trade.optimizer and random.portfolio now includes the start time of the call as well as the ending time.
  • The strings given to keep in randport.eval no longer need to exactly match the component names on the result of trade.optimizer — they can be abbreviated.
  • randport.eval and update.randportBurSt gain an envir argument so gymnastics are no longer necessary when they are called from within a function.
  • deport now accepts a file name of zero characters (the empty string) as meaning to print to R (or S+).
  • The existing argument now accepts a random portfolio object of length one.
  • Names now appear on the alpha.values and var.values components of the output of trade.optimizer.
  • The seed argument now accepts a single integer.
  • random.portfolio will now accept ntrade=1.  Previously ntrade needed 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 head and tail of a random portfolio object set the funevals to 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.optimizer was called from within a function.
  • Fixed 1.03 bug in which summary could falsely report a linear constraint violation (infinite bounds were involved).
  • Giving non-integer values to lower.trade or upper.trade allowed non-integer trading in unintended circumstances.
  • There was a problem when an exact non-integer forced trade was done and stringency was greater than zero.
  • Fixed a bug (apparently very rare) where a valid random portfolio was found, but an invalid one returned.
  • randport.eval failed when the control argument was given in the random.portfolio call.
  • there was a problem with infinite values in positions when 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 print had all forced trades in forced.explicit rather than just the explicit ones.

New Bugs

  • constraints.realized can 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.portfolio and trade.optimizer.  This involves a few new arguments.
  • Related to this, constraint.realized now 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.distance will now accept a weight vector as one or both of the first two arguments if scale="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.randportBurSt could fail trying to check input when it didn’t have the input.
  • Some C code fixes to avoid possible rare errors and stupidities.