|
From: Aleksis A. R. <ale...@go...> - 2021-11-18 09:49:24
|
Hi, the link below may be useful. To evaluate the in-the-life swap I assume you are providing it fixings prior to the new evaluation date. In this case my understanding is that the swap PV you get will not include the settled cashflows (as long as the curve reference date is adjusted accordingly - see link). https://quant.stackexchange.com/questions/36830/quantlib-python-price-same-swap-on-different-evaluation-dates <https://quant.stackexchange.com/questions/36830/quantlib-python-price-same-swap-on-different-evaluation-dates> Aleksis > On 16 Nov 2021, at 20:51, Goutham Mahesh <gou...@gm...> wrote: > > Hi All, > > This is the scenario: > > I have computed the floating leg for and IRS as follows: > floatingleg = IborLeg(data, SwapSchedule, index, Actual360(), ModifiedFollowing, fixingDays=[0], gearings=[1], spreads = [0]) > > The SwapSchedule is a schedule set for 3 years with quarterly payments, therefore there are 12 floating leg payments for the swap. > > "data" is a list of 12 nominals for each of the 12 floating leg cash flows. > data = [1000000, 1000000, 1000000, 1000000, 1000000, 869565, 739130, 608695, 478260, 347826, 217391, 86956] > > Let us say now that 1 year and 4 cash flow dates have passed. I have to re-calculate the floating leg. > The "data" list now has 8 nominals to reflect the 8 remaining cash flow dates. > data = [1000000, 869565, 739130, 608695, 478260, 347826, 217391, 86956] > > My doubt is regarding how to recalculate my floating leg, and if I should use a new SwapSchedule or a new index. > > For building the SwapSchedule I have currently used the original date(old_date) and original maturity_date because I do not want the cash flow dates to change. > > As for the index I have done: > Settings.instance().evaluationDate = new_date > I have built the index using the methodology in the python cookbook quantlib IRS example. > > The code is running in this situation but the floating leg is still returning 12 cash flows, whereas I want to return only 8 cash flows to reflect the 8 remaining payments of the floating leg. > > -- > > Any help will be appreciated as I have been trying really hard to figure this problem out. If you require more info as to how I built the index I will send that as well. > > Thank you, > Goutham > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |