Excel for Decision Making
December 2, 2016
I have a program that I run that requires access to a Bloomberg API for data input. I need a way to program a stop in the macro so that the data that is being requested from Bloomberg can update, then once that is updated, the macro needs to continue where it left off. This will be something that has to be done many times while running the program.
Here is the basic process that happens.
The program loads a specific hedge deal that then needs to be valued based on a particular day based on the current yield curve on that day. Once that is valued, the program stores the results of that and then loads the next deal to value it. This is done for multiple clients who may have multiple deals that need valued. We then report to them the individual value for each hedge and a total for their whole portfolio of hedges. Every hedge has a different rate at which it resets. We grab the reset rate from a Bloomberg terminal for each deal at the time each deal is loaded. So, this function needs to be able to load the deal, then stop and wait for the Bloomberg terminal to provide the rate for that deal, then start again to finish the valuation. This process needs to happen over and over until it gets to the last deal for the last client.
Anyone have thoughts on a solution?
I am using Excel 2016.
October 5, 2010
There are a number of ways to make your code pause, check this
Does this process have to be written in VBA? Could you use Python?