Re: [R-SIG-Finance] Risk return analysis

2013-06-30 Thread Wildi Marc (wlmr)
Try it this way:



-If you focus on a single asset (no cross-sectional comparison) then you 
frequently observe that periods of higher volatility are associated with 
down-turns: the volatility and the return tend to be negatively correlated over 
time for a single asset. This is the GARCH-in-Mean model that you used.



-If you consider a cross-sectional universe of assets, then one expects that 
the one asset with the higher returns is also the riskier i.e. volatility and 
return (across assets) are linked positively. Note that the volatility of the 
whole universe is changing over time too (GARCH effect), but at a fixed time 
period, going across assets suggests a positive link between return and vola 
(in the cross section).



It's really about longitudinal dynamics (Garch in mean) vs. cross sectional 
patterns.



Marc






Von: Christofer Bogaso [bogaso.christo...@gmail.com]
Gesendet: Sonntag, 30. Juni 2013 20:58
An: sidharth mallik
Cc: Wildi Marc (wlmr); r-sig-finance@r-project.org
Betreff: Re: [R-SIG-Finance] Risk return analysis

Thanks Sidharth and Wildi for your replies.

However going through the replies from Sidharth and Wildi, I am little more 
confused!!!

>From Sidharth's pointer it seems to me like, the estimate of 'k' ***should be 
>positive*** (i.e. higher risk -> higher return). However Wildi says that, from 
>conditional volatility point of view this may not be the case.

However the simulation study in Sidharth's pointer looks to be more tangible. 
Therefore I think my insignificant 'k' estimate is due to comparatively small 
sample only (at least 4,000 observations means near to 16 years of data, while 
I have 10 years of data).

Is there any inaccuracy in my above statement?

Thanks and regards,


On Sun, Jun 30, 2013 at 9:25 AM, sidharth mallik 
mailto:htrah...@gmail.com>> wrote:
also, the methods of estimation should be rigorously checked again.
please see this link : http://mahalanobis.twoday.net/stories/2684143/.
parameter estimation for these models may not be as easy as a simple
GARCH model.

