Set Trade Date

Function Set Trade Date within
Market with keys Market Set Trade Date keys modifies the contents of the referenced Market object so that its locally defined trade date (also known as observation or valuation date) stored in association with its key Trade Date is set equal to a supplied date.
If the referenced object includes one or more embedded Market objects, these objects are also modified so that they carry the supplied date as their locally defined trade date.

Note the referenced object is refreshed after the substitution taking into account the new effective trade date.
This may lead to a failure and an accompanied error that must be the same as that produced if the referenced object had been reproduced after setting the global trade date to the one used here.

Because this function modifies the original referenced object - and perhaps its Market subobjects -, it should be used with extreme caution!
The reason is the original objects may be used in other areas of the spreadsheet though formulas that do not link to the output of this function here.
It can be used without any concern only if all formulas that depend on the affected objects access these objects through the output of this function.