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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ACTA WASAENSIA 18944 nf=zeros(1,2); %(1*2) vector of current fundamentalist populations45 dnf=zeros(1,2); %(1*2) increments in fundam. pop’s at microstep46 nfhist=zeros(T,2); %(T*2) history of fundamentalist populations4748 pmat=zeros(6,2); %(6*2) strategy transition prob’s in stocks49 dnmat=zeros(6,2); %(6*2) stockinvestors changing strategy50 %Entries in the matrices above:51 % c1->c2 c2->c152 % f1->f2 f2->f153 % c1->f1 f1->c154 % c2->f2 f2->c255 % c1->f2 f2->c156 % c2->f1 f1->c25758 pbmat = zeros(4,2); %(4*2) transitions between bonds and stocks59 dnbmat= zeros(4,2); %(4*2) traders switching betw. bonds/ stocks60 %Entries in the matrices above:61 % b ->c1 c1 -> b62 % b ->c2 c2 -> b63 % b ->f1 f1 -> b64 % b ->f2 f2 -> b656667 % Initialize random variables (Statistics Toolbox User Guide p. 2-11)6869 state = 137;70 rand(’state’, state);71 randn(’state’, state);727374 % Initialize strategy populations at equilibrium7576 nc0=fix(N*ones(1,2)/8); nc=nc0; %round towards lower integer77 nf0=ceil(N*ones(1,2)/8); nf=nf0; %round towards higher integer78 nb0=N-sum([nc0,nf0]); nb=nb0; %rest is bondinvestors798081 % Initialization of traders aggregate cash for tc=1, Pf0=exp(pf0)=18283 ccash = zeros(1,2); %(1*2) implies chartist start wealth = nc84 fcash = zeros(1,2); %(1*2) fundamentalist’s cash: no stocks at p=pf8586 cchist = zeros(T,2); %(T*1) history of chartist aggregate cash87 cfhist = zeros(T,2); %(T*1) history of fundamentalist aggr. cash888990 %Simulation loop with price and population recording at integer steps

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

Saved successfully!

Ooh no, something went wrong!