On 6/30/13, Wildi Marc (wlmr) mailto:w...@zhaw.ch>> wrote:
> This is a classic topic of/for confusion:
>
> -Garch-in-Mean (as you use) is not related to Markowitz: the former
> (Garch-in-Mean) emphasizes longitudinal dynamics whereas Markowitz
> emphasizes cross-sectional `diversity'.
>
> -Typically, the link between return and volatility in the Garch-in-mean is
> negative. This means: high-volatility is associated with draw-downs
> (negative returns): asymmetry of markets.
>
> -In contrast, in a Markowitzian cross-sectional perspective the link between
> vola and return is positive: higher returns offset higher risk.
>
> Do not stumble into this trap...
>
> Marc
>
>
>
>
> 
> Von: 
> r-sig-finance-boun...@r-project.org
> [r-sig-finance-boun...@r-project.org]"
>  im Auftrag von "Christofer
> Bogaso [bogaso.christo...@gmail.com]
> Gesendet: Samstag, 29. Juni 2013 20:49
> An: r-sig-finance@r-project.org
> Betreff: [R-SIG-Finance] Risk return analysis
>
> Hello again,
>
> I have estimated a garch model with following specification:
>
> r[t] = mu + k * sigma[t] + epsilon[t]
>
> sigma[t] ~ garch(1,1)
>
> However I see that estimate of k is positive but insignificant.
>
> My question what does it mean? Does it mean that, for that asset people are
> not risk adverse? they do not demand higher return for higher risk?
>
> Or it just some noise?
>
> I am using daily log-return for 10 years.
>
> Thanks for your help.
>
> [[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.
>


[[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.


Re: [R-SIG-Finance] Delete bad dividend row

2013-06-30 Thread Frank
Hi Garret,

That did help. I've been analyzing dividend yields and the quantmod
getDividends and getSymbols work flawlessly. But then the dividends change
frequency over time, special dividends creep in and now a spurious data
point for PM. So far I've dealt with these with your help and others. 

Best,

Frank

-Original Message-
From: G See [mailto:gsee...@gmail.com] 
Sent: Sunday, June 30, 2013 5:15 PM
To: Frank
Cc: r-sig-finance
Subject: Re: [R-SIG-Finance] Delete bad dividend row

Hi Frank,

There are a few ways to do it.

library(quantmod)
div <- getDividends("PM", from="2010-01-01")

# find the row(s) you want to remove and use negative indexing
div[-12]
div[-which(div == 0.039)]
div[-div["2012-12-20", which.i=TRUE]]

# exclude specific date by passing logical vector to [.xts
div[!index(div) %in% as.Date("2012-12-20")]

# exclude specific weekdays
div[weekdays(index(div)) != "Thursday"]
div[as.POSIXlt(index(div))$wday != 4]

# exclude amounts smaller than some arbitrary number
div[div > 0.1]
# exclude specific amount
div[div != 0.039]

HTH,
Garrett

___
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.


Re: [R-SIG-Finance] Delete bad dividend row

2013-06-30 Thread G See
Hi Frank,

There are a few ways to do it.

library(quantmod)
div <- getDividends("PM", from="2010-01-01")

# find the row(s) you want to remove and use negative indexing
div[-12]
div[-which(div == 0.039)]
div[-div["2012-12-20", which.i=TRUE]]

# exclude specific date by passing logical vector to [.xts
div[!index(div) %in% as.Date("2012-12-20")]

# exclude specific weekdays
div[weekdays(index(div)) != "Thursday"]
div[as.POSIXlt(index(div))$wday != 4]

# exclude amounts smaller than some arbitrary number
div[div > 0.1]
# exclude specific amount
div[div != 0.039]

HTH,
Garrett

___
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.


Re: [R-SIG-Finance] Risk return analysis

2013-06-30 Thread Christofer Bogaso
Thanks Sidharth and Wildi for your replies.

However going through the replies from Sidharth and Wildi, I am little more
confused!!!

>From Sidharth's pointer it seems to me like, the estimate of 'k' ***should
be positive*** (i.e. higher risk -> higher return). However Wildi says
that, from conditional volatility point of view this may not be the case.

However the simulation study in Sidharth's pointer looks to be more
tangible. Therefore I think my insignificant 'k' estimate is due to
comparatively small sample only (at least 4,000 observations means near to
16 years of data, while I have 10 years of data).

Is there any inaccuracy in my above statement?

Thanks and regards,


On Sun, Jun 30, 2013 at 9:25 AM, sidharth mallik  wrote:

> also, the methods of estimation should be rigorously checked again.
> please see this link : http://mahalanobis.twoday.net/stories/2684143/.
> parameter estimation for these models may not be as easy as a simple
> GARCH model.
>
> On 6/30/13, Wildi Marc (wlmr)  wrote:
> > This is a classic topic of/for confusion:
> >
> > -Garch-in-Mean (as you use) is not related to Markowitz: the former
> > (Garch-in-Mean) emphasizes longitudinal dynamics whereas Markowitz
> > emphasizes cross-sectional `diversity'.
> >
> > -Typically, the link between return and volatility in the Garch-in-mean
> is
> > negative. This means: high-volatility is associated with draw-downs
> > (negative returns): asymmetry of markets.
> >
> > -In contrast, in a Markowitzian cross-sectional perspective the link
> between
> > vola and return is positive: higher returns offset higher risk.
> >
> > Do not stumble into this trap...
> >
> > Marc
> >
> >
> >
> >
> > 
> > Von: r-sig-finance-boun...@r-project.org
> > [r-sig-finance-boun...@r-project.org]" im Auftrag von
> "Christofer
> > Bogaso [bogaso.christo...@gmail.com]
> > Gesendet: Samstag, 29. Juni 2013 20:49
> > An: r-sig-finance@r-project.org
> > Betreff: [R-SIG-Finance] Risk return analysis
> >
> > Hello again,
> >
> > I have estimated a garch model with following specification:
> >
> > r[t] = mu + k * sigma[t] + epsilon[t]
> >
> > sigma[t] ~ garch(1,1)
> >
> > However I see that estimate of k is positive but insignificant.
> >
> > My question what does it mean? Does it mean that, for that asset people
> are
> > not risk adverse? they do not demand higher return for higher risk?
> >
> > Or it just some noise?
> >
> > I am using daily log-return for 10 years.
> >
> > Thanks for your help.
> >
> > [[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.
> >
>

[[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] Delete bad dividend row

2013-06-30 Thread Frank
Hi all,

I successfully get dividend data from Yahoo Finance, including a bad
dividend:

2012-12-20 0.039

How do I delete this one row from the data? This dividend shows up on the
Yahoo Finance site but is not reported by Philip Morris. 

Thanks,

Frank
Chicago, IL


R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> library(quantmod)
Loading required package: Defaults
Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following object is masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: TTR
Version 0.4-0 included new data defaults. See ?getSymbols.
> library(chron)
> 
> from_date="2010-1-1"
> {Divs<-getDividends("PM",from=from_date)}
> Divs
    [,1]
2010-03-23 0.580
2010-06-22 0.580
2010-09-22 0.640
2010-12-21 0.640
2011-03-22 0.640
2011-06-21 0.640
2011-09-23 0.770
2011-12-20 0.770
2012-03-27 0.770
2012-06-25 0.770
2012-09-25 0.850
2012-12-20 0.039
2012-12-24 0.850
2013-03-26 0.850
2013-06-25 0.850
> 
> quit()
> proc.time()
   user  system elapsed 
   0.92    0.04    1.04

___
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.