SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 663 - (view) (download)

1 : cyrforge 663 # TODO: Add comment
2 :     #
3 :     # Author: CCD
4 :     ###############################################################################
5 :    
6 :    
7 :    
8 :     #please run macd demo before all these...
9 :     paramStructure<-getParameterTable(stratMACD)
10 :    
11 :     tPD2<-setParameterDistribution()
12 :     tPD2
13 :    
14 :     # Just provide leagal values and use random sampling.
15 :     tPD2<-setParameterDistribution(tPD2,'indicator',indexnum=1,distribution=list(nFast=(10:30)),label='nFast')
16 :     #make them over lap from 20 to 30 to test.
17 :     tPD2<-setParameterDistribution(tPD2,'indicator',indexnum=1,distribution=list(nSlow=(20:40)),label='nSlow')
18 :     tPD2<-setParameterDistribution(tPD2,'signal',indexnum=1,distribution=list(relationship=c('gt','gte')),label='sig1.gtgte')
19 :    
20 :     pConstraint2<-setParameterConstraint(constraintLabel='macdPC',paramList=c('nFast','nSlow'),relationship='lt')
21 :    
22 :     testPackList2<-applyParameter(strategy=stratMACD,portfolios=portfolio.st,parameterPool=tPD2,method='random',sampleSize=3,parameterConstrains=pConstraint2)
23 :    
24 :    

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