Google Finance: your personal financial assistant. Experience using Google Finance Google finance in Russian

  • 06.04.2020

Good afternoon!

Written based on this post, about the experience of accounting for a portfolio and transactions

I have a simple portfolio of stocks that I have been collecting since February 2015. Here it is almost relevant: I haven’t updated it for a month, I was just sorting out with Google Finance. Taking into account the “buy and hold” strategy, the volume of transactions is small, but the history has accumulated. At some point, the reports from the broker and my simple Excel were not enough, I wanted to see the dynamics, compare with different indices, in a word - play around.

I started a portfolio on SL - clearly, nicely, but alas, I hope that I can’t add deals yet - I have an issuer that was previously entered and a new deal for it goes in 2 lines, I have to demolish it completely and start it on a new one. Again - do not look at the dynamics, divas and so on. But on SL I somehow read that you can use Google finance and even the received divas can somehow be taken into account there, I decided to try it.

The experience has been contradictory. Below are the main 2 ambush that I encountered and which my experiment has been suspended for now. I am thinking: are the results worth the effort, is it not easier to live in Excel. Maybe I'm doing something wrong, I'll be glad for good advice.

1) I'll call this ambush Pref Data Accuracy. Unfortunately, GF incorrectly raises prices for prefs. At the same time, it does not indicate in the name that it is a pref, it is visible only by the ticker. And it's not at all the case that the price in the tables is displayed incorrectly, and the price on the chart on the issuer's page is displayed correctly.
Examples (first a link to the GF issuer's page, then to the Moscow Exchange):
Sberbank
www.google.com/finance?q=MCX:SBERP&ei=FTQsWbnjOsOFsAH0i7KIAw
www.moex.com/ru/issue.aspx?board=TQBR&code=SBERP
Surgut
www.google.com/finance?q=MCX:SNGSP&ei=FTQsWbnjOsOFsAH0i7KIAw
www.moex.com/en/issue.aspx?board=TQBR&code=SNGSP
NKNKH
www.google.com/finance?q=MCX:NKNCP&ei=FTQsWbnjOsOFsAH0i7KIAw
www.moex.com/ru/issue.aspx?board=TQBR&code=NKNCP
And the same for Tatneft, Rostelecom and other prefectures. In the tables, respectively, the data on prefs is incorrect, and in general the picture is distorted.
He wrote in support of GF, threw links to the English pages of issuers on the Moscow Exchange - to no avail.

2) I'll call the second ambush "Import with miracles." At first, I did not import the entire history of transactions, but simply entered the available data on issuers, the number of shares and average price on the start date of the experiment and started making subsequent trades. The current picture was displayed quite well, although the portfolio looks prettier on the SL. But this, of course, did not give a complete and objective picture and dynamics from the beginning of investments. I looked at the volumes of historical data, I decided to try to import history in the context of transactions. I uploaded the data from the broker (AD) and then dances with a tambourine began, caused by differences in formats (date, commas and dots in prices). Well, I also chose to start loading by individual issuers and almost immediately caught an unexpected ambush: for some reason, when importing, a strange metamorphosis occurs with dates. Date 01/13/2017 GF imports normally, but 02/12/2017 it converts to December 2, 2017! That is, it flips any date with a number from 1 to 12 and perceives the first digit as a month. I'm trying to solve this problem by converting it in Excel, but it's too laborious.

Here is such a poor experience so far. If I cope with these ambushes, then most likely I will continue to use GF, but for now - excel is our everything!

There is a class of algorithms based on the correlation of asset prices in different markets. In order to explore such correlations, for example, between American and Russian market, it is necessary to have access to real-time data from Western exchanges, the supply of which is offered by special providers for a fairly substantial fee. However, it is possible to use real-time data parsing from the Google Finance website instead of a paid data feed. Of course, a high-frequency strategy cannot be built on such data, but for slower strategies, this method is quite suitable. However, at high frequencies there is no strong correlation with the Americans for a long time, and HFT algorithms with this idea do not work, but at long time intervals there is a very wide field for research. How to get data from Google Finance is discussed in the blog Pawel Lachowicz, the translation of which is given below.

In this post, we'll look at how to get real-time data streamed on the Google Finance website to use as backtest input or in a live trading application. This data can be used for intraday trading systems. The title of the post shows an example of displaying Apple quotes on Google Finance.

The core of our Python code is a small function that does the bulk of the work. For a specific company ticker on the Google site, it parses the data directly from the site, getting the latest current price of the asset:

# Hacking Google Finance in Real-Time for Algorithmic Traders # # (c) 2014 QuantAtRisk.com, by Pawel Lachowicz import urllib, time, os, re, csv def fetchGF(googleticker): url="http://www.google .com/finance?&q=" txt=urllib.urlopen(url+googleticker).read() k=re.search("id="ref_(.*?)">(.*?)<",txt) if k: tmp=k.group(2) q=tmp.replace(",","") else: q="Nothing found for: "+googleticker return q

