Integer fixingDays = 2; Date todaysDate = calendar.advance(settlementDate, -fixingDays, Days); does it mean that when i want to value (MTM) today a swap which has already started in the past I must use the yield curve bootstrapped 2 days ago?
------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Aug 17, 2011, at 6:46 PM, alex wrote: > in a swap valuation example there's a line > > Integer fixingDays = 2; > > Date todaysDate = calendar.advance(settlementDate, -fixingDays, Days); > > does it mean that when i want to value (MTM) today a swap which has > already started in the past I must use the yield curve bootstrapped > 2 days ago? > No, the example is rather backwards; it should read Integer settlementDays = 2; Date settlementDate = calendar.advance(todaysDate, settlementDays, Days); It just means that the swap is settled two days from today, so the curve (which you bootstrap today, regardless of when the swap started) will be discounting to that date. Luigi ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Luigi Ballabio <luigi.ballabio <at> gmail.com> writes: > > > On Aug 17, 2011, at 6:46 PM, alex wrote: > > in a swap valuation example there's a line > > > > Integer fixingDays = 2; > > > > Date todaysDate = calendar.advance(settlementDate, -fixingDays, Days); > > > > does it mean that when i want to value (MTM) today a swap which has > > already started in the past I must use the yield curve bootstrapped > > 2 days ago? > > > > No, the example is rather backwards; it should read > > Integer settlementDays = 2; > Date settlementDate = calendar.advance(todaysDate, settlementDays, > Days); > > It just means that the swap is settled two days from today, so the > curve (which you bootstrap today, regardless of when the swap started) > will be discounting to that date. > > Luigi ok now if i want to value this swap one year later say i want it's value on 31/12/2012 should i use the yield curve constructed the same date (31/12/2012) or the yield curve constructed on 29/12/2012? if I choose the yield curve constructed on 31/12/2012 (from the quotes of euribors on the same date) I will get discount factor of 1.0 for 2/1/2013 (ignoring holidays) , but as i want a value for 31/12/2012 , shouldn't I use the curve where discount factor 1.0 is for 31/12/2012 ? ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Wed, 2011-08-17 at 20:58 +0000, alex wrote:
> ok now if i want to value this swap one year later say i want it's value on > 31/12/2012 > should i use the yield curve constructed the same date (31/12/2012) or the > yield curve constructed on 29/12/2012? > > if I choose the yield curve constructed on 31/12/2012 (from the quotes of > euribors on the same date) I will get discount factor of 1.0 for 2/1/2013 > (ignoring holidays) , but as i want a value for 31/12/2012 , shouldn't I use > the curve where discount factor 1.0 is for 31/12/2012 ? Depends on how you keep your books. I've seen trading rooms where the cash flows were discounted to 2/1/2013, and prior cash flows were accounted for separately. If you want to discount to 31/12/2012, that's also correct as long as you know what you're doing. Luigi -- Humphrey's Requirements Uncertainty Principle: For a new software system, the requirements will not be completely known until after the users have used it. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
.... but in both cases you should set the evaluation date to 31/12/12 and
use the market data of this day. Then if you want the PV as of 31/12/11 set the reference date of the yield term structure to 31/12/11, if you want it as of 02/01/12, set it to 02/01/12. Also be aware that in the latter case cashflows occuring on 01/01/12 and 02/01/12 (by default) are not included in the PV. Rgds, Peter Am 18.08.2011 10:02, schrieb Luigi Ballabio: > On Wed, 2011-08-17 at 20:58 +0000, alex wrote: >> ok now if i want to value this swap one year later say i want it's value on >> 31/12/2012 >> should i use the yield curve constructed the same date (31/12/2012) or the >> yield curve constructed on 29/12/2012? >> >> if I choose the yield curve constructed on 31/12/2012 (from the quotes of >> euribors on the same date) I will get discount factor of 1.0 for 2/1/2013 >> (ignoring holidays) , but as i want a value for 31/12/2012 , shouldn't I use >> the curve where discount factor 1.0 is for 31/12/2012 ? > Depends on how you keep your books. I've seen trading rooms where the > cash flows were discounted to 2/1/2013, and prior cash flows were > accounted for separately. If you want to discount to 31/12/2012, that's > also correct as long as you know what you're doing. > > Luigi > > ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |