SCM

SCM Repository

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

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

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

revision 691, Thu Jul 21 22:58:38 2011 UTC revision 692, Thu Jul 21 23:00:07 2011 UTC
# Line 3  Line 3 
3  # Author: CCD  # Author: CCD
4  ###############################################################################  ###############################################################################
5    
6    require(foreach)
7    require(doSMP)
8    workers <- startWorkers(2)
9    registerDoSMP(workers)
10    
11    
12  source("D:\\Documents\\GoogleCode\\Workspace\\quantstrat\\R\\parameters.R")  source("D:\\Documents\\GoogleCode\\Workspace\\quantstrat\\R\\parameters.R")
13    
14  #please run macd demo before all these...  #please run macd demo before all these...
# Line 24  Line 30 
30  #testPackList2<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=3,parameterConstrains=pConstraint2)  #testPackList2<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=3,parameterConstrains=pConstraint2)
31  #system.time(testPackList2<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=3,parameterConstrains=pConstraint2))  #system.time(testPackList2<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=3,parameterConstrains=pConstraint2))
32    
 require(foreach)  
 require(doSMP)  
 #  
 #workers <- startWorkers(2) # My computer has 2 cores  
 #registerDoSMP(workers)  
33    
34  laststpar<-system.time(testPackList3<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=2,parameterConstrains=pConstraint2))  laststpar<-system.time(
35                    testPackListPL<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=10,parameterConstrains=pConstraint2)
36    )
37  laststpar  laststpar
38  #  #
39  #stopWorkers(workers)  #stopWorkers(workers)

Legend:
Removed from v.691  
changed lines
  Added in v.692

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