SCM

SCM Repository

[blotter] View of /pkg/quantstrat/demo/luxor.sample.walk.forward.R
ViewVC logotype

View of /pkg/quantstrat/demo/luxor.sample.walk.forward.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1718 - (download) (annotate)
Sun Nov 15 17:08:44 2015 UTC (3 years, 7 months ago) by bodanker
File size: 861 byte(s)
Use xts:::plot.xts for walk-forward analysis

The chart.forward.* functions still used the plot.xts API from xtsExtra
from before Ross Bennett's GSoC work. Update them to use the current
API defined by xts:::plot.xts.

Thanks to Alex Alias for the report and patch.
#!/usr/bin/Rscript --vanilla
#
# Jan Humme (@opentrades) - August 2012
#
# Tested and found to work correctly using blotter r1457
#
# After Jaekle & Tamasini: A new approach to system development and portfolio optimisation (ISBN 978-1-905641-79-6)
#
# Walk forward chart sample

require('quantstrat')

chart.forward.training(paste0(path.package("quantstrat"),'/data/luxor.wfa.ples.RData'))

##### PLACE DEMO AND TEST DATES HERE #################
#
#if(isTRUE(options('in_test')$in_test))
#  # use test dates
#  {initDate="2011-01-01" 
#  endDate="2012-12-31"   
#  } else
#  # use demo defaults
#  {initDate="1999-12-31"
#  endDate=Sys.Date()}

##### PLACE THIS BLOCK AT END OF DEMO SCRIPT ################### 
# book  = getOrderBook(port)
# stats = tradeStats(port)
# rets  = PortfReturns(acct)
################################################################

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge