VanillaSwap 中 IborIndex 期限的目的
Purpose of IborIndex tenor in VanillaSwap
VanillaSwap 中 IborIndex 参数的用途是什么 class?
我一直在用 swapvaluation.cpp 做一些测试,它似乎对估值没有任何影响,例如,将其从 Euribor6M 更改为 Euribor2W。
我确定我遗漏了什么,但据我所知,浮动航段的时间表参数化是使用 floatingSchedule 完成的。
提前致谢
IborIndex
是 QuantLib 中代表金融市场指数的 class。它是 QuantLib 中最重要的 class 之一。不幸的是,这个名字令人困惑。一个更好的名字就是 MarketIndex
.
- 允许从它派生的所有市场指数实现子classes。看看:https://github.com/lballabio/QuantLib/tree/9618244fde50546b3ee813dfed76937b01058586/ql/indexes/ibor然后你就会明白我在说什么了。
- 每个索引都有自己的规则和惯例。例如,Euribor 定义了两天的结算时间。这是在 QuantLib 中处理的。不相信我?一起来看看:https://github.com/lballabio/QuantLib/blob/9618244fde50546b3ee813dfed76937b01058586/ql/indexes/ibor/euribor.cpp
Euribor365::Euribor365(const Period& tenor,
const Handle<YieldTermStructure>& h)
: IborIndex("Euribor365", tenor,
2, // settlement days
- 它只是市场指数的软件抽象。仅此而已。
- 可能是最重要的功能:
Rate forecastFixing(const Date& fixingDate) const;
。这使我们能够获得市场指数隐含的远期汇率。 对于掉期中浮动边的定价来说极其重要。
不确定我是对的,但我想我找到了问题的答案。
查看 Euribor (https://github.com/lballabio/QuantLib/blob/master/ql/indexes/ibor/euribor.cpp) 的源代码,我发现期限用于确定日期约定和月末规则用于定价。
BusinessDayConvention euriborConvention(const Period& p) {
switch (p.units()) {
case Days:
case Weeks:
return Following;
case Months:
case Years:
return ModifiedFollowing;
default:
QL_FAIL("invalid time units");
}
}
bool euriborEOM(const Period& p) {
switch (p.units()) {
case Days:
case Weeks:
return false;
case Months:
case Years:
return true;
default:
QL_FAIL("invalid time units");
}
}
VanillaSwap 中 IborIndex 参数的用途是什么 class?
我一直在用 swapvaluation.cpp 做一些测试,它似乎对估值没有任何影响,例如,将其从 Euribor6M 更改为 Euribor2W。
我确定我遗漏了什么,但据我所知,浮动航段的时间表参数化是使用 floatingSchedule 完成的。
提前致谢
IborIndex
是 QuantLib 中代表金融市场指数的 class。它是 QuantLib 中最重要的 class 之一。不幸的是,这个名字令人困惑。一个更好的名字就是 MarketIndex
.
- 允许从它派生的所有市场指数实现子classes。看看:https://github.com/lballabio/QuantLib/tree/9618244fde50546b3ee813dfed76937b01058586/ql/indexes/ibor然后你就会明白我在说什么了。
- 每个索引都有自己的规则和惯例。例如,Euribor 定义了两天的结算时间。这是在 QuantLib 中处理的。不相信我?一起来看看:https://github.com/lballabio/QuantLib/blob/9618244fde50546b3ee813dfed76937b01058586/ql/indexes/ibor/euribor.cpp
Euribor365::Euribor365(const Period& tenor, const Handle<YieldTermStructure>& h) : IborIndex("Euribor365", tenor, 2, // settlement days
- 它只是市场指数的软件抽象。仅此而已。
- 可能是最重要的功能:
Rate forecastFixing(const Date& fixingDate) const;
。这使我们能够获得市场指数隐含的远期汇率。 对于掉期中浮动边的定价来说极其重要。
不确定我是对的,但我想我找到了问题的答案。
查看 Euribor (https://github.com/lballabio/QuantLib/blob/master/ql/indexes/ibor/euribor.cpp) 的源代码,我发现期限用于确定日期约定和月末规则用于定价。
BusinessDayConvention euriborConvention(const Period& p) {
switch (p.units()) {
case Days:
case Weeks:
return Following;
case Months:
case Years:
return ModifiedFollowing;
default:
QL_FAIL("invalid time units");
}
}
bool euriborEOM(const Period& p) {
switch (p.units()) {
case Days:
case Weeks:
return false;
case Months:
case Years:
return true;
default:
QL_FAIL("invalid time units");
}
}