SCM

SCM Repository

[blotter] View of /pkg/quantstrat/demo/luxor-3.11.R
ViewVC logotype

View of /pkg/quantstrat/demo/luxor-3.11.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1376 - (download) (annotate)
Mon Jan 21 23:41:11 2013 UTC (6 years, 5 months ago) by milktrader
File size: 966 byte(s)
stubbed new in_test blocks
#!/usr/bin/Rscript --vanilla
#
# Jan Humme (@opentrades) - August 2012
#
# Tested and found to work correctly using blotter r1143
#
# From Jaekle & Tamasini: A new approach to system development and portfolio optimisation (ISBN 978-1-905641-79-6)
#
# Figure 3.11: MAE graph of Luxor system

require('blotter')

data('luxor-p066', package='quantstrat', envir=.blotter)

currency(c('GBP', 'USD'))
exchange_rate(c('GBPUSD'), tick_size=0.0001)

chart.ME('luxor', 'GBPUSD', type='MAE', scale='cash')

##### 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