For the program to work correctly, you need to make sure that the ticker is written correctly (as will be shown below). Next, display the local current time on the screen and then change it to New York (stock) time. We do this because we will be getting the prices of stocks traded on the NYSE or NASDAQ. If you want to receive the values ​​of the English FTSE100 index, then you need to change the time to universal (London):

# display local time print(time.ctime()) print # set NYC time os.environ["TZ"]="America/New_York" time.tzset() t=time.localtime() # string print(time.ctime ()) print

Having done this, we apply a third-party function combine to put all read data into a Python list variable:

Def combine(ticker): quote=fetchGF(ticker) # use kernel function t=time.localtime() # capture time point output= return output

At the entrance, we submit the ticker of the company we are interested in from the Google website:

Ticker="NASDAQ:AAPL"

for which we open a new text file, where we will save all requests in real time:

# set the file name for the entry fname="aapl.dat" # remove the file if it already exists os.path.exists(fname) and os.remove(fname)

Next, we create the final cycle for the entire trading day. In our example, we get the latest data at 16:00:59 New York time. The key parameter of the program is the freq variable, where we set the frequency of intraday data slicing (in seconds). The author determined that the optimal value would be 600 seconds (10 minutes), since with more frequent requests, Google Finance can detect high activity from your IP and consider it a flood. However, you can find the smallest value for your IP.

Freq=600 # request data every 600 sec (10 min) with open(fname,"a") as f: writer=csv.writer(f,dialect="excel") #,delimiter=" ") while(t. tm_hour<=16): if(t.tm_hour==16): while(t.tm_min<01): data=combine(ticker) print(data) writer.writerow(data) # записываем данные в файл time.sleep(freq) else: break else: for ticker in tickers: data=combine(ticker) print(data) writer.writerow(data) # записываем данные в файл time.sleep(freq) f.close()

To test how the program works in practice, the author ran it on January 9, 2014 New York time 03:31:19. The received data was written to a file in the following form:

Thu Jan 9 03:31:19 2014 ...

It is important to note that the time that we record and try to associate with the time of the received quote is the local time of the computer, so do not expect equal time intervals between values ​​and high fixation accuracy. However, in our case, when we want to evaluate the correlation over fairly long periods, the timing accuracy is not as important as it is in the case of high-frequency strategies. Please note that if the Internet connection is unstable, gaps in the data may appear, as can be seen in the example above.

The presented code can be easily modified if you want to receive data on several assets at once. Just replace part of the code in the above program, starting with the definition of the ticker variable, with the following code:

Tickers=["NASDAQ:AAPL","NASDAQ:GOOG","NASDAQ:BIDU","NYSE:IBM", \ "NASDAQ:INTC","NASDAQ:MSFT","NYSEARCA:SPY"] # define the output name fname="portfolio.dat" # delete file if it already exists os.path.exists(fname) and os.remove(fname) freq=600 # query data every 600 sec (10 min) with open(fname," a") as f: writer=csv.writer(f,dialect="excel") #,delimiter=" ") while(t.tm_hour<=16): if(t.tm_hour==16): while(t.tm_min<01): #for ticker in tickers: data=combine(ticker) print(data) writer.writerow(data) time.sleep(freq) else: break else: for ticker in tickers: data=combine(ticker) print(data) writer.writerow(data) time.sleep(freq) f.close()

Recording quotes in real time turned out like this:

Thu Jan 9 07:01:43 2014 ...

where we can see the current price values ​​for 6 stocks and one ETF every 10 minutes.

In conclusion, I would add on my own that it would be interesting to explore the correlation between US and Russian commodity companies, there may be a good time gap there.

    Google Finance- est un service en ligne gratuit publié par Google en 2006. Il permet de suivre le cours d actions et de devises. v d … Wikipedia en Français

    Google Finance- Infobox Software | name = Google Finance caption = A screenshot of MasterCard s stock graph shown on Google Finance. developer = Google latest release version = latest release date = latest preview version = latest preview date = operating system … Wikipedia

    Google Finance- Google URL http://www.google.de (Deutsche Version) http://www.google.ch (Schweizer Version) http://www.google.at (Österreichische Version) ... Deutsch Wikipedia

    Google- Cet article concerne l entreprise Google Inc. Pour le moteur de recherche, voir Google (moteur de recherche). Pour les autres significations, voir Google (homonymie). Logo de Google ... Wikipedia en Français

    Google (services en ligne)

    Google translator- Liste des services en ligne de Google Google propose de nombreux services en ligne et tente de s imposer comme leader sur ce marché. En voici une liste (pas forcement exhaustive). Sommaire 1 Classement par date de lancement 1.1 1998 1.2 2000 ... Wikipedia en Français

    Google- (Google) The largest Google search engine, Google services and tools The history of the creation of Google search, the owners and management of Google, Google Apps, Google Maps, Google Chrome, Google Earth, Picasa, Google Video, Google Images Google+,… … Encyclopedia of the investor

    Google (homonym)- Cette page d'homonymie répertorie les différents sujets et articles partageant un même nom. Google peut désigner: l entreprise Google son moteur de recherche Google (moteur de recherche) Google China, filiale chinoise de Google PageRank… … Wikipédia en Français

    Google Data Liberation Front- Le Google Data Liberation Front (En français: Front de libération des données Google) est une équipe de l ingénierie chez Google, dont l objectif est de faciliter le déplacement des données des utilisateurs dans et hors des services de… … Wikipédia en Français

    Google.org- is the charitable arm of Internet search engine company Google. It lists its mission as helping with global poverty, energy and the environment. It is a for profit charity, which means it is taxable. This also allows them to lobby and fund… … Wikipedia

