There are changed engendered by index occlusion, but it can be made to occur. Read up on the Russell index rebalance. I can force a stock into the Russell 2000 and then those liquidity and information production benefits help keep that stock in the index.

If tugger size effect is a self-fulfilling prophesy, then we have an Ornstein-Uhlenbeck process embedded on every stock's returns -- which is unlikely.

To bring this back to R, we should think that a demeaned process which is a self-fulfilling prophesy should exhibit decreasing variance over time. So a simple test:

sfp <- lm(log.returns ~ the + posited + model)
resids <- residuals(sfp)
var.vs.time <- lm(resids^2 ~ time)

Then check the slope coefficient for significance.

Dale W.R. Rosenthal
Assistant Professor, Department of Finance
University of Illinois at Chicago
http://tigger.uic.edu/~daler
http://ssrn.com/author=906862

----- Reply message -----
From: r-sig-finance-request@r-project.org
To: <r-sig-finance@r-project.org>
Subject: R-SIG-Finance Digest, Vol 96, Issue 10
Date: Thu, May 10, 2012 05:00
Message: 14
Date: Wed, 9 May 2012 15:44:08 -0400
From: Richard Herron <richard.c.herron@gmail.com>
Subject: Re: [R-SIG-Finance] self-fulfilling prophecies in financial
	study
Message-ID:
	<CAL9ybL9hng-A8CMjkNMYk568NHTUfiVMcmWPZKEXFTG_++AUFA@mail.gmail.com>

I don't want to argue semantics, but for your examples there is a
real, underlying change.

Inclusion in an index improves liquidity and information production
for the real reasons you discuss (e.g., increased trading by index
funds or an increase in capitalization that added the firm to the
index).

For the size effect the only thing that changed was that some
researchers said "I think that small stocks earn an abnormal return,"
and the effect diminished. I consider this a "prophecy" because there
is no real underlying change, just an idea planted by academic
research.

Richard Herron


