Midterm Project for Statistical Methods in Finance

Report 8 Downloads 65 Views
Midterm Project for Statistical Methods in Finance LiulingDu∗and ld2742 New York, 2017-06-21

Contents 0.1 0.2 0.3 0.4 0.0.1

Question 1 . . . . . . . . . . . . . . . . . . . . . . . . . . Load the APPL and calculate the percentage log-returns Read the tickers for the data . . . . . . . . . . . . . . . Example of a plot using dygraph and xts object. It plots

. . . . . . . . . . . . . . . . . . . . . . . . . . . the close price

Preliminaries

Load the required packages. library(zoo) ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric library("xts") #for time series library("nloptr") #for optimization library("dygraphs") #for plots library(plotly) # for 3D plots ## Loading required package: ggplot2 ## ## Attaching package: 'plotly' ## The following object is masked from 'package:ggplot2': ## ## last_plot ## The following object is masked from 'package:stats': ## ## filter ## The following object is masked from 'package:graphics': ## ## layout library("magrittr") # pipes library("webshot") library(fBasics) ## Loading required package: timeDate ## Loading required package: timeSeries ∗ [email protected]

1

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

2 2 3 6

## ## Attaching package: 'timeSeries' ## The following object is masked from 'package:zoo': ## ## time