Home   >   User Resources   >   Online Help   >   apaMarkov.Hidden.MVN.Simulate
 

 

Function index Version 3.0.0

apaMarkov.Hidden.MVN.Simulate(nObs, InitState, Means, Vols, CorrelsVecl, TransProbs, ShowStateOtherwiseReturnsOnly)

Excel=apaMarkov.Hidden.MVN.Simulate(nObs, InitState, Means, Vols, CorrelsVecl, TransProbs, ShowStateOtherwiseReturnsOnly)

Result

Simulates Gaussian emissions from a Markov regime switching process, i.e. multivariate normally distributed returns whose means, volatilities and correlations depend on a hidden state following a Markov chain.

Syntax

nObs: number of observations to generate

InitState: initial state, i.e. the state preceding the first observation

Means: nStates x nAssets matrix of means

Vols: nStates x nAssets matrix of volatilities

CorrelsVecl: nStates x (nAssets*(nAssets-1)/2) matrix of correlations, each row containing the vecl correlation values of a state

TransProbs: matrix of transition probabilities, each row summing to one (rows: current state, columns: next state)

ShowStateOtherwiseReturnsOnly: optional; TRUE to show the simulated state in the first column, FALSE to return the simulated returns only; default: TRUE

Algorithm

For each observation, the next state is drawn from the transition probabilities of the previous state.

Remarks

The transition probability matrix is organized such that each row sums to one, consistent with apaMarkov.Simulate and with the transition matrices returned by the hidden Markov estimation functions.