Professional Documents
Culture Documents
ALUMNO:
LARREA GUZMÁN, RAÚL ALEJANDRO
AREQUIPA - PERÚ
2021
STRATIVAS
MERCIAL
ACCION CODIGO
1 Toyota Motor Corporation TOYOF
2 Ford Motor Company F
3 McDonald's Corporation MCD
4 Starbucks Corporation SBUX
5 NIKE, Inc. NKE
6 Under Armour, Inc. UAA
7 Panasonic Corporation PCRFY
8 Sony Group Corporation SONY
9 Facebook, Inc. FB
10 Netflix, Inc. NFLX
install.packages("quantmod")
library(quantmod)
# RENDIMIENTOS
ToyotaRend <- periodReturn(Toyota, period = "monthly", type = "log", subset = "2009")
FordRend <- periodReturn(Ford, period = "monthly", type = "log", subset = "2009")
McDonaldsRend <- periodReturn(McDonalds, period = "monthly", type = "log", subset = "2009")
StarbucksRend <- periodReturn(Starbucks, period = "monthly", type = "log", subset = "2009")
NikeRend <- periodReturn(Nike, period = "monthly", type = "log", subset = "2009")
UnderAmourRend <- periodReturn(UnderAmour, period = "monthly", type = "log", subset = "2009")
PanasonicRend <- periodReturn(Panasonic, period = "monthly", type = "log", subset = "2009")
SonyRend <- periodReturn(Sony, period = "monthly", type = "log", subset = "2009")
FacebookRend <- periodReturn(Facebook, period = "monthly", type = "log", subset = "2009")
NetflixRend <- periodReturn(Netflix, period = "monthly", type = "log", subset = "2009")
mean(ToyotaRend)
mean(FordRend)
mean(McDonaldsRend)
mean(StarbucksRend)
mean(NikeRend)
mean(UnderAmourRend)
mean(PanasonicRend)
mean(SonyRend)
mean(FacebookRend)
mean(NetflixRend)
# GRAFICOS
chartSeries(ToyotaRend, TA=NULL)
chartSeries(FordRend, TA=NULL)
chartSeries(McDonaldsRend, TA=NULL)
chartSeries(StarbucksRend, TA=NULL)
chartSeries(NikeRend, TA=NULL)
chartSeries(UnderAmourRend, TA=NULL)
chartSeries(PanasonicRend, TA=NULL)
chartSeries(SonyRend, TA=NULL)
chartSeries(FacebookRend, TA=NULL)
chartSeries(NetflixRend, TA=NULL)
# UNION DE ACCIONES
Vehiculos <- cbind(ToyotaRend,FordRend)
FastFoods <- cbind(McDonaldsRend, StarbucksRend)
Sports <- cbind(NikeRend, UnderAmourRend)
Electronics <- cbind(PanasonicRend, SonyRend)
SocialMedia <- cbind(FacebookRend, NetflixRend)
# GRAFICOS COMPARATIVOS
plot(Vehiculos)
plot(FastFoods)
plot(Sports)
plot(Electronics)
plot(SocialMedia)
plot(General)
Para poder usar los comandos siguientes tenemos que instalar el
paquete "quantmod" y llamar su librería.
n = FALSE)[,4]
sign = FALSE)[,4]
gn = FALSE)[,4] Con "getSymbols" podemos importar datos de la pagina YAHOO
FINANCE, necesitamos las siglas de cada empresa asi como el
ssign = FALSE)[,4] periodo con el que se va a trabajar. Como necesitamos el precio
de cierre añadiremos [,4] que se refiere a la columna número 4.
sign = FALSE)[,4]
= FALSE)[,4]
= FALSE)[,4]
ubset = "2009")
et = "2009") El rendimiento de la empresa en un periodo de tiempo se
optiene usando "periodReturn", especificando el rango de
", subset = "2009") tiempo con el que se desea trabajar ya sea diario, semanal,
mensual o anual, para definir el año usamos "subset" .
set = "2009")
et = "2009")
nd,UnderAmourRend,PanasonicRend,SonyRend,FacebookRend,NetflixRend)
McDonalds
Desviacion Estandar Promedio Anual
2009 0.0621263 -0.001730259 2009
2010 0.03477632 0.01720647 2010
2011 0.02989411 0.02231509 2011
2012 0.03101618 -0.0107287 2012
2013 0.03458459 0.007941656 2013
2014 0.02927897 -0.00291017 2014
2015 0.0480083 0.01931435 2015
2016 0.03892122 0.002487748 2016
2017 0.03035434 0.02887238 2017
2018 0.04900099 0.002597755 2018
2019 0.03599409 0.008615155 2019
Nike
Desviacion Estandar Promedio Anual
2009 0.09949172 0.01827429 2009
2010 0.06472451 0.02140546 2010
2011 0.07377165 0.01005123 2011
2012 0.07840875 0.005706152 2012
2013 0.04900634 0.03511324 2013
2014 0.05855116 0.01675242 2014
2015 0.04857 0.02186702 2015
2016 0.03664309 -0.01722332 2016
2017 0.06364089 0.01728995 2017
2018 0.06108164 0.01416575 2018
2019 0.06881033 0.0255986 2019
Panasonic
Desviacion Estandar Promedio Anual
2009 0.116622 0.01070559 2009
2010 0.08012066 -0.001464595 2010
2011 0.05721116 -0.04326119 2011
2012 0.1433738 -0.02697349 2012
2013 0.04195055 0.05440046 2013
2014 0.06698736 0.0007824784 2014
2015 0.09228691 -0.01250438 2015
2016 0.06521632 0.000246427 2016
2017 0.04048846 0.03083909 2017
2018 0.05692895 -0.04103456 2018
2019 0.07736498 0.003627704 2019
Facebook
Desviacion Estandar Promedio Anual
2009 - - 2009
2010 - - 2010
2011 - - 2011
2012 0.217334 -0.04524471 2012
2013 0.1527725 0.05994053 2013
2014 0.06946041 0.02966799 2014
2015 0.05418393 0.02447932 2015
2016 0.05377514 0.007887484 2016
2017 0.04633646 0.03564395 2017
2018 0.07604739 -0.02476752 2018
2019 0.09135642 0.03702031 2019
1 Toyota
2 Ford
3 McDonalds
4 Starbucks
5 Nike
6 Under Armour
7 Panasonic
8 Sony
9 Facebook
10 Netflix
Ford
Desviacion Estandar Promedio Anual
0.2736132 0.1168686
0.1151129 0.0431832 Interpretación:
0.08885376 -0.037079
Podemos observar que el año con menor
0.0837961 0.01543835 riesgo para Toyota es el 2019 y el de
0.06136461 0.01460149 mayor promedio el 2012, y para Ford el
2017 y 2009 respectivamente.
0.065841 0.0003771965
0.05179902 -0.007947892
0.06163526 -0.01248197
0.03708194 0.002437217
0.0739167 -0.04085189
0.08241 0.01582649
Starbucks
Desviacion Estandar Promedio Anual
0.1174093 0.07097032
0.06462995 0.02764089 Interpretación:
0.05496423 0.02992237
0.08772278 0.01277083 Podemos observar que el año con menor
0.04065859 0.03163231 riesgo para McDonals es el 2014 y el de
mayor promedio el 2017, y para
0.04524191 0.003802708 Starbucks el 2013 y 2009
0.04543754 0.03172189 respectivamente.
0.04333708 -0.006508425
0.04582716 0.002818625
0.06799242 0.009545571
0.05797278 0.0254866
Under Armour
Desviacion Estandar Promedio Anual
0.1785315 0.006943153
0.1034129 0.05821939 Interpretación:
0.1073528 0.02244378
0.07418405 0.02513201
0.05279414 0.0489307 Podemos observar que el año con menor
riesgo para Nike es el 2016 y el de mayor
0.101997 0.03681939 promedio el 2013, y para Under Armour
0.0737628 0.01429889 el 2013 y 2010 respectivamente.
0.08273244 -0.02728809
0.1443156 -0.05830909
0.1291365 0.01687991
0.1113109 0.01549162
Sony
Desviacion Estandar Promedio Anual
0.1222734 0.02340077
0.1089534 0.01734458 Interpretación:
0.08511262 -0.05690326
0.135291 -0.03972315 Podemos observar que el año con menor
riesgo para Panasonic es el 2017 y el de
0.1384214 0.03618455
mayor promedio el 2013, y para Sony el
0.08471225 0.01406933 2017 en ambos aspectos.
0.1053824 0.01534938
0.1004427 0.01084354
0.06107504 0.03935628
0.06750942 0.005955549
0.0774425 0.02819702
Netflix
Desviacion Estandar Promedio Anual
0.09493854 0.05100946
0.1305757 0.09665082 Interpretación:
0.2570929 -0.07753979
0.2520756 0.02415672
Podemos observar que para Facebook y
0.1614899 0.1150303 Netflix el año con menor riesgo es el
0.1372073 -0.006239586 2017 y el de mayor promedio el 2013.
0.1357785 0.01534938
0.1244037 0.006595098
0.07711569 0.03655164
0.1431834 0.02770254
0.1029444 0.01574117
2009/2019
Desviacion Estandar Promedio Anual
0.055831 0.005794696
0.1127156 0.0100338 Interpretación:
0.03996831 0.00854377
0.06560226 0.02180034 Podemos observar que McDonals
presenta el menor riesgo y Netflix el
0.06457452 0.01536371 mayor promedio durante el periodo
0.1110397 0.01450561 2009/2019.
0.08344461 -0.002239679
0.1020864 0.008552234
0.1032484 0.0182229
0.1591065 0.03278536
TOYOTA FORD
MCDONALS STARBUCKS
NIKE UNDER ARMOUR
PANASONIC SONY
FACEBOOK NETFLIX
GENERAL
VEHICULOS
FASTFOODS
NDER ARMOUR SPORTS
ELECTRONICS
SOCIAL MEDIA
Interpretación:
Interpretación:
Interpretación: