This might seems like a stupid doubt. But here goes.
My basic understanding is that we can calculate YTM only after knowing the bonds current price.
So, in reality the first the entity (between YTM and bond price) we will know is the bond price rite (guessing here). In all the durations and other calculations where they want to check the price-ytm sensitivity, why do they calculate the bond price using the YTM or Spread change. Shouldn’t it be the other way round as the change in bond price is what leads to the YTM or Spread change.
As investors buy and sell bonds, the price changes, and so does the YTM.
Does an investor buy a bond based on its price, accepting the corresponding YTM? Perhaps, perhaps not.
Does an investor sell a bond based on its YTM, accepting the corresponding price? Maybe, maybe not.
Does it really matter? Definitely not.
There is a unique (i.e., one-to-one) relationship between a bond’s price and its YTM. If you’re given a price, you can calculate the YTM uniquely. If you’re given a YTM, you can calculate the price uniquely.
The point of the exam questions is to make sure that you understand this unique relationship and can do the calculations correctly. What happens in the real world doesn’t matter (and, as I mentioned above, probably isn’t known for certain).