Comments (6)
@arthurcolle thanks for reporting the issue. There is an easy fix for this bug. We should expose the empty constructor from the Euribor class ( see ql/indexes/_euribor.pxd). I'll see if I can find a minute to fix it. If you want to give it a try, let me know.
from pyql.
Yes I am free to try at your leisure! I just ran a 'git pull origin master' and the master branch was already up to date so just let me know and I'll try again whenever. Thanks for the prompt response
from pyql.
There is some work on the fix/bug_76 branch but it revealed some other issue with swap.py example (wrong usage of relinkable handles). I'll try to fix that as soon as possible.
from pyql.
@arthurcolle if you want to give a shot at #77 that would be great.
from pyql.
Traceback (most recent call last):
File "swap.py", line 101, in <module>
for n, unit in swaps.keys() ]
File "swap.py", line 101, in <listcomp>
for n, unit in swaps.keys() ]
File "quantlib/indexes/euribor.pyx", line 41, in quantlib.indexes.euribor.Euribor6M.__init__ (quantlib/indexes/euribor.cpp:2721)
TypeError: __init__() takes exactly 1 positional argument (0 given)
Here is output when I run it.
I totally rebuilt this repo from scratch btw, in its own venv, so lmk if you think I'm doing something wrong.
The above output is when I ran "python swap.py" at the command-line but here is the output in iPython as well, which my be a distinct issue, but just reporting for your info:
ImportError Traceback (most recent call last)
<ipython-input-2-677456946651> in <module>()
4 """
5 from __future__ import print_function
----> 6 from quantlib.indexes.euribor import Euribor6M
7 from quantlib.pricingengines.swap import DiscountingSwapEngine
8 from quantlib.settings import Settings
ImportError: No module named 'quantlib.indexes.euribor'
from pyql.
Something happened in your compilation step. Are you sure you're on the fix/example_swap
branch? The fact that you don't have the quantlib.indexes.euribor
module shows that it was not cythonized and compiled properly.
What platform do you use? This is the output of the swap.py example for me with the fix in place:
DP-MBP:pyql dpinte (fix/example_swap) $ python examples/swap.py
==================================================================
5-year market swap-rate = 4.43 %
==================================================================
5-years swap paying 4.00 %
term structure | net present value | fair spread | fair fixed rate
------------------------------------------------------------------
depo-fut-swap | 19067.30 | -0.4192 % | 4.4300 %
depo-FRA-swap | 19055.41 | -0.4193 % | 4.4300 %
------------------------------------------------------------------
5-years, 1-year forward swap paying 4.00 %
------------------------------------------------------------------
depo-fut-swap | 42129.89 | -0.9710 % | 4.9976 %
depo-FRA-swap | 37151.83 | -0.8564 % | 4.8793 %
==================================================================
5-year market swap-rate = 4.60 %
==================================================================
5-years swap paying 4.00 %
term structure | net present value | fair spread | fair fixed rate
------------------------------------------------------------------
depo-fut-swap | 26541.00 | -0.5846 % | 4.6000 %
depo-FRA-swap | 26524.45 | -0.5848 % | 4.6000 %
------------------------------------------------------------------
5-years, 1-year forward swap paying 4.00 %
------------------------------------------------------------------
depo-fut-swap | 48499.75 | -1.1217 % | 5.1529 %
depo-FRA-swap | 42835.30 | -0.9907 % | 5.0176 %
from pyql.
Related Issues (20)
- test a examples file failed HOT 3
- Calls to CreditDefaultSwap.fair_upfront crash Python HOT 7
- def file generation HOT 2
- Test results with QuantLib 1.10
- compilation error HOT 3
- Problem with Python examples - american_option HOT 3
- testing pyql - errors HOT 2
- Odd issue with Period HOT 4
- Cython error + compilation error HOT 1
- Compilation Error on MacOS High Sierra HOT 15
- Cython version issue
- commit 27e9d9bf2 breaks compatibility with Quantlib < 1.13
- Adding OISRateHelpers HOT 13
- Building issue Win10x64 Python3.7.1 / x64 / VS2017 / QL1.15 / Boost 1.69 HOT 18
- Building on x64
- Build error error: ‘Microsecond’ is not a member of ‘QuantLib’ HOT 2
- install pyql in mac HOT 1
- error: ‘RelativePriceError’ is not a member of ‘QuantLib::CalibrationHelper’ HOT 4
- pyql/examples/data/df_libor.pkl cannot be loaded
- Pain point: Not enough documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyql.