[R-SIG-Finance] Non-parametric estimation of time-varying market beta?
markknecht at gmail.com
Fri Aug 20 18:48:04 CEST 2010
1) Complete R code that we can run that demonstrates the problem.
Something that we can copy from your email and paste into R-gui, etc.
2) A clear description of the problem that R is causing.
2010/8/20 김상환 <skim3 at naver.com>:
> Hello, R users:
> I am interested in nonparametric estimation of time-varying beta using additive model,
> following "Estimating Beta-Coefficients of German Stock Data: A Non-Parametric Approach"
> European Journal of Finance, September 2007.
> Authors suggest using gam in library(mgcv) to estimate time varying beta
> of i-th stock (= beta_i + beta_i (t) ) in the following model:
> R_it = alpha_i + beta_i * R_Mt + beta_i (t) * R_Mt + e_it
> They show some codes used for tables and graphs of the paper
> in the appendix as follows:
>> output <- gam(Rj … RM + s(t, by=RM))
> where t is the time trend. My questions about this code are:
> 1. When I use their code and plot the time varying smooth s(t) by "plot(output)",
> It plots only beta_i (t), not beta_i + beta_i (t).
> But when I am using "output <- gam(Rj … s(t, by=RM))", It plots OK.
> Is this the correct beta?
> 2. I cannot plot varying beta with x-axis of year.
> (I am using zoo object of monthly stock returns)
> How do I set up the time trend t for this?
> 3. How do I retrieve the fitted time-varying beta?
> 4. Do you have any recommendation of R nonparametric function
> for estimating time-varying market beta?
> Thanks in advance.
> SW KIM
> [[alternative HTML version deleted]]
> R-SIG-Finance at stat.math.ethz.ch mailing list
> -- 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.
More information about the R-SIG-Finance