5

You are not giving the constructor a discountCurve. The constructor is: ql.ForwardRateAgreement(valueDate, maturityDate, position, strikeForward, notional, iborIndex, discountCurve=ql.YieldTermStructureHandle()) So you should add a the spotCurveHandle as the last parameter: fra = ql.ForwardRateAgreement(ql.Date(7, 5, 2018), ql.Date(15,12,2020), ql.Position....


5

By definition, $$Fo(t,T)=E^T[S_T|F_t]$$ Note that expectation is taken under $T$-forward measure. Now, evaluating at $s<T$: $$E^T[Fo(t,T)|F_s] = E^T[E^T[S_T|F_t]|F_s] = E^T[S_T|F_s] = Fo(s,T)$$ (using the tower property of expectations). Hence Forwards rate is a martingale under the T-forward measure.


4

The answer by @Prabhnoor Duggal is correct. Here, I would like to further expand to make it more streamlined (see also Section 2.5 of the book Interest Rate Models - Theory and Practice). Let $Q$ and $Q^T$ be the risk-neutral and the $T$-forward respective probability measures. Then, for $0\le t \le T$, \begin{align*} \frac{dQ}{dQ^T}\big|_{[t, T]} = \frac{...


4

I want to propose a different answer here. I think mathematical expectation (under any measure) is not used in valuing an interest swap. Years ago I used to explain swaps to beginners by speaking in terms of expectation (perhaps because that is how I learned it myself, although I am not sure). "We see in this example that the market expects future Libor ...


3

Daycount conventions are rather a technical topic that does not test anyone’s ‘finance IQ’. Moreover, the readers of the site aren’t here to be tested, we are here to help those that wish to learn (site moderator can more clearly opine). To answer your question, Act/360 is a daycount convention whereby the actual amount of interest paid equals the interest ...


3

Each payment is valued in its own forward measure. As price is discounted expectation of all cashflows (in the risk neutral measure), you can write it as sum of expectations of each cashflow. Then each cashflow is valued independently of the other at its respective forward measure, under which the payment float rate is a martingale. Thus, each cashflow can ...


2

For IRS schedules there are the following different sets of dates: Payment dates: the dates on which cashflows are exchanged. Accrual dates: these dates define how much interest is accrued (given a specific rate either fixed or floating) Reset/Fixing dates: this is the date a floating rate publication is actually calculated and made public, i.e. displayed ...


2

The first method is how you actually calculate the forward price of a specific bond. You need to use the repo rate for that bond as the financing rate inside the calculation. The second method is a quick way of estimating bond forward yields, but it is not something you can execute in practice. For example, if you try to lock in the yield , 5yrs from today,...


2

Looks like day count to me, as in overnight is a three day run in this example while tom-next and spot-next are only one day runs. It is easier to use points per day to work out relative value (or actual implied rates and/or basis depending what you are doing) in FX forwards. Also, EURUSD is a T+2 currency pair so overnight is today to tomorrow while tom-...


2

What I think they're saying here... The USD market convention is that the floating leg pays quarterly and is set at the beginning of the coupon period from 3mo libor, and the fixed leg pays semi-annually. You can view a vanilla 5-year swap as a portfolio of two instruments with the same notional as the original swap: the first floating coupon, which is ...


2

For Q1, Indeed the ratio of 2 zero coupon bonds associated with the forward is an exact lognormal process (Just apply Ito's lemma to the ratio, as you already know the dynamics of the 0 coupon bonds. You can disregard the drift term as the forward rate is a martingale in the bond forward measure.). The forward rate is then obtained by just adding a scalar, ...


2

You can't get the Forward Swap directly since you will have to give some conventions for what you want. However there is a less verbose way to construct a forward swap and get it's fairRate. Note that most conventions will come from the index you specified. import QuantLib as ql calc_date = ql.Date(29, 3, 2019) spot_curve = ql.FlatForward(calc_date, ql....


2

Hmm... I have, in a past life, been down to Liberty Street to "consult" with the Markets Division on asset pricing. For those maybe not au fait with the jargon, any interest rate can be broken down into parts. So a 30 bond yield can be broken into a 10y yield and a 10y20y yield (ie a 20 year rate of interest starting in 10 years time, that follows ...


2

Technical note: we change measure by individual cash flow (away from the common risk neutral measure - money market account numeraire): $$ \beta(t) \mathbf{E}_t\left[\beta(t_{i+1})^{-1}(L(t_i,t_i,t_{i+1}) -K)\right] = P(t,t_{i+1}) \mathbf{E}_t^{t_{i+1}}\left[(L(t_i,t_i,t_{i+1}) -K)\right] $$ and then use $$ \mathbf{E}_t^{t_{i+1}}\left[L(t_i,t_i,t_{i+1})\...


2

As @Kermittfrog said in the comment, in Black formula for options on futures price you need to insert the futures price $F$: $$C = e^{-rT}[FN(d_1) - KN(d_2)]$$ where $r$ is the discounting rate. Here, $d_1$ depends only on $F$ (no rate involved). For Black-Scholes formula for options on spot price (assume asset pays no dividend to keep it clean), we have: $$...


2

The code is not really correct, because you are only supplying two instruments: a 50Y Deposit with a rate of 0% and a 3m swap with a rate of 6%. If you plot your fwd rates, this is what you'll see: What you want to do is supply a helper for each of your swaps. Then QuantLib will bootstrap the discount factors for the nodes you supplied and interpolate the ...


1

Have you looked through Gautham's excellent tutorial on term structures in quantlib python: http://gouthamanbalaraman.com/blog/quantlib-term-structure-bootstrap-yield-curve.html? You can then modify his code to build any other kind of term structure (eg. swap...etc).


1

In swap space the 20y rate 10y forward (10y20y) is related to the 30y rate 0y forward (0y30y or just 30y) by the equation: $$R_{10y20y} = \frac{x}{z}R_{30y} - \frac{y}{z} R_{10y} $$ (where x,y,z are day fraction and discount factor scalars) Treasury rates have a similar formula albeit uses a geometric structure rather than arithmetic due to how bond yields ...


1

You are right that they measure different things. As do the "forward" for 3m rates in 3 years time versus the same 5 years time. These are the same kind of different "forwards". As are the "forwards" for 2 year rates in 3 years time versus 1 year rates in 4 years time. The rates markets doesn't find this problematic or confusing,...


1

The problem is that in the first step, you are only fetching the forwards for the curve nodes. You could make a daily schedule and get forwards directly from the curve for each date. all_days = ql.MakeSchedule( eonia_curve_c.referenceDate(), eonia_curve_c.maxDate(), ql.Period('1D') ) rates_fwd = [ eonia_curve_c.forwardRate(d, calendar....


1

For a bit more clarity, I'll replace $ZL_t$ with $X_t^{ZL}=X_t$ with the meaning: at time $t$, $1$ unit of currency $Z$ (asset, foreign, overZee) can be bought with $X_t$ units of currency $L$ (numeraire, domestic, Local). If $$ K < X_{t_0}(1+ i^L)(1+i^Z)^{-1}, $$ then, at time $t_0$, one can go long the forward contract that allows one to buy $1+i^{Z}$ ...


1

As a general rule in arbitrage you buy the good which is attractively priced and sell the good which is expensively priced. If someone offers you L=200 Yen for one dollar a year from now and you calculate K'=100 yen per dollar then you buy the yen forward and hedge by selling the synthetic equivalent. And this is what Joshi says: "Of course... buy/sell ... ...


1

That conventional way of pricing forwards doesn't work since the great financial crisis, there is something called the cross currency basis. Basically market participants cannot borrow or lend unlimited amounts at the 3m interest rates. It's realtively well explained on Wikipedia https://en.wikipedia.org/wiki/Currency_swap It is well recognized[4][5] ...


1

I think that the formula of $F(t,T_a,T_b)$ is misleading. The ratio $P(t,T_b)/P(t,T_a)$ should be $P(t,T_a)/P(t,T_b)$ instead.


Only top voted, non community-wiki answers of a minimum length are eligible