Your 'Go To' for Custom Excel Solutions
excel-applications-blue2

Share Trading Portfolio

A Free spreadsheet by the XLAutomation development team to assist share traders. It includes an automated feature that gives you the ability to extract share price data from another website for use in portfolio analysis

Share Trading Portfolio...automated share price extract

Do you use a spreadsheet to record your trades ? Do you have to manually update your open positions with the latest prices to calculate your portfolio performance ? We have developed another free spreadsheet that will automatically scan your list of trades and return the current market price from Yahoo Finance and recalculate the profit/loss for each position and the total trading portfolio.

Share Trading Portfolio fixed.....new version released 3rd January, 2018

A recent change (Nov, 2017) in the Yahoo Finance website effectively disabled the function that returned prices for this free spreadsheet. The XLAutomation team has now developed a fix for this issue and it is now available for download. If you previously downloaded the Share Trading Portfolio, download it again to receive the new version.

Here is the Share Trading Portfolio in action...

Share-Trading-Portfolio-v2

Key Code Components

We provide a sample Excel workbook at the bottom of this post with all the required code to extract current market price from Yahoo Finance for your listed securities. The key code components to achieve the extract are shown below with some explanation. If you have questions or comments on our approach please let us know in the comments at the end of the page.

Private Function strGetCurrentFinanceData(strURL As String) As String
'Extract the data from the Web URL

Dim strResult As String
Dim objRequest As WinHttp.WinHttpRequest

strGetCurrentFinanceData = ""

Set objRequest = New WinHttp.WinHttpRequest
With objRequest
.Open "GET", strURL, False
.setRequestHeader "Content-Type", "text/html"
.send
.waitForResponse (10)

strGetCurrentFinanceData = .responseText
End With

End Function

Sample Excel Workbook

Download the sample workbook and update it with your trade details, click on "Update Prices" to search for and return the current market price for each trade.

Note: This workbook has been tested on Windows running Office 2013. No testing on MAC has been performed. It may work for a MAC environment but will require Windows virtualisation.

Download Your Free Share Trading Portfolio

Enter your details below to receive your free spreadsheet. 

Another Free Spreadsheet by XLAutomation.

If you found this spreadsheet helpful please make a donation.

promise

 

Our Promise: "We will only use your contact details to share the latest news, free spreadsheets and product information from the XLAutomation team. We will never share your contact details with anyone else.

Tell us what you think...

Thanks to the trading community who have downloaded our spreadsheet. We would love to know how useful you've found this solution, and if you think we could include anything else to make it even better! Leave a comment and let us know.

1 Comment

  1. AlainD on January 11, 2018 at 6:56 am

    Thank you for fixing it, will try it again soon

Leave a Comment