SCM

SCM Repository

[blotter] Diff of /pkg/quantstrat/demo/macdParameters.R
ViewVC logotype

Diff of /pkg/quantstrat/demo/macdParameters.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 962, Sun Mar 4 20:09:15 2012 UTC revision 1095, Sat Jun 30 21:33:50 2012 UTC
# Line 8  Line 8 
8    
9  demo('macd',ask=FALSE)  demo('macd',ask=FALSE)
10    
11  # example parallel initialization for doSMP, doParallel, doMC, or doRedis are  # example parallel initialization for doParallel. this or doMC, or doRedis are
12  # most probably preferable to doSMP  # most probably preferable to doSMP
13  #require(doSMP)  #require(doParallel)
14  #workers <- startWorkers(2)  #registerDoParallel() # by default number of physical cores -1
15  #registerDoSMP(workers)  
16    
17  #please run macd demo before all these...  #please run macd demo before all these...
18    
19    #retrieve the strategy from the environment, since the 'macd' strategy uses store=TRUE
20    stratMACD<-getStrategy('macd')
21    
22  paramStructure<-getParameterTable(stratMACD)  paramStructure<-getParameterTable(stratMACD)
23    
24  rm(tPD2)  rm(tPD2)
# Line 45  Line 49 
49  laststpar.rnd<-system.time(  laststpar.rnd<-system.time(
50                  testPackListPL<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=20,parameterConstraints=pConstraint2)                  testPackListPL<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=20,parameterConstraints=pConstraint2)
51  )  )
52  laststpar.rnd  #laststpar.rnd
53    
54  # Please run either random mode or expand mode, since the latter run will overwrite the objects in .blotter.  # Please run either random mode or expand mode, since the latter run will overwrite the objects in .blotter.
55  #laststpar.exp<-system.time(  #laststpar.exp<-system.time(

Legend:
Removed from v.962  
changed lines
  Added in v.1095

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