Main Content

ecmnfish

Fisher information matrix

Description

Fisher = ecmnfish(Data,Covariance) computes an NUMPARAMS-by-NUMPARAMS Fisher information matrix based on the current maximum likelihood parameter estimates.

Use ecmnfish after estimating the mean and covariance of Data with ecmnmle.

example

Fisher = ecmnfish(___,InvCovar,MatrixType) adds optional arguments for InvCovar and MatrixType.

example

Examples

collapse all

This example shows how to compute the Fisher information matrix based on parameter estimates for Data for five years of daily total returns for 12 computer technology stocks, with six hardware and six software companies

load ecmtechdemo.mat

The time period for this data extends from April 19, 2000 to April 18, 2005. The sixth stock in Assets is Google (GOOG), which started trading on August 19, 2004. So, all returns before August 20, 2004 are missing and represented as NaNs. Also, Amazon (AMZN) had a few days with missing values scattered throughout the past five years.

[ECMMean, ECMCovar] = ecmnmle(Data)
ECMMean = 12×1

    0.0008
    0.0008
   -0.0005
    0.0002
    0.0011
    0.0038
   -0.0003
   -0.0000
   -0.0003
   -0.0000
      ⋮

ECMCovar = 12×12

    0.0012    0.0005    0.0006    0.0005    0.0005    0.0003    0.0005    0.0003    0.0006    0.0003    0.0005    0.0006
    0.0005    0.0024    0.0007    0.0006    0.0010    0.0004    0.0005    0.0003    0.0006    0.0004    0.0006    0.0012
    0.0006    0.0007    0.0013    0.0007    0.0007    0.0003    0.0006    0.0004    0.0008    0.0005    0.0008    0.0008
    0.0005    0.0006    0.0007    0.0009    0.0006    0.0002    0.0005    0.0003    0.0007    0.0004    0.0005    0.0007
    0.0005    0.0010    0.0007    0.0006    0.0016    0.0006    0.0005    0.0003    0.0006    0.0004    0.0007    0.0011
    0.0003    0.0004    0.0003    0.0002    0.0006    0.0022    0.0001    0.0002    0.0002    0.0001    0.0003    0.0016
    0.0005    0.0005    0.0006    0.0005    0.0005    0.0001    0.0009    0.0003    0.0005    0.0004    0.0005    0.0006
    0.0003    0.0003    0.0004    0.0003    0.0003    0.0002    0.0003    0.0005    0.0004    0.0003    0.0004    0.0004
    0.0006    0.0006    0.0008    0.0007    0.0006    0.0002    0.0005    0.0004    0.0011    0.0005    0.0007    0.0007
    0.0003    0.0004    0.0005    0.0004    0.0004    0.0001    0.0004    0.0003    0.0005    0.0006    0.0004    0.0005
      ⋮

To evaluate the negative log-likelihood function for ecmnmle, use ecmnfish based on the current maximum likelihood parameter estimates for ECMCovar.

Fisher = ecmnfish(Data,ECMCovar)
Fisher = 90×90
107 ×

    0.0001    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
    0.0000    0.0001   -0.0000    0.0000   -0.0000    0.0001    0.0000    0.0000    0.0000    0.0000    0.0000   -0.0001         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000   -0.0000    0.0002   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000    0.0000   -0.0000    0.0003   -0.0000    0.0000   -0.0000   -0.0000   -0.0001   -0.0001    0.0000   -0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000   -0.0000   -0.0000   -0.0000    0.0001   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000   -0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000    0.0001   -0.0000    0.0000   -0.0000    0.0002    0.0000   -0.0000    0.0000    0.0001    0.0000   -0.0002         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0002   -0.0001   -0.0000    0.0000   -0.0000   -0.0001         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0001    0.0004   -0.0000   -0.0001   -0.0000    0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
   -0.0000    0.0000   -0.0000   -0.0001    0.0000    0.0000   -0.0000   -0.0000    0.0002   -0.0001   -0.0000   -0.0000         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
    0.0000    0.0000   -0.0000   -0.0001   -0.0000    0.0001    0.0000   -0.0001   -0.0001    0.0004   -0.0000   -0.0001         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
      ⋮

Input Arguments

collapse all

Data, specified as an NUMSAMPLES-by-NUMSERIES matrix with NUMSAMPLES samples of a NUMSERIES-dimensional random vector. Missing values are indicated by NaNs.

Data Types: double

Maximum likelihood parameter estimates for the covariance of the Data using the ECM algorithm, specified as a NUMSERIES-by-NUMSERIES matrix.

(Optional) Inverse of covariance matrix, specified as a matrix using inv as:

inv(Covariance)

Data Types: double

(Optional) Matrix format, specified as a character vector with a value of:

  • 'full' — Computes the full Fisher information matrix.

  • 'meanonly' — Computes only the components of the Fisher information matrix associated with the mean.

Data Types: char

Output Arguments

collapse all

Fisher information matrix, returned as an NUMPARAMSNUMPARAMS matrix based on current parameter estimates, where NUMPARAMS = NUMSERIES * (NUMSERIES + 3)/2 if the MatrixFormat = 'full'. If the MatrixFormat = 'meanonly', then the NUMPARAMS = NUMSERIES.

Version History

Introduced before R2006a