13.07.2015 Views

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

170 ACTA WASAENSIAAAppendixA1Matlab code for replication of the simulation study byLux & Marchesi1 function returns = LM2000(T)2 % LM2000 replicates Lux/Marchesi (2000) IJTAF 3(4), 675-7023 % SYNTAX: RETURNS = LM2000(T)4 % INPUT: T = scalar number of return observations to simulate5 % OUTPUT: RETURNS = (T*1) simulated logreturns6 %7 % NOTE: Choice of parameter set by uncommenting (that is,8 % removing the leading % in front of) the relevant9 % block titled ’Parameter set I’ to ’Parameter set IV’.10 %11 % written by Bernd Pape, University of Vaasa, Finland1213 tic; %start clock1415 % initialize random variables (Statistics Toolbox User Guide p. 2-11)16 state = 137;17 rand(’state’, state);18 randn(’state’, state);192021 % Technical parameters2223 steps = 500; %number of microsteps per integer time step24 plag = 100; %number of microsteps in determination of pdot252627 % Constant model parameters:2829 N = 500; %number of agents30 nmin = 4; %minimum number of agents in each strategy31 pf = 10; %fundamental price32 r = 0.004; %nominal dividends of the asset33 R = 0.0004; %ecomonies’ average rate of return343536 % Parameter set I:3738 v1 = 3; %integer time frequency of optimist/pessimist revaluation39 v2= 2; %integer time frequency of chartist/fundament. revaluation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!