首页 > > 详细

data set讲解、辅导R程序语言、LTCRet留学生讲解、辅导R辅导R语言程序|讲解留学生Processing

#Practical Assignment #1. This assignment is worth 150 points.


#Useful hints: Utilize book examples and make sure to download
#and library appropriate packages (FRAPO, zoo, fBasics, evir)
#Under each of the items provide the relevant R code


#1) Check you working directory
getwd()

#2) Set your working directory to RStudio folder
# that you have created inside the ANLY 515 forlder"


#3) Download the 3 data set, and lable them
# BTC, LTC, ETH. These data sets reperesnet daily prices
# of three chryptocurrencies: Bitcoin, Litcoin, and Ethereum.
# Set the first column in each data set to the date format
# and the remaining columns in numerical format.


#4) Create three new datasets that are subsets of the original
# datasets, to include dates only after "2015-08-31".
# Name these datasets btcnew, ltcnew, ethnew,

#5) Create 4 variables: date (represents dates of observation) ,
# BTCPrice (price of Bitcoin), LTCPrice (Price of Litcoin),
# ETHPrice (Price of Ethereum)

#6) Check the format of these variable by using str() command

#7) Use date variable to create attribute "time" for
# BTCPrice, LTCPrice, and ETHPrice by using attr() function


#8) Create three variables that represent daily returns on all three coins
# by using returnseries()(part of FRAPO package) function.
# Call these variables BTCRet, LTCRet, and ETHRet.


#9) Use date variable to create attribute "time" for
# BTCRet, LTCRet, and ETHRet


#10) Create a character variable CoinDates which extracts the dates
# from the BTCRet variable by using
# as.character(format(as.POSIXct(attr()),"%Y-%m-%d")) function

#11) Create time seriese called BTCReturns by using BTCRet varible
# and timeSeries() function

#12) Rename the column of BTCReturns to "BTCReturns" by using colnames()


#13) Devide the output window into 2 by 2 matrix by using par() function


#14) Generate a time series plot of Daily Returns of Bitcoin
# (requires fBasics library)


#15) Generate a box plot of Returns of Bitcoin


#16) Generate a acf and pacf of Bitcoin Returns.
# Make sure to omit missing values

#17) Generate a QQ plot of Bitcoin.
# You may have to generate a variable that omits missing values.
# use na.omit() function


#18) Generate acf and pcf of the absolute returns of Bitcoin returns


#19) Generate Volotility Clustering Plot of absolute daily returns
# of Bitcoin


#Part II
#20) Create new data set called PriceCoins that includes prices
# of all three coins by using cbind()


#21) Check the names of the colums and the format of each of the variable


#22) by using the package zoo create an element of class "zoo"
# labled PriceCoinsZoo, and includes Prices of all three Coints:
# BTCPrice", "LTCPrice", and "ETHPrice"


#23) Plot a time series graph of prices of all three coins


#24) Create a variable that calculates daily returns
# (first difference of natural logs) on different coins.
# Call the variable ReturnCoins by using diff(log()) function



#25) Plot a time series graph of returns of all three coins



#26) Plot cross covariance functions between returns and between
# absolute returns of a) BTC and LTC, BTC and ETC, and ETC and LTC.
# You should have 6 graphs.


#27) Generate plots of rolling correlations between
# BTC

# Part III
# 28-30) Export all graphs to a word document and briefly analyze
# whether data on cryptocurrency returns resembles the
# "stylized facts" of the financial data

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!