-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize future dates in FutureRateHelpers #1855
Comments
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it. |
Thanks—yes, we should probably implement a third case besides IMM and ASX that leaves the dates free. We can also implement more rules if we want to check those. |
This allows passing custom future dates. Closes lballabio#1855
This allows passing custom future dates. Closes lballabio#1855
This is trnasfered from the C++ code: lballabio/QuantLib#1915 This allows passing custom future dates. Closes #1855: lballabio/QuantLib#1855
* Added Futures Type - Custom; This is trnasfered from the C++ code: lballabio/QuantLib#1915 This allows passing custom future dates. Closes #1855: lballabio/QuantLib#1855 * Update the default case message only --------- Co-authored-by: Xiao Gong <xiao.gong@nzfunds.co.nz>
Hi! When trying the new feature, this error arises. File ~\AppData\Local\anaconda3\Lib\site-packages\QuantLib\QuantLib.py:26940 in init RuntimeError: unsupported futures type (Custom) This is my code:
|
You're right, we need a fix for that case. In the meantime, the constructor that takes a start date and a number of months will work. |
Thanks |
The fix is in #1974. It will be in next release (at some point in July). |
Hi! I want to make the new mexican F-TIIE curve in python with QuantLib, but when I'm trying to make a FutureRateHelper the future types are only IMM or ASX and my curve needs customized future dates for each month. How can I work around this issue?
My code is this:
`futures = {}
for i in future_index:
month = dic_month[df['Ticker'].iloc[i][3:4]]
year = int(df['Ticker'].iloc[i][4])
d = ql.Date(1,month, 2020 + year)
futures[d] = data[i]
months = 1
Where "d" is the Start Date for the future contract and "futures" is the dictionary of dates and prices
Thank You!
The text was updated successfully, but these errors were encountered: