I think I understand what you want to do. You can either add it as an inline table in the load script and concatenate it on your Year field or use a config file (instead of an inline table). I am on my phone now, but you can have two columns in this inline table, first column called Year (values 2019, 2020, 2021, 2022) and second column called Variables (values var1, var2, var3, var4).
For your second measure you can then use something like =[Stock Price] + $([Variables])
You might need to put $([Variables]) in single quotes (I'm not close to my PC now so I can't test). Then you just create variables var1, var2, var3 and var4 and you can give them values using the variable extension.