Page 1 of 1
Maheu and McCurdy (2000)
Posted: Mon Dec 21, 2015 4:53 pm
by fan
HI Tom,
By any change, could you please kindly provide the example code for Maheu J, McCurdy TH. 2000. Identifying bull and bear markets in stock returns. Journal of Business and Economics Statistics 18:100-112? I am trying to replicate a MS model with duration-dependent transitions. Similar examples, like Durland, J. M. and T.H. McCurady(1994): Duration_Dependent Transition in a Markov Model of US GNP Growth, Journal of Business &Economic Statistics, 12(3),279-288, are also helpful. Thank you in advance.
Re: Maheu and McCurdy (2000)
Posted: Mon May 21, 2018 11:59 pm
by fan
Anyone has put up some codes?
Re: Maheu and McCurdy (2000)
Posted: Thu May 24, 2018 3:31 pm
by TomDoan
I don't find that particularly convincing. Unlike a standard "hazard" model where you probably will have 100's if not 1000's of individuals, you have only a relative handful of transitions each way in the typical application, so the ability to tease out differences in transition probabilities due to timing is going to be quite weak. However, if you want to pursue it, the following will compute the runs of each regime given the expanded regime matrix. You can use that to fill in the expanded transition matrix.
Code: Select all
dec vect[vect[int]] MSRuns(nregimes)
do i=1,nregimes
dim MSRuns(i)(nexpand)
end do i
do i=1,nregimes
do j=1,nexpand
compute MSRuns(i)(j)=0
do k=1,nlags+1
if MSLagRegimeX(j,k)==i
compute MSRuns(i)(j)+=1
else
break
end do k
end do j
end do i
Re: Maheu and McCurdy (2000)
Posted: Wed Aug 21, 2019 6:32 pm
by fan
TomDoan wrote:I don't find that particularly convincing. Unlike a standard "hazard" model where you probably will have 100's if not 1000's of individuals, you have only a relative handful of transitions each way in the typical application, so the ability to tease out differences in transition probabilities due to timing is going to be quite weak. However, if you want to pursue it, the following will compute the runs of each regime given the expanded regime matrix. You can use that to fill in the expanded transition matrix.
Code: Select all
dec vect[vect[int]] MSRuns(nregimes)
do i=1,nregimes
dim MSRuns(i)(nexpand)
end do i
do i=1,nregimes
do j=1,nexpand
compute MSRuns(i)(j)=0
do k=1,nlags+1
if MSLagRegimeX(j,k)==i
compute MSRuns(i)(j)+=1
else
break
end do k
end do j
end do i
Thank you for your code.