Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setwd("E:/00 Materiale facultate/Anul II/Semestrul II/Micro manageriala/tema")
- google<-read.table(file="valori google.txt",header=TRUE,sep="\t")
- attach(google)
- fix(google)
- microsoft<-read.table(file="valori microsoft.txt",header=TRUE,sep="\t")
- attach(microsoft)
- fix(microsoft)
- nasdaq<-read.table(file="valori nasdaq.txt",header=TRUE,sep="\t")
- attach(nasdaq)
- fix(nasdaq)
- summary(microsoft)
- summary(google)
- summary(nasdaq)
- tabel<-data.frame(microsoft$Date,microsoft$Close,microsoft$Volume,google$Close,google$Volume,nasdaq$Close,nasdaq$Volume)
- attach(tabel)
- fix(tabel)
- summary(tabel$`Microsoft Close`)
- summary(tabel$`Microsoft Volume`)
- summary(tabel$`Google Close`)
- summary(tabel$`Google Volume`)
- summary(tabel$`Nasdaq Close`)
- summary(tabel$`Nasdaq Volume`)
- mmc<-mean(tabel$`Microsoft Close`)
- mmv<-mean(tabel$`Microsoft Volume`)
- mgc<-mean(tabel$`Google Close`)
- mgv<-mean(tabel$`Google Volume`)
- mnc<-mean(tabel$`Nasdaq Close`)
- mnv<-mean(tabel$`Nasdaq Volume`)
- smc<-sd(tabel$`Microsoft Close`)
- smv<-sd(tabel$`Microsoft Volume`)
- sgc<-sd(tabel$`Google Close`)
- sgv<-sd(tabel$`Google Volume`)
- snc<-sd(tabel$`Nasdaq Close`)
- snv<-sd(tabel$`Nasdaq Volume`)
- cvmc<-smc/mmc
- cvmv<-smv/mmv
- cvgc<-sgc/mgc
- cvgv<-sgv/mgv
- cvnc<-snc/mnc
- cvnv<-snv/mnv
- library(moments)
- skmc<-skewness(tabel$`Microsoft Close`)
- skmv<-skewness(tabel$`Microsoft Volume`)
- skgc<-skewness(tabel$`Google Close`)
- skgv<-skewness(tabel$`Google Volume`)
- sknq<-skewness(tabel$`Nasdaq Close`)
- sknv<-skewness(tabel$`Nasdaq Volume`)
- kumc<-kurtosis(tabel$`Microsoft Close`)
- kumv<-kurtosis(tabel$`Microsoft Volume`)
- kugc<-kurtosis(tabel$`Google Close`)
- kugv<-kurtosis(tabel$`Google Volume`)
- kunc<-kurtosis(tabel$`Nasdaq Close`)
- kunv<-kurtosis(tabel$`Nasdaq Volume`)
- par(mfrow=c(3,2))
- hist(tabel$`Microsoft Close`,freq=FALSE, main="Histograma preturilor de inchidere a actiunii Microsoft", col="magenta4", xlab="Preturile de inchidere")
- lines(density(tabel$`Microsoft Close`))
- hist(tabel$`Microsoft Volume`,freq=FALSE, main="Histograma volumului tranzactiilor actiunii Microsoft", col="red4", xlab="Volumul tranzactiilor")
- lines(density(tabel$`Microsoft Volume`))
- hist(tabel$`Google Close`,freq=FALSE,main="Histograma preturilor de inchidere a actiunii Google", col="tan4", xlab="Preturile de inchidere")
- lines(density(tabel$`Google Close`))
- hist(tabel$`Google Volume`,freq=FALSE,main="Histograma volumului tranzactiilor actiunii Google", col="blue4", xlab="Volumul tranzactiilor")
- lines(density(tabel$`Google Volume`))
- hist(tabel$`Nasdaq Close`,freq=FALSE, main="Histograma preturilor de inchidere a indicatorului Nasadaq", col="olivedrab4", xlab="Preturile de inchidere")
- lines(density(tabel$`Nasdaq Close`))
- hist(tabel$`Nasdaq Volume`,freq=FALSE, main="Histograma volumului tranzactiilor indicatorului Nasdaq", col="turquoise4", xlab="Volumul tranzactiilor")
- lines(density(tabel$`Nasdaq Volume`))
- tabelfaradata<-data.frame(microsoft$Close,microsoft$Volume,google$Close,google$Volume,nasdaq$Close,nasdaq$Volume)
- attach(tabelfaradata)
- fix(tabelfaradata)
- corelatii<-cor(tabelfaradata)
- corelatii
- library(corrplot)
- corrplot(corelatii,method="square")
- par(mfrow=c(3,2))
- boxplot(tabel$`Microsoft Close`,main="Boxplot preturi de inchidere a actiunii Microsoft",col="khaki")
- boxplot(tabel$`Microsoft Volume`,main="Boxplot volum tranzactii a actiunii Microsoft",col="slateblue4")
- boxplot(tabel$`Google Close`,main="Boxplot preturi de inchidere a actiunii Google",col="plum4")
- boxplot(tabel$`Google Volume`,main="Boxplot volum tranzactii a actiunii Google",col="rosybrown4")
- boxplot(tabel$`Nasdaq Close`,main="Boxplot preturi de inchidere a indicatorului Nasdaq",col="darkseagreen4")
- boxplot(tabel$`Nasdaq Volume`,main="Boxplot volum tranzactii a indicatorului Nasdaq",col="orchid4")
- par(mfrow=c(3,2))
- plot.ts(tabel$`Microsoft Close`,main="Trendul pretului de inchidere a actiunii Microsoft", col="magenta4", xlab="Zile",ylab="Pret")
- plot.ts(tabel$`Microsoft Volume`,main="Trendul volumului tranzactionat a actiunii Microsoft", col="red4", xlab="Zile",ylab="Volum")
- plot.ts(tabel$`Google Close`,main="Trendul pretului de inchidere a actiunii Google", col="tan4", xlab="Zile",ylab="Pret")
- plot.ts(tabel$`Google Volume`,main="Trendul pretului de inchidere a actiunii Google", col="blue4", xlab="Zile",ylab="Volum")
- plot.ts(tabel$`Nasdaq Close`,main="Trendul pretului de inchidere a indicatorului Nasdaq", col="olivedrab4", xlab="Zile",ylab="Pret")
- plot.ts(tabel$`Nasdaq Volume`,main="Trendul pretului de inchidere a indicatorului Nasdaq", col="turquoise4", xlab="Zile",ylab="Volum")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement