SCM

SCM Repository

[blotter] Annotation of /pkg/quantstrat/demo/luxor.sample.MAE.stoploss.R
ViewVC logotype

Annotation of /pkg/quantstrat/demo/luxor.sample.MAE.stoploss.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1457 - (view) (download)

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

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