On Wed, May 9, 2012 at 10:49 AM, Nitish Ranjan <nitish.ranjan@gmail.com> wrote:
> Disappearance of size effect will not be an example of self fulfilling
> prophesy (it disappeared rather than become stronger).
>
> In the stock market, possible examples are:
>
> 1. Index inclusion effect in returns
> 2. The tendency of traders to put in trades early in the day or later in
> the day but not in the middle of the day.
> 3. Most dispersion in returns during the earnings month.
>
> The second part of the email asked about R code/test which will test these
> effects for self fulfilling prophecy. The null for such test is "Are there
> any economic reasons why we would see self fulfilling prophecies to work."
> A general test is hard (probably impossible, see the following discussion)
> since different economic(or psychological) factors shape each of these
> examples. But we can formulate hypotheses for each one of these examples
> and write tests.
>
> Let me take the example of index inclusion effect. It is well known that
> after included in an index such as S&P 500, a stock performs well. Why? For
> one, there are many funds which are pegged to S&P 500 and many more which
> simply follow the index. Both these kind of funds will have demand for the
> newly inducted stock. Both these kind of funds will begin to buy the stock
> and
> move the prices up for the newly inducted stock. Since neither of these
> demands have any informational origins, we would expect the permanent
> impact to be small (close to zero) and a large temporary impact. See the
> survey paper http://www4.ncsu.edu/~rswarr/fm2006.pdf for further discussion.
>
> Another channel via which the effect might play out is through new
> information production. It is very possible that index inclusion actually
> brings a stock to the forefront of investors and produces new research for
> the stock which in turn should make the stock less volatile. A
> Campbell-Schiller type decomposition might help with matters here. You
> could also examine the actual production of information (number of news
> articles, analyst following, analyst dispersion etc). This line of
> reasoning suggests that we would see this effect most for stocks which come
> from relative anonymity to being famous. We would observe less of this
> effect for stocks which were famous before inclusion in an index (such as
> netflix for SP500 and any stock in Dow 30). But including such
> informational channels involve careful examination of multitude of data
> sources and ruling out the alternates one by one. It also involves
> understanding the various forces at play (or institutional knowledge).
>
> Regards
>
> Nitish
>
> p.s.: I think it is borderline not appropriate discussion for this list,
> but since it asked for an R code it deserves some consideration.
>
>
> On Wed, May 9, 2012 at 9:04 AM, Richard Herron
> <richard.c.herron@gmail.com>wrote:
>
>> Is this an R question?
>>
>> Are you taking about anomalies that disappear after we discover them? If we
>> discover an anomaly and it disappears, then we have to wonder if we priced
>> it right before or after. See the size effect.
>>
>> http://schwert.ssb.rochester.edu/hbfech15.pdf
>>
>> Richard Herron
>>
>>
>> On Wed, May 9, 2012 at 8:01 AM, Wei-han Liu <weihanliu2002@yahoo.com>
>> wrote:
>>
>> > Hi R users:
>> >
>> > There are some possible candidates of self-fulfilling prophecies in
>> > financial study.
>> >
>> > Could some people share some thoughts about the relevant theories,
>> > econometric tests, and R packages for implementation?
>> >
>> > Thanks for your attention and sharing.
>> >
>> > Wei-han
>> > ? ? ? ?[[alternative HTML version deleted]]
>> >
>> >
>> > _______________________________________________
>> > R-SIG-Finance@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> > should go.
>> >
>>
>> ? ? ? ?[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions
>> should go.
>>
>
>
>
> --
> Have fun.
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



------------------------------

Message: 15
Date: Wed, 9 May 2012 14:56:04 -0500
From: Nitish Ranjan <nitish.ranjan@gmail.com>
To: "R-SIG-Finance@r-project.org" <R-SIG-Finance@r-project.org>
Subject: Re: [R-SIG-Finance] self-fulfilling prophecies in financial
	study
Message-ID:
	<CANQSzRzz1NM7tb_qtfo65Vt1D4e+Mp=xOZm7VE7joU8VdAf0ug@mail.gmail.com>
Content-Type: text/plain

Sometimes, there is and sometimes there is not, which is why I was trying
to make a distinction between real informational reason versus simple index
benchmarking. Netflix was a very well known stock before S&P discovered it.
Some other stocks are not so (Xilinx?). One would expect the index effect
to be stronger among the later.

Similarly, size effect could also be driven by economic forces. Small firms
have typically more options embedded in them. To give an example from real
life, any kid born in America has a higher probability for being a
billionaire than any 65 year old American, that is the option value. Size
effect may have a similar mechanism at play. The other way size effect is
work could be through demand side. Imagine having a billion dollars to
invest within 3 months. One is more likely to look for large investment
opportunities. That would generate a bias away from small stocks. This in
turn would generate a size effect is returns. Turns out size effect
continues to exist, despite the claims in
http://schwert.ssb.rochester.edu/hbfech15.pdf paper. We still have the
anomaly that equally weighted index outperforms a value weighted index.

Regards

On Wed, May 9, 2012 at 2:44 PM, Richard Herron
<richard.c.herron@gmail.com>wrote:

> I don't want to argue semantics, but for your examples there is a
> real, underlying change.
>
> Inclusion in an index improves liquidity and information production
> for the real reasons you discuss (e.g., increased trading by index
> funds or an increase in capitalization that added the firm to the
> index).
>
> For the size effect the only thing that changed was that some
> researchers said "I think that small stocks earn an abnormal return,"
> and the effect diminished. I consider this a "prophecy" because there
> is no real underlying change, just an idea planted by academic
> research.
>
> Richard Herron
>
>
> On Wed, May 9, 2012 at 10:49 AM, Nitish Ranjan <nitish.ranjan@gmail.com>
> wrote:
> > Disappearance of size effect will not be an example of self fulfilling
> > prophesy (it disappeared rather than become stronger).
> >
> > In the stock market, possible examples are:
> >
> > 1. Index inclusion effect in returns
> > 2. The tendency of traders to put in trades early in the day or later in
> > the day but not in the middle of the day.
> > 3. Most dispersion in returns during the earnings month.
> >
> > The second part of the email asked about R code/test which will test
> these
> > effects for self fulfilling prophecy. The null for such test is "Are
> there
> > any economic reasons why we would see self fulfilling prophecies to
> work."
> > A general test is hard (probably impossible, see the following
> discussion)
> > since different economic(or psychological) factors shape each of these
> > examples. But we can formulate hypotheses for each one of these examples
> > and write tests.
> >
> > Let me take the example of index inclusion effect. It is well known that
> > after included in an index such as S&P 500, a stock performs well. Why?
> For
> > one, there are many funds which are pegged to S&P 500 and many more which
> > simply follow the index. Both these kind of funds will have demand for
> the
> > newly inducted stock. Both these kind of funds will begin to buy the
> stock
> > and
> > move the prices up for the newly inducted stock. Since neither of these
> > demands have any informational origins, we would expect the permanent
> > impact to be small (close to zero) and a large temporary impact. See the
> > survey paper http://www4.ncsu.edu/~rswarr/fm2006.pdf for further
> discussion.
> >
> > Another channel via which the effect might play out is through new
> > information production. It is very possible that index inclusion actually
> > brings a stock to the forefront of investors and produces new research
> for
> > the stock which in turn should make the stock less volatile. A
> > Campbell-Schiller type decomposition might help with matters here. You
> > could also examine the actual production of information (number of news
> > articles, analyst following, analyst dispersion etc). This line of
> > reasoning suggests that we would see this effect most for stocks which
> come
> > from relative anonymity to being famous. We would observe less of this
> > effect for stocks which were famous before inclusion in an index (such as
> > netflix for SP500 and any stock in Dow 30). But including such
> > informational channels involve careful examination of multitude of data
> > sources and ruling out the alternates one by one. It also involves
> > understanding the various forces at play (or institutional knowledge).
> >
> > Regards
> >
> > Nitish
> >
> > p.s.: I think it is borderline not appropriate discussion for this list,
> > but since it asked for an R code it deserves some consideration.
> >
> >
> > On Wed, May 9, 2012 at 9:04 AM, Richard Herron
> > <richard.c.herron@gmail.com>wrote:
> >
> >> Is this an R question?
> >>
> >> Are you taking about anomalies that disappear after we discover them?
> If we
> >> discover an anomaly and it disappears, then we have to wonder if we
> priced
> >> it right before or after. See the size effect.
> >>
> >> http://schwert.ssb.rochester.edu/hbfech15.pdf
> >>
> >> Richard Herron
> >>
> >>
> >> On Wed, May 9, 2012 at 8:01 AM, Wei-han Liu <weihanliu2002@yahoo.com>
> >> wrote:
> >>
> >> > Hi R users:
> >> >
> >> > There are some possible candidates of self-fulfilling prophecies in
> >> > financial study.
> >> >
> >> > Could some people share some thoughts about the relevant theories,
> >> > econometric tests, and R packages for implementation?
> >> >
> >> > Thanks for your attention and sharing.
> >> >
> >> > Wei-han
> >> >        [[alternative HTML version deleted]]
> >> >
> >> >
> >> > _______________________________________________
> >> > R-SIG-Finance@r-project.org mailing list
> >> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> >> > -- Subscriber-posting only. If you want to post, subscribe first.
> >> > -- Also note that this is not the r-help list where general R
> questions
> >> > should go.
> >> >
> >>
> >>        [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-SIG-Finance@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> >> -- Subscriber-posting only. If you want to post, subscribe first.
> >> -- Also note that this is not the r-help list where general R questions
> >> should go.
> >>
> >
> >
> >
> > --
> > Have fun.
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Finance@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> should go.
>



-- 
Have fun.

	[[alternative HTML version deleted]]



------------------------------

Message: 16
Date: Wed, 9 May 2012 13:07:56 -0700 (PDT)
From: Alex Fei <alec.fei@gmail.com>
To: r-sig-finance@r-project.org
Subject: Re: [R-SIG-Finance] copula with rmgarch
Message-ID: <1336594076622-4621613.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii

Thank you!

I just found there is a name "stdresid" under slot "mfit", i.e. 
fit1@mfit$stdresid. I guess it refers to standardised residuals (it looks
like in the plot), is it true? 

--
View this message in context: http://r.789695.n4.nabble.com/copula-with-rmgarch-tp4616138p4621613.html
Sent from the Rmetrics mailing list archive at Nabble.com.



------------------------------

Message: 17
Date: Wed, 9 May 2012 20:15:55 +0000
From: David-Michael Lincke <dlincke@lincke.com>
To: "r-sig-finance@r-project.org" <r-sig-finance@r-project.org>
Subject: Re: [R-SIG-Finance] stripping holidays from timeSeries()
	class	time	series
Message-ID:
	<FED6DC763FCC7B428AD79346DBA943F44DCBAE7A@ExDAG20-N1.hostallapps.net>
Content-Type: text/plain; charset="us-ascii"

Turns out that the following accomplishes the same:

tsm[-which(as.Date(time(tsm)) %in% as.Date(index.holidays)),]

However, I still wonder if there is not a more elegant way to achieve this while remaining within the timeDate/timeSeries classes.

________________________________________
From: r-sig-finance-bounces@r-project.org [r-sig-finance-bounces@r-project.org] on behalf of David-Michael Lincke [dlincke@lincke.com]
Sent: Wednesday, May 09, 2012 21:33
To: r-sig-finance@r-project.org
Subject: [R-SIG-Finance] stripping holidays from timeSeries() class time        series

I have come up with the following expression to strip a time series tsm of class timeSeries from holidays contained in timeDate class object index.holidays. index.holidays covers a wider date range than time series tsm.

tsm[-na.omit(match(as.character(index.holidays),as.character(time(tsm)))),]

While this expression works as intended, I suspect that it is rather inefficient due to the data type conversions forced by match(). Is there a more elegant way to accomplish this?

Best regards,
David

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.



------------------------------

Message: 18
Date: Wed, 09 May 2012 21:43:05 +0100
From: alexios ghalanos <alexios@4dscape.com>
To: Alex Fei <alec.fei@gmail.com>
Cc: r-sig-finance@r-project.org
Subject: Re: [R-SIG-Finance] copula with rmgarch
Message-ID: <4FAAD6D9.2010601@4dscape.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

True.
Details of the calculation are in the copula-postestimation.R.

-Alexios

On 09/05/2012 21:07, Alex Fei wrote:
> Thank you!
>
> I just found there is a name "stdresid" under slot "mfit", i.e.
> fit1@mfit$stdresid. I guess it refers to standardised residuals (it looks
> like in the plot), is it true?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/copula-with-rmgarch-tp4616138p4621613.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



------------------------------

Message: 19
Date: Wed, 9 May 2012 15:51:08 -0500
From: Joshua Ulrich <josh.m.ulrich@gmail.com>
To: David-Michael Lincke <dlincke@lincke.com>
Cc: "r-sig-finance@r-project.org" <r-sig-finance@r-project.org>
Subject: Re: [R-SIG-Finance] stripping holidays from timeSeries()
	class time	series
Message-ID:
	<CAPPM_gQPs06S3fr_vbvt50BZQ_3GruvSGCopixXDmWaGoZAGFg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

You don't need the call to which() and its results may confuse you if
there are no matches, in which case your code below will return
whatever tsm[integer(0)] returns.

Try this instead:
tsm[!(as.Date(time(tsm)) %in% as.Date(index.holidays)),]

Best,
--
Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com

R/Finance 2012: Applied Finance with R
www.RinFinance.com


On Wed, May 9, 2012 at 3:15 PM, David-Michael Lincke <dlincke@lincke.com> wrote:
> Turns out that the following accomplishes the same:
>
> tsm[-which(as.Date(time(tsm)) %in% as.Date(index.holidays)),]
>
> However, I still wonder if there is not a more elegant way to achieve this while remaining within the timeDate/timeSeries classes.
>
> ________________________________________
> From: r-sig-finance-bounces@r-project.org [r-sig-finance-bounces@r-project.org] on behalf of David-Michael Lincke [dlincke@lincke.com]
> Sent: Wednesday, May 09, 2012 21:33
> To: r-sig-finance@r-project.org
> Subject: [R-SIG-Finance] stripping holidays from timeSeries() class time ? ? ? ?series
>
> I have come up with the following expression to strip a time series tsm of class timeSeries from holidays contained in timeDate class object index.holidays. index.holidays covers a wider date range than time series tsm.
>
> tsm[-na.omit(match(as.character(index.holidays),as.character(time(tsm)))),]
>
> While this expression works as intended, I suspect that it is rather inefficient due to the data type conversions forced by match(). Is there a more elegant way to accomplish this?
>
> Best regards,
> David
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



------------------------------

Message: 20
Date: Wed, 9 May 2012 17:17:58 -0500
From: Jeff Ryan <jeff.a.ryan@gmail.com>
To: Joshua Ulrich <josh.m.ulrich@gmail.com>
Cc: "r-sig-finance@r-project.org" <r-sig-finance@r-project.org>
Subject: Re: [R-SIG-Finance] stripping holidays from timeSeries()
	class time	series
Message-ID: <3FB6A7DD-F31B-49FF-95C6-15A093E68A15@gmail.com>
Content-Type: text/plain;	charset=us-ascii

There is a timeSeries equal to this, but you an also merge in xts against a known time series of valid dates (often easier to find) and only return the columns of interest. 

In xts you'd use:

merge(x,known, join="inner",retside=c(TRUE,FALSE))

That will be very fast. 

Jeff

Jeffrey Ryan    |    Founder    |    jeffrey.ryan@lemnica.com

www.lemnica.com

On May 9, 2012, at 3:51 PM, Joshua Ulrich <josh.m.ulrich@gmail.com> wrote:

> You don't need the call to which() and its results may confuse you if
> there are no matches, in which case your code below will return
> whatever tsm[integer(0)] returns.
> 
> Try this instead:
> tsm[!(as.Date(time(tsm)) %in% as.Date(index.holidays)),]
> 
> Best,
> --
> Joshua Ulrich  |  FOSS Trading: www.fosstrading.com
> 
> R/Finance 2012: Applied Finance with R
> www.RinFinance.com
> 
> 
> On Wed, May 9, 2012 at 3:15 PM, David-Michael Lincke <dlincke@lincke.com> wrote:
>> Turns out that the following accomplishes the same:
>> 
>> tsm[-which(as.Date(time(tsm)) %in% as.Date(index.holidays)),]
>> 
>> However, I still wonder if there is not a more elegant way to achieve this while remaining within the timeDate/timeSeries classes.
>> 
>> ________________________________________
>> From: r-sig-finance-bounces@r-project.org [r-sig-finance-bounces@r-project.org] on behalf of David-Michael Lincke [dlincke@lincke.com]
>> Sent: Wednesday, May 09, 2012 21:33
>> To: r-sig-finance@r-project.org
>> Subject: [R-SIG-Finance] stripping holidays from timeSeries() class time        series
>> 
>> I have come up with the following expression to strip a time series tsm of class timeSeries from holidays contained in timeDate class object index.holidays. index.holidays covers a wider date range than time series tsm.
>> 
>> tsm[-na.omit(match(as.character(index.holidays),as.character(time(tsm)))),]
>> 
>> While this expression works as intended, I suspect that it is rather inefficient due to the data type conversions forced by match(). Is there a more elegant way to accomplish this?
>> 
>> Best regards,
>> David
>> 
>>        [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
>> 
>> _______________________________________________
>> R-SIG-Finance@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
> 
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



------------------------------

_______________________________________________
R-SIG-Finance mailing list
R-SIG-Finance@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-finance


End of R-SIG-Finance Digest, Vol 96, Issue 10
*********************************************
	[[alternative HTML version deleted]]

