Insfosys Limited is the first Indian Tech company listed on Nasdaq in the year 1999 and shifted to NYSE in the year 2012. On the other hand Wipro Limited got its stock listed on NYSE in the year 2000. The mere fact that these two were only the top indian tech companies on NYSE since ages and because of their performance many investors believe to hold the shares. An in-dept analysis should be done before purchasing , holding or selling a stock based on speculation,
I implemented my working knowledge on stock market and R to analyze the stocks . Also i need to make it clear that i dont have any experience in stock market nor do i am an expert in this field, this project is just an experiment to improve my learning on Language R and Stock market.
Before you load the data u need few packages to be installed. All the packages that i used for this project are frequently used in quantitative finance.
library(quantmod)
Loading required package: xts
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: TTR
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
library(xts)library(plotly)
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(ggplot2)library(magrittr)library(broom)
Loading stock data
I had used Quantmod to load stock data from yahoo finance
An OHLC chart is a type of bar chart that shows open, high, low, and closing prices for each period. OHLC charts are useful since they show the four major data points over a period, with the closing price being considered the most important by many traders.
generally, the colors are green and red for OHLC charts but here i used blue and red.
first chart shows infosys prices and the next one shows wipro prices.
plot(as.zoo(stocks[,c("WIT.Close")]),screens =1,lty =c(1,3), col =c("blue"),xlab ="Months",ylab ="Price")par(new =TRUE)plot(as.zoo(stocks$"INFY.Close"),screens =1,lty =5, col ="yellow",xlab ="",ylab ="", xaxt ="n", yaxt ="n")axis(4)mtext("Price", side =4, line =3)legend("topleft",c("WIT(left)","INFY(right)"),lty =c(1,3,5),cex =0.5)
The infosys stock was trading at 25.31 USD at the beginning of the year. Since then, INFY shares have decreased by 23.1 percent and is now trading at 19.47 USD. Whereas Wipro stock was trading at 9.76 USD at the beginning of 2022. Since then, WIT shares have decreased by 49.7 percent and is now trading at 4.91 USD. Also, infosys is 8.2 percent upside the stock price where wipro is 2.5 percent downside.
Comparing the numbers and analysis, i still think i can surely hold infosys stock than the other.