I'm trying to calculate value weighted returns for a long short momentum portfolio. The workflow gives me the correct output for single inputs, but outputs only zeros when I try to run it as a batch macro for repeated inputs. What should I do different to get the correct outputs instead of just zeros? Any help would be highly appreciated!
Solved! Go to Solution.
@robertbyg I think I can see the issue here:
These 3 you want to pick 202301
Then you have this one which is a different value 201302
However, once you run your macro (batch it), this is happening:
The same month is being selected, resultantly, you end with 0s because in the end (after your calculations, you will see this):
Hence the 0s. So you need to reconsider your approach here.
The way I ran a simulation of your batch macro was doing the following:
Open the interface designer, get to test view, enter a test value, open debug:
Therefore, you can debug issues with your macro!
Hopefully that helps.
Thanks,
BS
Thank you!