search for: capm

Displaying 15 results from an estimated 15 matches for "capm".

Did you mean: cam
2012 Jan 15
1
problem with table.CAPM in PerformanceAnalytics
All, I'm attempting to run this: table.CAPM(series[,"Strat.Return",drop=FALSE],series[,"spy.Return",drop=FALSE]) and getting this error Error in as.vector(data[, i]) : subscript out of bounds I've searched around and cannot find a solution to the problem.  I've used this in the past without problem and I'm...
2011 Nov 24
1
CAPM-GARCH - Regression analysis with heteroskedasticity
Hey Guys, i want to do a CAPM-GARCH model. I didn?t find anything posted online. (If there is something - shame on me - i didn?t find it.) My Problem: What is the difference if I let the residuals ?e? follow a garch process ? How do I do my regression analysis now? I began reading about regression analyis with heterosc...
2010 May 19
1
Why does my RPy2 program run faster on Windows?
Hi This is my function. It serves an HTML page after the calculations. I'm connecting to a MSSQL DB using pyodbc. def CAPM(self,client): r=self.r cds="1590" bm="20559" d1 = [] v1 = [] v2 = [] print"Parsing GET Params" params=client.g[1].split("&") for items in params: item=items.split(&...
2011 Dec 17
0
time-varying parameters kalman filter estimation problem using FKF package
Dear R users, I am trying to carry out MLE of the time-varying CAPM using the FKF package. My approach so far has been to try and adapt the example given in the help file found using ?fkf which demonstrates the MLE of an ARMA(2,1) model. When I attempt to run my R code (given below) I get the following error: Error in fkf(a0 = sp$a0, P0 = sp$P0, dt = sp$dt, ct =...
2006 Nov 12
2
looking for functions that can test/estimate CAMPM, APT, Fama's factor model, etc.
Hi all, I am also looking for interesting statistical experiments about testing and estimating CAPM, APT, Fama models, etc. using R using financial series data... please give me some pointers... I have been searching the R archives for the past a few hours and I vaguely got to know that there are programs do these interesting statistical things, but I just could not find where are they... I have...
2006 Aug 31
0
Moving Window regressions with corrections for Heteroscedasticity and Autocorrelations(HAC)
...ws less than width.) #The columns are organized as : beta1 se1 tstat1 pvalue1 beta2 se2 tstat2 pvalue2 # i.e. we have each coefficient followed by its s,e., t-stat and p-value. Note that K is the no of #variables in the regression. #STEP3: Get the results using > r= movingWindowRegression(CAPM, 240, 60,Y~X1+X2,3) # Here CAPM is the data set, T=240 monthly data, K =60 as we want to find the 5 year #(5*12=60) rolling regression with adjustment to Autocorrelations and Heteroscedasticity #and the model is Y~X1+X2. # Note that if you want only the ?Heteroscedasticity-Consistent (HC) st...
2012 Apr 05
1
how to do piecewise linear regression in R?
Dear all, I want to do piecewise CAPM linear regression in R: RRiskArb−Rf = (1−δ)[αMktLow+βMktLow(RMkt−Rf)] + δ[αMkt High +βMkt High(RMkt −Rf )] where δ is a dummy variable if the excess return on the value-weighted CRSP index is above a threshold level and zero otherwise. and at the same time add the restriction: αMkt Low + βMkt...
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below: /> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787
2012 Jun 06
1
ARCH modelling/MA process
Hi all ARCH modelling I have a problem now on how to proceed with further steps in my analysis. I did a linear OLS regression with my daily data of stock and index returns. There is now the problem of arch in my error terms. Thus I used the following r command: garch(resid_desn, order=c(0,2)) ## This ARCH(2) process seems to fit the best after trial and error. Consequently, I get there three
2011 Oct 25
1
regression using GMM for mulltiple groups
Inthe code below I was trying to to obtain the GMM estimates for CAPM (REGRESSION) for 36 stocks each have 180 observations,however it only gives me one output rather than 36. In SAS i would just put in a *By statement*. I have a variable TICKER that categorize them into 36 groups. *How can I obtain all 36 output instead of just one.* ** DataMat<-read.table(fi...
2008 Mar 07
0
How to do a time-stratified case-crossover analysis for air pollution data?
...#find the number of controls whithin each stratum for (i in 1:length(lest)) { a<-which(air$stratn==lest[i]) for (j in 1:length(a)) { air$nctrl[a[j]]<-sum(air$mi[a[-j]]) } } #create cases and controls cami<-rep(1,sum(mi)) ctmi<-rep(0,sum(air$nctrl)) capm<-rep(pm10, mi) ctpm<-rep(pm10, air$nctrl) cast<-rep(air$stratn, mi) ctst<-rep(air$stratn, air$nctrl) cady<-rep(dates, mi) ctdy<-rep(dates, air$nctrl) cases<-c(cami, ctmi) stranu<-c(cast, ctst) days<-c(cady, ctdy) pmva<-c(capm, ctpm) air2<-data....
2008 Mar 07
0
How to do a time-stratified case-crossover analysis for air pollution data? Unformatted text-version, with an additional note
...airbase<-air #find the number of controls whithin each stratum for (i in 1:length(lest)) { ?? a<-which(air$stratn==lest[i]) ?? for (j in 1:length(a)) ?? { ????? air$nctrl[a[j]]<-sum(air$mi[a[-j]]) ?? } } #create cases and controls cami<-rep(1,sum(mi)) ctmi<-rep(0,sum(air$nctrl)) capm<-rep(pm10, mi) ctpm<-rep(pm10, air$nctrl) cast<-rep(air$stratn, mi) ctst<-rep(air$stratn, air$nctrl) cady<-rep(dates, mi) ctdy<-rep(dates, air$nctrl) cases<-c(cami, ctmi) stranu<-c(cast, ctst) days<-c(cady, ctdy) pmva<-c(capm, ctpm) air2<-data.frame(cases, days,...
2012 Apr 26
1
looking for an add-in for daily data analysis
Hi all I am looking for an add-in. I am currently working on something and I use daily data of closing stock prices. As not all companies are traded daily (e.g. on monday, then on thursday etc) at the stock exchange, there is satistically a problem. There are some papers which explain the approach to handle infrequent trading of a stock or non synchronous data and beta estimation (Dimson, 1979;
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",
2003 Feb 12
1
nmblookup can't resolve IPs (but SMB-names)
Hi there, i have Samba 2.2.7a running on FreeBSD-STABLE 4.7. I set up a few things and smbd and nmbd start up at boot, i can browse the net. However, nmblookup can only find IPs by SMB-names, but not SMB-names by IPs. Here is an example output of the failed lookup: %nmblookup -d 3 210.104.1.133 Initialising global parameters params.c:pm_process() - Processing configuration file