Publications by C. Alberto Dorantes Dosamantes, Ph.D.
Workshop 2 Solution - Econometric Models
1 The Linear regression model The simple linear regression model is used to understand the linear relationship between two variables assuming that one variable, the independent variable (IV), can be used as a predictor of the other variable, the dependent variable (DV). In this part we illustrate a simple regression model with the Market Model. T...
17978 sym R (4227 sym/25 pcs) 2 img
Workshop 1 Solution - Financial Econometrics II
1 Introduction to time-series variables In this section we will download time-series variables from Yahoo Finance and explore the time-series datasets. More specifically, we explore the xts-zoo R objects. xts stands for “eXtensible Time Series”, and zoo is an R class for general time-series datasets. We start clearing our R environment: rm(li...
13478 sym R (1375 sym/17 pcs) 5 img
Workshop 2 - Econometric Models
1 General directions for this Workshop You will work in RStudio. You can go to the RStudio web site and follow instructions to download the R software and the free version of RStudio. It is strongly recommended to have the latest version of R and RStudio. Once you are in RStudio, do the following. Create an R Notebook document (File -> New File -...
5921 sym R (2323 sym/13 pcs) 2 img
Workshop 1 - Financial Programming
1 Learning objectives: Understand what a programming language is. Understand the way R manages data: what is an R object, and what are the main (atomic) data classes of R objects. Understand the basic R data structures such as vectors, matrices and data frames. 2 General directions for this Workshop You will work in RStudio. Create an R Notebo...
15695 sym R (2737 sym/67 pcs)
Workshop 1 - Econometric Models
1 General directions for this Workshop You will work in RStudio. You can go to the RStudio web site and follow instructions to download the R software and the free version of RStudio. It is strongly recommended to have the latest version of R and RStudio. Once you are in RStudio, do the following. Create an R Notebook document (File -> New File -...
12055 sym R (4060 sym/31 pcs) 5 img
Workshop 1 - Financial Econometrics II
1 General directions for this Workshop You will work in RStudio. Create an R Notebook document (File -> New File -> R Notebook), where you have to write whatever is asked in this workshop. Create an R Notebook document (File -> New File -> R Notebook), where you have to write whatever is asked in this workshop. More specifically, you have to: Re...
10373 sym R (711 sym/12 pcs) 4 img
Workshop 2 - Financial Programming
1 General directions for this Workshop You will work in RStudio. Create an R Notebook document to write whatever is asked in this workshop. You have to replicate all the steps explained in this workshop, and ALSO you have to do whatever is asked. Any QUESTION or any STEP you need to do will be written in CAPITAL LETTERS. For ANY QUESTION, you hav...
16282 sym R (16637 sym/67 pcs) 1 tbl
Workshop 1 Solution - Financial Programming
1 Q DATA EXERCISE CREATE A DATA-FRAME WITH THE OPEN AND CLOSE PRICES FOR MICROSOFT STOCK (TSLA) FOR DEC 2021 AND JAN 2022 Name the columns as OPEN and CLOSE for the prices, and name the rows with the names of the months. You have to end up with a data frame with 2 rows and 2 columns. Hints: You can check the monthly prices of Microsoft in Yahoo ...
3053 sym R (1946 sym/40 pcs)
Workshop 1 Solution - Econometric Models
1 Downloading and visualizing online financial data We start clearing our R environment: rm(list=ls()) # To avoid scientific notation for numbers: options(scipen=999) Now you have to load the package in memory by using the library() function: library(quantmod) Now, we will work with historical data of the market and the stocks we want to analy...
11750 sym R (7736 sym/59 pcs) 13 img
Workshop 3 - Econometric Models
1 General directions for this Workshop You will work in RStudio. You can go to the RStudio web site and follow instructions to download the R software and the free version of RStudio. It is strongly recommended to have the latest version of R and RStudio. Once you are in RStudio, do the following. Create an R Notebook document (File -> New File -...
5257 sym R (3813 sym/25 pcs) 3 img