File Exchange

image thumbnail

View and add transaction to portfolios on Google Finance

version (5.79 KB) by pangyuteng
View and add transactions to portfolios on Google Finance. A Google account will be required.

1 Download

Updated 03 Sep 2011

View Version History

View License

Attached are two very simple functions demonstrating how you can view and add transactions to portfolios on Google Finance from Matlab.

Update: I can only get these functions to work on Matlab 2008b 32-bit version, the 64-bit version does not work on my PC.

Cite As

pangyuteng (2021). View and add transaction to portfolios on Google Finance (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)


Hello. *** per many of you noted below, the old API to grab data from yahoo is no longer live ***
I have stopped maintaining the code at file exchange for a few years now, and have transitioned to Python. For those interested in moving to python (python is free, and the community is huge, its great for many things including quantitative finance and data analysis), checkout these free libraries: numpy, pandas, matplotlib, quandl, yfinance; for back-testing,live-testing platforms, checkout Quantconnect (commercial) and Zipline (used to be maintained by Quantopian, which their platform will soon be closed from public use).
I have provided below an example python jupyter notebook to get price and other info from yahoo:
You will just need to install Git and Docker which are all free. Steps to build the container and launch the notebook is provided here:
yfinance site:
more data here (historical daily/monthly equity price, index, rates) with python api.
and here daily/minute price, i believe they have bid ask price also, and historical option data! you'll need to use their jupyter notebook online.

if you have basic docker,python issue, you will just have to google or search in stackoverflow!


Hi Emad. Unfortunately, Google no longer offers this service.* See the following link for alternative methods. Please do share your solutions on the FEX! :)


Emad Hasan

Hi, Does this code still work? I just tried it on a 32-bit 2013b but did not work. Got the following error.

Java exception occurred: Server returned HTTP response code: 403 for URL:

at Source)

from line: 73


I am trying googlePortfolioHoldingsExample and getting Java exception:

Java exception occurred: Server returned HTTP response code: 403 for URL:

at Source)

from line: 73

Is this API still working?


glad you liked it! thanks for the 5 star rating. :)


Ted, again a smart idea.


Please note that this function will not work on the 64-bit version of Matlab.


I got that error in my other computer too.
The above link may provide a solution to our encountered error.

Emad Hasan

Great Idea, but I am getting the following error. Please advise.

??? Error using ==> connectAndAuthorize at 49
Java exception occurred: The issuer can not be found in the trusted CA list.

at ice.ssl.SSLSocket.processEvent(OEAB)

at ice.ssl.SSLSocket.certCallback(OEAB)

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!