Pages

Wednesday, 13 February 2013

IT Lab Session 6

1)  Find the log of returns data and volatility





2) Create ACF plot of log returns and do Augmented Dickey-Fuller test





Thursday, 7 February 2013

IT Lab Session5

Q1) Download data set for large NSE data (atleast 6 months) and generate returns having selected the 10th datapoint as start and 95th data point as end

Ans)



Q2) Predict the data for 701 to 850 rows for the data given
Ans) Considered "age" and "ed" attributes as categories and worked accordingly


> logit<-read.csv(file.choose(), header=T)
> logit.eg<-logit[1:700,]
> logit.eg$age <- factor(logit.eg$age)
> logit.eg$ed <- factor(logit.eg$ed)
> logit.est <- glm(default~age+ed+employ+address+income+
+ debtinc+creddebt+othdebt, data = logit.eg ,
+ family = "binomial" )
> logit.eg2<-logit[701:850,]
> logit.eg2$age <- factor(logit.eg2$age)
> logit.eg2$ed <- factor(logit.eg2$ed)
> logit.eg2$prob <- predict(logit.est, newdata = logit.eg2, type = "response")
> logit.eg2