Go script to process Vanguard CSV downloads into a Google spreadsheet.
- This code is presented as an example, not a production-ready application.
- Don't expect support or excessive documentation.
- Code runs on Ubuntu Linux, not tested on any other OS.
- Requires Google project, certificate, secret file
(see
github.com/madkins23/go-google/oauth2
). - May require individual domain (not sure).
- Fork the repository or copy the code for your own use.
-
Login to Vanguard and download the last month's data as a CSV.
-
Create a Google spreadsheet for your accounts.
-
Each tab in the spreadsheet should have the following columns, named in the first header row:
Locality
Strategy
Focus
Weight
Specific
Symbol
Target
TgtAmt
Actual
Current
Over
PctOver
Price
Pct975
Pct95
Pct90
Account
-
On the second row enter vertical sums for:
Target
TgtAmt
Actual
Current
-
On the second row enter the account number for the
Account
that shows in the current tab. -
Enter symbols for stocks under the
Symbol
column starting with the third row. New rows are not automatically added at this time, they are just logged.
-
-
The script currently expects file
~/Downloads/ofxdownload.csv
as input.- By default this file will be deleted after use unless
--delete=false
is set on the command line. - Configure the spreadsheet using its ID from the URL (e.g.
https://docs.google.com/spreadsheets/d/nastyLongIDHere
) using the--id=nastyLongIDHere
flag orexport VANGUARD_ID=nastyLongIDHere
.
- By default this file will be deleted after use unless