⇤ ← Revision 1 as of 2008-07-13 12:12:54
Size: 2314
Comment:
|
Size: 2452
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 42: | Line 42: |
* It is the solution function provide by each participant that permits to compute {{{yt}}} and {{{ytp1}}} from {{{ytm1}}} and {{{e}}}. |
Testing program for problem A
List of tests
- accuracy on a sphere in the state space
- accuracy on a stochastic simulation
- Den Haan Marcet statistique
SVN archive
Archive name: http://www.cepremap.cnrs.fr/svn/JedcTestSuiteTestsA
Content
Cuba-1.3: a mutlidimensional integration library http://www.feynarts.de/cuba/ (version 1.4 is available)
RandomLib: a random generator library using Mersenne Twister http://charles.karney.info/random/
SamplePack: low discrepancy sequences http://www.uni-kl.de/AG-Heinrich/SamplePack.html
burkardt: code for Niederreiter sequences http://people.scs.fsu.edu/~burkardt/cpp_src/niederreiter2/niederreiter2.html
[:KkK:kkk:]: the solutions computed by Kim, Kim, Kollmann
[:KkM:kkm:]: the solutions computed by Kubler, Krueger and Malin
libseq_beta_04.21.01: low dicrepancy sequence library http://www.multires.caltech.edu/software/libseq/
[:Parser.Src:parser.src:]: Dynare parser code + libraries from dynare++ + testing code
- testing: beginning of testing code (code for transforming polar to Euclydian coordinates)
Comments
- My original idea was to use Dynare parser to generate the model to be tested. I think now it is unecessarily complicated. It is simpler to code the models directly in C++, providing for the changes in spefications and parameter values.
- The model is made of forward looking, backward looking and static equations
- for backward looking and static equations, it is sufficient to return the residual of the equation
- for forward looking equations, we need both the conditional expectation of the residual (tests 1 and 2) and the residual for a given value of next period variables (den Haan Marcet statistic). It is therefore necessary to factorize all the elements of the equation that don't need to be integrated and write in another function the part of the equation that needs integration.
Example
void error(ytm1,yt,frwd_part,e,params,error) { error[0] = yt[1] - params[0]*ytm1[1]-e[0]; error[1] = yt[0] - params[1]*frwd_part[0]; } void forward_part(ytm1,yt,ytp1,e,params,frwd) { frwd_part[0] = ytp1[0]*ytp1[1]; }
then forward_part can be integrated as needed over the distribution of ytp1
It is the solution function provide by each participant that permits to compute yt and ytp1 from ytm1 and e.