A Framework for Integrating Portfolio-level Backtesting with Price and Quantity Information

Kyle Balkissoon
May 25th 2015

Built with Rpres

Why are you doing this?

  • Asset management strategies in weight space neglect the frictions of price and quantity, by mapping them into transactions we can account for frictions and also generate more realistic backtests, simulating their performance on different amounts of starting capital can give investors more realistic expectations of performance.
  • Return space backtests may not map to actual transactions, by mapping them to transactions we can break out the required orders and also generate two layers of analytics (Price Space and Quantity Space).

Integrating PortfolioAnalytics and Blotter

  • By using the PortfolioAnalytics optimize.portfolio suite and the blotter method for recording transactions and holdings we can account for trades required to rebalance a portfolio and even impose round lots.
  • This simply allows users to get a transaction level analysis to portfolio style backtests.
  • This could help give validation to portfolio style backtests by having them map to actual transactions and would calculate performance closer to an actual account.

Integrating PortfolioAnalytics and Blotter

  • Simple methodology, map optimize.Portfolio to round lots, generate txn's based on equity and current holdings to desired round lot portfolio.
  • Gives trading like analytics using chart.Posn, tradeStats.
  • This allows users to have portfolio style backtesting, however with the ability to break down statistics using the full power of blotter/quantstrat and performanceanalytics to give analysis in both trade space and portfolio space.

Example (GMV)

  • Archetypal minimum variance using PortfolioAnalytics.
  • 11 Etfs (9 SPDRS, TLT, GLD).
  • Two Cases, $100,000 portfolio and $1bn Portfolio.
  • No leverage, full investment.
  • Round to nearest lot size (100 unit lots).
  • Allocate cash simply among remaining investments iteratively from largest weight gap to smallest.

Tracking error of 18bps on a 1B Portfolio vs 139 bps on $100,000K

  • This gives a very large difference in performance using similar methodology.
  • Too small of a difference that graphs show anything.
  • Can be a big performanace variation for SMAs.

1BN Portfolio

plot of chunk unnamed-chunk-1

100K Portfolio

plot of chunk unnamed-chunk-2

A Chart.Posn like this one can be generated for each symbol

  • Also any other analytics in quantstrat/blotter/PerformanceAnalytics/PortfolioAnalytics may be used (where applicable).