SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1376 - (view) (download)

1 : opentrades 1138 #!/usr/bin/Rscript --vanilla
2 :     #
3 :     # Jan Humme (@opentrades) - August 2012
4 :     #
5 : opentrades 1144 # Tested and found to work correctly using blotter r1143
6 : opentrades 1138 #
7 : opentrades 1144 # From Jaekle & Tamasini: A new approach to system development and portfolio optimisation (ISBN 978-1-905641-79-6)
8 : opentrades 1138 #
9 :     # Figure 3.11: MAE graph of Luxor system
10 :    
11 : opentrades 1144 require('blotter')
12 : opentrades 1138
13 : opentrades 1144 data('luxor-p066', package='quantstrat', envir=.blotter)
14 : opentrades 1138
15 : braverock 1172 currency(c('GBP', 'USD'))
16 :     exchange_rate(c('GBPUSD'), tick_size=0.0001)
17 :    
18 : opentrades 1261 chart.ME('luxor', 'GBPUSD', type='MAE', scale='cash')
19 : milktrader 1370
20 : milktrader 1376 ##### PLACE DEMO AND TEST DATES HERE #################
21 :     #
22 :     #if(isTRUE(options('in_test')$in_test))
23 :     # # use test dates
24 :     # {initDate="2011-01-01"
25 :     # endDate="2012-12-31"
26 :     # } else
27 :     # # use demo defaults
28 :     # {initDate="1999-12-31"
29 :     # endDate=Sys.Date()}
30 : milktrader 1370
31 :     ##### PLACE THIS BLOCK AT END OF DEMO SCRIPT ###################
32 :     # book = getOrderBook(port)
33 :     # stats = tradeStats(port)
34 :     # rets = PortfReturns(acct)
35 :     ################################################################

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