Showing posts with label Google Finance. Show all posts
Showing posts with label Google Finance. Show all posts

creating online stock portfolio of nifty 50 in google finance

Wednesday, March 2, 2011

Google finance provides almost real time stock data.Nifty 50 stock on NSE niftyspark is delayed by ~ 2 min and refresh is not automatic.google data is almost real so its worth it to create nifty 50 portfolio on google. the only catch is you have to create it manual. I created it for myself. I am posting all the manual work so other don't have to go through the same.


step 1: click on portfolio
step 2: create a new portfolio
step 3: click on edit portfolio
step 4: add all the symbol list for respective portfolio in the text box and save

that's itttt!
you have created your nifty portfolio. enjoy
------------------------------------------------------------------------------------------------------
NIFTY 50
------------------------------------------------------------------------------------------------------
NSE:SUZLON NSE:MARUTI NSE:AXISBANK NSE:NTPC NSE:LT NTPC:IDFC NSE:BPCL NSE:HCLTECH NSE:HINDALCO NSE:ICICIBANK NSE:BAJAJ-AUTO NSE:RCOM NSE:TATAMOTORS NSE:SUNPHARMA NSE:DLF NSE:HDFCBANK NSE:TATASTEEL NSE:SAIL NSE:STER NSE:HDFC NSE:AMBUJACEM NSE:SESAGOA NSE:RANBAXY NSE:GAIL NSE:INFOSYSTCH NSE:BHEL NSE:SBIN NSE:PNB NSE:RELIANCE NSE:ITC NSE:RPOWER NSE:DRREDDY NSE:KOTAKBANK NSE:JINDALSTEL NSE:BHARTIARTL NSE:CIPLA NSE:HINDUNILVR NSE:HEROHONDA NSE:CAIRN NSE:ONGC NSE:RELINFRA NSE:WIPRO NSE:RELCAPITAL NSE:ACC NSE:TCS NSE:POWERGRID NSE:SIEMENS NSE:TATAPOWER NSE:BAJAJ-AUTO BOM:500520 NSE:JPASSOCIAT
-------------------------------------------------------------------------------------------------------
NIFTY MIDCAP 50


NSE:ASHOKLEY NSE:IVRCLINFRA NSE:JSWSTEEL NSE:HOTELEELA NSE:PATELENG NSE:AUROPHARMA NSE:HDIL NSE:PETRONET NSE:PUNJLLOYD NSE:MOSERBAER NSE:APIL NSE:ANDHRABANK NSE:ALBK NSE:HCC NSE:TECHM NSE:SCI NSE:MPHASIS NSE:BAJAJHIND NSE:ROLTA NSE:INDHOTEL NSE:PRAJIND NSE:IDBI NSE:VIJAYABANK NSE:NAGARCONST NSE:LUPIN NSE:SINTEX NSE:CESC NSE:TTML NSE:TATACHEM NSE:UNIPHOS NSE:BEML NSE:GESHIP NSE:MTNL NSE:INDIANB NSE:INDIACEM NSE:ULTRACEMCO NSE:LITL NSE:DIVISLAB NSE:CHENNPETRO NSE:SYNDIBANK NSE:TITAN NSE:OFSS NSE:TATAGLOBAL NSE:GVKPIL NSE:EDUCOMP NSE:CUMMINSIND NSE:WELCORP NSE:VOLTAS NSE:PIRHEALTH NSE:STERLINBIO


----------------------------------------------------------------------------------------------------
BANKNIFTY

NSE:AXISBANK NSE:ICICIBANK NSE:BANKINDIA NSE:ORIENTBANK NSE:HDFCBANK NSE:IDBI NSE:UNIONBANK NSE:SBIN NSE:PNB NSE:KOTAKBANK NSE:BANKBARODA NSE:CANBK
----------------------------------------------------------------------------------------------------

** The stocks in nifty index keep changing as NSE review it regularly so small correction is needed time to time

Read more...

Downloading 2 min, 5 min Nifty or stock data for free

Monday, September 27, 2010

