value of a CUSIP number in GoogleDocs?
Moderator: Global Moderator
value of a CUSIP number in GoogleDocs?
Has anyone figured out a reliable way of pulling in specific LTT treasure values, by CUSIP number, real-time into GoogleDocs?
Many thanks
Many thanks
- dualstow
- Executive Member
- Posts: 15210
- Joined: Wed Oct 27, 2010 10:18 am
- Location: searching for the lost Xanadu
- Contact:
Re: value of a CUSIP number in GoogleDocs?
Perhaps not, but if you haven't seen this page,
scroll or search for "fnord123's method"
scroll or search for "fnord123's method"
Buffett has announced plans to step down as Berkshire Hathaway chief executive by the end of the year after a storied 60-year run. —WSJ
Re: value of a CUSIP number in GoogleDocs?
Value of a bond by CUSIP?
Done.
https://docs.google.com/spreadsheet/ccc ... CQ3c#gid=0

Let me know if you have any questions.
Done.
https://docs.google.com/spreadsheet/ccc ... CQ3c#gid=0

Let me know if you have any questions.
everything comes from somewhere and everything goes somewhere
Re: value of a CUSIP number in GoogleDocs?
Thanks for that. Just put it into my spreadsheet. Works great. I decided to use the "third party price," since that is what Fidelity uses to value the Treasuries in my account there.
Guess I did not know you could get those Bond quotes without being logged in.
+1 to melveyr
Guess I did not know you could get those Bond quotes without being logged in.
+1 to melveyr
melveyr wrote: Value of a bond by CUSIP?
Done.
https://docs.google.com/spreadsheet/ccc ... CQ3c#gid=0
Let me know if you have any questions.
Steve G
Re: value of a CUSIP number in GoogleDocs?
Slick, melveyr!
Re: value of a CUSIP number in GoogleDocs?
Brilliant! Thank you!melveyr wrote: Value of a bond by CUSIP?
Done.
- dualstow
- Executive Member
- Posts: 15210
- Joined: Wed Oct 27, 2010 10:18 am
- Location: searching for the lost Xanadu
- Contact:
Re: value of a CUSIP number in GoogleDocs?
Are you getting slightly different values in google docs and in fidelity itself?
For example, for CUSIP 912810QL5 I get 123.812 in g-docs but 123.719 in fidelity (in my actual holdings).
Perhaps one is one day out of date? But I think the previous price was 123.094.
For example, for CUSIP 912810QL5 I get 123.812 in g-docs but 123.719 in fidelity (in my actual holdings).
Perhaps one is one day out of date? But I think the previous price was 123.094.

Buffett has announced plans to step down as Berkshire Hathaway chief executive by the end of the year after a storied 60-year run. —WSJ
Re: value of a CUSIP number in GoogleDocs?
Fidelity values your holdings using the "Third Party" price, not the bid or ask.
Steve G
- dualstow
- Executive Member
- Posts: 15210
- Joined: Wed Oct 27, 2010 10:18 am
- Location: searching for the lost Xanadu
- Contact:
Re: value of a CUSIP number in GoogleDocs?
ah, thanks.SteveGo wrote: Fidelity values your holdings using the "Third Party" price, not the bid or ask.
Buffett has announced plans to step down as Berkshire Hathaway chief executive by the end of the year after a storied 60-year run. —WSJ
Re: value of a CUSIP number in GoogleDocs?
I added the bond description, third party price, and the YTM. Please copy over to your spreadsheets if you would like. :)
https://docs.google.com/spreadsheet/ccc ... CQ3c#gid=0
https://docs.google.com/spreadsheet/ccc ... CQ3c#gid=0
everything comes from somewhere and everything goes somewhere
-
- Executive Member
- Posts: 1142
- Joined: Fri Jan 06, 2012 9:04 am
Re: value of a CUSIP number in GoogleDocs?
It looks like Fidelity has changed the page that displays bond prices.
I updated the cell in my Google Spreadsheet that displays the price to this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
You'll need to replace CUSIP with the actual CUSIP number surrounded by quotes or alternatively, a cell reference without the quotes. For example, my formula replaces "CUSIP" with $B3 like this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... "&$B3,1,10),5,2)
If you're putting the CUSIP directly into the formula, you could also put it directly after the = and before the " and then remove the &"CUSIP" entirely. The & just concatenates the two values. So it would look like this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
The value returned is the third party price. If you'd prefer the bid price, change the 5 to a 1, or for the ask price change the 5 to a 2.
Melveyr's spreadsheet mentioned above doesn't appear to list bond prices anymore.
I updated the cell in my Google Spreadsheet that displays the price to this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
You'll need to replace CUSIP with the actual CUSIP number surrounded by quotes or alternatively, a cell reference without the quotes. For example, my formula replaces "CUSIP" with $B3 like this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... "&$B3,1,10),5,2)
If you're putting the CUSIP directly into the formula, you could also put it directly after the = and before the " and then remove the &"CUSIP" entirely. The & just concatenates the two values. So it would look like this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
The value returned is the third party price. If you'd prefer the bid price, change the 5 to a 1, or for the ask price change the 5 to a 2.
Melveyr's spreadsheet mentioned above doesn't appear to list bond prices anymore.
Last edited by flyingpylon on Wed Mar 21, 2012 12:06 pm, edited 1 time in total.
Re: value of a CUSIP number in GoogleDocs?
Thanks, melveyr's spreadsheet has changed, as you mentioned, and no longer contains bonds. Your formula still isn't working correctly for me. I get a parse error when I try;flyingpylon wrote: It looks like Fidelity has changed the page that displays bond prices.
I updated the cell in my Google Spreadsheet that displays the price to this:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... CUSIP,1,10),5,2)
You'll need to replace CUSIP with the actual CUSIP number or a cell reference (for example, mine references $B3).
The value returned is the third party price. If you'd prefer the bid price, change the 5 to a 1, or for the ask price change the 5 to a 2.
Melveyr's spreadsheet mentioned above doesn't appear to list bond prices anymore.
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... 10QD3,1,10),5,2)
Any ideas what I'm doing wrong?
"I came here for financial advice, but I've ended up with a bunch of shave soaps and apparently am about to start eating sardines. Not that I'm complaining, of course." -ZedThou
-
- Executive Member
- Posts: 1142
- Joined: Fri Jan 06, 2012 9:04 am
Re: value of a CUSIP number in GoogleDocs?
Yes, you followed my incorrect instructions!
Sorry about that. I have fixed it.
The problem was that you did not have quotation marks around the CUSIP number.

