23 February 2016

R Programming Certificate from John Hopkins University by Coursera

February 23, 2016
It's pleasure to receive Certificate from ‪‎coursera‬ for ‪‎R programming‬ course by prestigious JohnHopkins‬ University. Learned some important functions in R and planning to take Data science specialization further. 

Simple way to download and export stock data using R - Method 3

February 23, 2016
Simple way to download and export stock data using R - Method 3

you can read the method 1 here: http://www.iamsulthan.in/2016/04/step-by-step-tutorial-to-download.html If you have missed it.

In Security analysis and Portfolio management , the historical prices of a stock or indices is the base data for analysis in that case any researcher want to download and organize the data. Mostly they prefer to save the data in .csv file which is universally imported in any software. A difficulty or time consuming task for such researchers is to organize the data. for example: to check for any missing prices or to organize the closing prices in single worksheet for all companies in case of a multivariate analysis.

Using the following code you can download and export the data to .csv format which can be later used in any other data analysis softwares if you wish whereas R can do almost what other softwares do . It just need proper command to execute your research objectives.

Github link for the code can be located here: download-historical-stock-data-in-R

Use the following code:


####Using quantmod####
####Single Stock data####
getSymbols("WIPRO.NS", from="2015-01-01", to= Sys.Date())

#### multiple Stocks data Method-1 (each as seperate dataset) ####
getSymbols("WIPRO.NS;TCS.NS;INFY.NS", from="2015-01-01", to= Sys.Date())

#### multiple Stocks Method-2 (using list)####
stocklist <- c("WIPRO.NS","TCS.NS","INFY.NS","AAPL" )
getSymbols(stocklist, from="2015-01-01", to= Sys.Date())

####multiple Stocks Method-3####
stocklist <- c("WIPRO.NS","TCS.NS","INFY.NS","AAPL") # create list of stock tickers
Adjclose <- NULL
for (Ticker in stocklist)
  Adjclose <- cbind(Adjclose,getSymbols.yahoo(Ticker, from="2015-01-01", to= Sys.Date(), verbose=FALSE, auto.assign=FALSE)[,6]) #get data for companies in list, [,6] = keep the adjusted prices
FinalAdjclose <- na.locf(Adjclose) #copy last traded price in empty cell
FinalAdjclose1 <- Adjclose[apply(Adjclose,1,function(x) all(!is.na(x))),] #keep only dates having closing price
####Export the data to excel####
data <- as.timeSeries(FinalAdjclose1)
write.csv(data, "data.csv")

22 February 2016

Why R? Pros and Con

February 22, 2016
Why R? Pros and Con

R is a open source programming software for statistical computing and graphics. You can download and install R in any platform either it may be Windows, Mac or Linux. the free and official download of the software can be done in the following link https://cran.r-project.org/ .

Installed R then its always recommended to use a IDE for R. there are few good IDE for R most of them are open source and you can find it at no cost. My best choice and I hope most agree with me that RStudio is the best IDE for R programming. you can download the RStudio using the link : https://www.rstudio.com/

Pros of using R:

1. Suits for statistical analysis: The environment in R is well suited for statistical analysis and it does handle big data quiet fast and ease.
2. open source and cross platforms: R is open source and do work in cross platforms. regardless of any OS whether it may be in Windows, Mac or Linux(debian, redhat, suse, ubuntu).
3. add-ons: This is the important reason that I recommend using R. researcher around the globe develop and distribute the packages in CRAN (Comprehensive R Archive Network). two useful websites where you find addons are here:
                                    Comprehensive R Archive Network                                   Crantastic
these networks grow very fast and The packages number are increasing day by day. 
4. Flexibility: Because R is programmed by users the package is very flexible and when you make use of the available scripts it will save you a huge time .

Con of using R

1.Minimal GUI: you cant simply say that R is completely command based. there are few GUI that makes analysis easy. (for ex: Rcmdr). people used to work with GUI will find it hard when the task is to be done in command based environment.

Over all I would say that for researchers who are interested in exploring the data will feel R as very helpful and It can help you to develop your ideas in to package and share it with CRAN which makes your research significant among the users. 

16 February 2016

Tips on Night reading / to avoid strain in eyes

February 16, 2016
I read pdf daily it would be a Journal, Book, report , Encyclopedia and/or etc.., The problem I face while reading pdf in my laptop or tablet is that my eyes feels strain very soon after reading quite for sometime. The reason for this because of the white background in the pages of pdf file. So, here I got some tips to modify your settings in adobe reader which will help your eyes from getting strained. Follow the procedures below.

1. Default look of a pdf in Adobe reader

2. go to Edit> preferences 

3. In custom color by default the Page background will be White and Document Text will be Black

4. Change the page background to black and Document text to white

5. there u can see the change and its better now for yours eyes and you can keep reading for long time without strain on your eyes.

Note: after the change the images in the pdf may not look the same it may disappear because of setting and when you reset the settings you can have a look at images in pdf.

01 February 2016

Online shopping - sharing my experience (Amazon, ebay, Flipkart, Snapdeal, Shopclues and Paytm)

February 01, 2016

Online retailers are in a great hype in India since past couple of years. International retailers such as Amazon, ebay are getting a stiff competition with Indian retailers Flipkart, Snapdeal and Paytm. some new retailers in line are shopclues, indiatimes shopping and etc..,

My experience:
Back in 2010 I bought my first product from online seller that is a 30X telescope from ebay . Since then I have purchased many products from a size of All-in-one printer to a micro sdcard too myself and helped my friend in ordering for them in all major online retailers. lately I just bought a Micro USB Data Cable - Pack of 2 from ShopClues which is a deal for buy for Rs1!! , the actual price for cable is shown as Rs.899. checkout price total up to Rs.50 including shipping charges as Rs.49. when the shipment arrived without any surprise as expected the product was damn cheap quality.

at shopclues

Be aware of discount and be rational!!

Indian customers are rational that is a known fact and I think many producers and sellers take the advantage of the rational thinking by any of the following strategy.

  • discount (by over pricing the product)
  • save Rs.10 (but also look at the weight of the product!)

In my opinion listing in Flipkart, Snapdeal, Paytm and Amazon are mostly of good quality and reasonable price. In case of listing in shopclues you can come across many cheap quality products but of course at a very cheap price. While ebay is concern it has all kind of products its is up to you in choosing the product and seller. If you choose a good retailer you will get a good quality product too. and In my opinion some products are cheap in ebay when compared to other retailers.

So do your research while buying any product and don't forget to look up for any coupon code while purchasing that really save you a reasonable amount.