The national stock exchange opens at 9:00 AM and closes at 3:30 PM (IST) on any trading day. This converts to total of 390 minutes of trading period. Most of our trading strategy is generally based on EOD data for long term trading but for short term and intraday trading we need the the historical data in different time interval such as 2 min, 5 min, 10 min,15 min,30 min data to back test our trading strategy.

so, how can we get free data of all these interval (2,  5,  10,  15,  30, or any custom interval)?
These data are really costly if we buy it from any data vendor. since tick-by-tick data size is very big and difficult to maintain even vendors like Quote center take a 5 sec snapshot of the data for their distribution and that too is available for 2-3 month. only program trading needs that kind of data access. For other strategies intervals mentioned above are sufficient.Below I am going to show you how to get 2 min data for any stock or index for last 30 days from google finance.

http://www.google.com/finance/getprices?q=SUZLON&x=NSE&i=120&p=2d&f=d,c,o,h,l

Utilizing the getprices function we can fetch the data from google finance according to our need.
All the parameters used in the link are quite obvious.you can read my earlier post to know it in detail.

Here, I will focus on how to get 2 min and 5 min data  for last 1 day , 2 days , 30 day.
-------------------------------------------------------------------------------
Getting 2 min data for today (or last trading day)

1. put q= your STOCK SYMBOL (in google finance)in CAPITAL LETTER
       i=120  : for  2 min dat , 300 for 5 min data
       p=1     : or 2 or put 1000 or any big number >100 to get all the data   
                   available (max 30 days data can be obtained using this)

so we have a total 330/2 =195 data for 2 min interval. On entering the above parameters in the link you will get around 195-205 data. At closing some extra data points are taken. how does the out put look like ?

EXCHANGE%3DNSE
MARKET_OPEN_MINUTE=540
MARKET_CLOSE_MINUTE=930
INTERVAL=120
COLUMNS=DATE,CLOSE,HIGH,LOW,OPEN
DATA=
TIMEZONE_OFFSET=330

a1285299120,53.85,54.2,53.6,53.8
1,53.75,53.9,53.7,53.85
2,53.7,53.8,53.65,53.75
3,54,54.1,53.75,53.75
4,54.15,54.2,54,54
5,54.25,54.35,54.1,54.1
6,54.15,54.25,54.1,54.25
7,54.1,54.2,54.05,54.2
8,54.1,54.2,54.05,54.05
...
...
...

195,54.2,54.2,54.2,54.2
199,54.35,54.35,54.35,54.35
205,54.35,54.35,54.35,54.35
206,54.35,54.35,54.35,54.35
207,54.35,54.35,54.35,54.35
208,54.35,54.35,54.35,54.35
209,54.35,54.35,54.35,54.35

first column is showing the column No and others are respective data.
a1285299120   is a time stamp.
this file can easily be copied and saved in a spread sheet and can be converted to csv file.
-------------------------------------------------------------------------

Read more...

Free Intraday Data From Google Finance

Wednesday, February 24, 2010


How to free download last one month intraday data from Google finance?
 In Google finance, we can view even the intra-day stock chart for last one month may be even more for 1 minute time interval. As we increase the time interval the view span can be increased significantly. But there is no link to download this data directly.  I dig into Google finance and find out something very interesting. Whatever the chart you can see for an individual symbol, you can  download it also but with a little pain than yahoo finance  For intraday or 1min, 5 min, 30 min or 1 hr interval there is no way we can download it from yahoo finance. So here comes the Google finance to help us out.
Copy the link below and paste into the browser
q= stock symbol on Google finance
x= exchange symbol
i= interval (here 1=120 means 120 sec (2 minute interval))
p= no of period
f= parameters (day, close, open, high and low)
df= difference (cpct is may be in % change , not sure)
auto =1, and ts value I don’t know.
Here I have chosen period p=1000d to get the maximum data possible. you can choose your own set of value depending upon your need.
After getting the data copy and paste the data into a spreadsheet and format little bit to make it usable.
Though I have found it works pretty well for me. IF it has any error then any comment and suggestion is invited to improve it.  Any way it is free so giving a try is worthwhile since you have nothing to lose. I hope you will like it. Enjoy the free data mining

Read more...

Back to TOP