Books

  • Python. Application creation. The Professional's Library, Wesley J. Chan. Do you already know Python but want to learn more? A lot more? Immerse yourself in a variety of topics related to real applications. The book covers regular expressions, networking…
  • Banker's Guide to New Small Business Finance. Venture Deals, Crowdfunding, Private Equity, and Technology , Charles Green H.. Detailed, actionable guidance for expanding your revenue in the face of a new virtual market Written by industry authority Charles H. Green , Banker's Guide to New Small Business Finance…

Google Finance is a financial service that provides comprehensive information about corporations listed on North American stock exchanges and their stock quotes. Unlike many Google services, this one has not yet been localized. So Russian users will have to deal with the English interface.

To use the service, you must have a Google Account. Once you log into Google Finance for the first time, you will find a wealth of business information - business news, stock market reports, data on which sectors of the economy (health, energy, transportation, technology, etc.) have risen, videos, and etc.

As soon as you add stocks of companies you plan to follow to your virtual portfolio, the picture will change significantly - with each subsequent visit to Google Finance, you will also see news on these companies of interest.

In general, Google Finance is ideal for two tasks - finding information about companies whose shares are listed on the stock markets, and tracking changes in the value of the shares of corporations in which you have invested your funds.

When you type in the search bar, for example, Avtovaz, Google Finance will offer several options while typing, trying to "predict" what exactly you are interested in. Let it be the Volga Automobile Plant, so we will choose AVTOVAZ OAO (AVAZ) from the proposed options. Almost immediately, Google Finance will tell you what the company does (for example, AvtoVAZ, according to Google, in addition to car production, is active in sectors such as insurance, banks, finance), where it exports its products, how many employees, what is the legal address and telephone number. Moreover, you will even receive information about the company's management - who holds what position, what is their age. The only thing that, in my opinion, is missing is the links opposite the surnames for searching on the Internet (to find out, for example, the former place of work).


If you are interested in a Western company, the amount of information will be even greater. You will not only be told who manages the company, but they will also give you links to the biographies of managers, show their photos. If the company has a corporate blog, you will be given its address.

When you study information about a company, you should pay attention to the Related Companies section, which lists similar companies. And although this list is not compiled by hand, it is quite accurate. For Lukoil, only Russian companies are listed as Related Companies.


The statistics of the company's performance is quite detailed and includes about 20 positions (the figure varies depending on the amount of data provided).

When making a decision to buy or sell shares, any information can be useful. Google Finance displays not only news headlines, but also excerpts from blog posts. So for the sake of completeness, you can familiarize yourself with them. If you subscribe to a corporation's RSS feed, you'll read it in your favorite RSS reader. In Google Finance, you can create discussion groups for each company to discuss news and events.

A distinctive feature of Google Finance is the integration with other services of the search giant. If a listed company provides data on the schedule and plans for meetings, councils, conferences, etc., they can be imported into Google Calendar. And then you won't miss, for example, Lukoil Earnings Conference Call.


Google Finance also has tools for visual presentation of information. In particular, the service displays convenient charts of changes in stock quotes. You can define the time intervals for viewing, as well as make comparisons with the shares of other companies. Let's say you are a shareholder of Google and Yahoo! It is interesting to know which of the corporations turned out to be more profitable for you? With Google Finance, this is easy.

Equity portfolio management is conveniently organized. First, you can create as many portfolios as you need (say, one with energy stocks, another with technology stocks, a third with pharmaceuticals, and so on). Secondly, within the portfolio, you can specify transactions (purchase and sale, commission, explanatory note). Thirdly, all data can be saved in a CSV file for further work in a financial program or a familiar spreadsheet.

Interestingly, Google Finance did not follow the Web20 fashion and did not develop collaboration tools - only people who know your Google Account username and password can view and edit stock portfolios.

The disadvantages of Google Finance include the lack of notifications by e-mail or SMS about changes in the value of shares. As a result, you will not know when the stock price of the company you are interested in has dropped to the required level or, on the contrary, has not risen to the expected value.

Summing up, I would like to note that my impressions of using Google Finance have been extremely positive. This is a powerful and convenient service, aimed not at professional brokers (it probably won’t work for them), but at ordinary users, private investors, people who want to keep their savings.

As for the usefulness of Google Finance for Russians, this question is complicated. We are not yet accustomed to keeping money in stocks, and besides, GF tracks only those companies that are represented in North American markets. But, on the other hand, more and more domestic corporations are placing shares on foreign exchanges. In addition, Google Finance is also a great guide to companies. So it's never too late to follow in the footsteps of Ingebor Motz.