The problem was that you did not have quotation marks around the CUSIP number.
Re: value of a CUSIP number in GoogleDocs?
Thanks! My spreadsheet is finally automatically updating bond prices. This is awesome!flyingpylon wrote: Yes, you followed my incorrect instructions!Sorry about that. I have fixed it.
The problem was that you did not have quotation marks around the CUSIP number.
"I came here for financial advice, but I've ended up with a bunch of shave soaps and apparently am about to start eating sardines. Not that I'm complaining, of course." -ZedThou
- dualstow
- Executive Member
- Posts: 15210
- Joined: Wed Oct 27, 2010 10:18 am
- Location: searching for the lost Xanadu
- Contact:
Re: value of a CUSIP number in GoogleDocs?
Works great, thank you!
Buffett has announced plans to step down as Berkshire Hathaway chief executive by the end of the year after a storied 60-year run. —WSJ
-
- Executive Member
- Posts: 1142
- Joined: Fri Jan 06, 2012 9:04 am
Re: value of a CUSIP number in GoogleDocs?
Just for future reference, in case Fidelity changes the page again and it breaks your spreadsheet formula, here is what the formula does:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
The ImportHtml function gets the page at that url and looks in the html code for tables (indicated by the 1 but you could also use the word "table" including the quotes).
The 10 tells ImportHtml to import the 10th table in the html code (you can find this by doing "view source" on the page and searching for the string "<table" until you come to the right one).
The Index function retrieves the value in the 5th row (indicated by the 5) and 2nd cell (indicated by the 2) of the imported table. In html tables, rows are wrapped with <tr> tags and cells with <th> or <td> tags.
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
The ImportHtml function gets the page at that url and looks in the html code for tables (indicated by the 1 but you could also use the word "table" including the quotes).
The 10 tells ImportHtml to import the 10th table in the html code (you can find this by doing "view source" on the page and searching for the string "<table" until you come to the right one).
The Index function retrieves the value in the 5th row (indicated by the 5) and 2nd cell (indicated by the 2) of the imported table. In html tables, rows are wrapped with <tr> tags and cells with <th> or <td> tags.
Re: value of a CUSIP number in GoogleDocs?
Very nice! It looks like this works great. Thanks, everyone!flyingpylon wrote: Just for future reference, in case Fidelity changes the page again and it breaks your spreadsheet formula, here is what the formula does:
=index(ImportHtml("http://fixedincome.fidelity.com/fi/FIBo ... USIP",1,10),5,2)
Re: value of a CUSIP number in GoogleDocs?
To ensure this valuable technique is easy to find I've posted a screenshot and a brief explanation into the bond buying tutorial.
"Let every man divide his money into three parts, and invest a third in land, a third in business, and a third let him keep in reserve."
- Talmud
- Talmud
Re: value of a CUSIP number in GoogleDocs?
It appears that Fidelity has changed the URL for the bond details page. I have updated the Google Docs formula in my post in the Treasury Bond Buying Tutorial.
"Let every man divide his money into three parts, and invest a third in land, a third in business, and a third let him keep in reserve."
- Talmud
- Talmud