Was I the last one on earth that discovered the google app scripts to automate spreadsheet stuff?
I used a similar approach to this one:
And now my spreadsheet is finally 99% automated. I retrieve all ETF value (either with the ticker or with importhtml for VIAC) and when the asset allocation is unbalanced over a certain threshold the script send me an email “Rebalance opportunity!” to me.
I used to randomly check my spreadsheet 2-3 times a month. Now I don’t even need to do that! If something happens to the market and my asset allocation goes out of balance (I don’t follow the market) I receive an email with a summary of my situation, my stock balance and my etf distribution and I can decide to act or not on it.
The only thing left to automate fully would be to retrieve the number of shares of my VIAC ETFs. But I guess I can simply write them once and in most of these accounts they rarely change (difficult to trigger VIAC condition for rebalancing).
First of all nice job… I am also into programming/automating the management of my assets. Regarding VIAC I have been in touch with them recently in order to ask if they can provide a CSV export of all transactions, they said they would take this into account but of course with no guarantee. VIAC only offers to download their PDFs which after a few years is much too much PDFs. Finpension for example provides a nice simple CSV file with all transactions and that would be much easier to use.
Hehe I did not want to ask for too much but yes ideally an API would be great, no need to login, so I can fully automate getting all transactions from them on a regular basis.
here the code to send an email automatically based on some value in a google spreadsheet cell. You need to implement triggers as well, aka when the script should run. I had setup twice a day 4 pm and 8 pm. A bit of a pain to set-it up, here google could do better. I tried to code it as simple as possible with new variable at each step
function SendEmailRebalance() {
// Retrieve Rebalance Value
var rebalanceRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(“Riassunto”).getRange(“E8”).getValue();
//just use two decimal number:
var rebalance = rebalanceRange.toFixed(2);
// Fetch the email address:
var emailRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(“Riassunto”).getRange(“H22”);
//get the arrray of strings
var emailAddress = emailRange.getValues();
//email adress is first of string
var emailAddress1 = emailAddress[0][0];
By reading and partipating to this forum, you confirm you have read and agree with the disclaimer presented on http://www.mustachianpost.com/
En lisant et participant à ce forum, tu confirmes avoir lu et être d'accord avec l'avis de dégagement de responsabilité présenté sur http://www.mustachianpost.com/fr/
Durch das Lesen und die Teilnahme an diesem Forum bestätigst du, dass du den auf http://www.mustachianpost.com/de/ dargestellten Haftungsausschluss gelesen hast und damit einverstanden bist.