I tried to calculate treasury bonds YTM from their clean prices through different formula on excel ("yield" or "rate") and found the same result. However, I do not know whether using the "yield" function, it is more suitable to set the delivery date to the date of the trade or the last date of coupon given that using the date of the trade gives a different result than the "rate" function?
I have another question regarding the determination of yields on the basis of prices published at auctions. Is the same formula used?