Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasibule committed Apr 22, 2024
1 parent 463a4aa commit 6598046
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion quantlib/instrument.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Abstract instrument class"""
from cython.operator cimport dereference as deref
from quantlib.time.date cimport date_from_qldate
from quantlib.pricingengines.engine cimport PricingEngine
from quantlib.handle cimport static_pointer_cast
Expand Down
5 changes: 1 addition & 4 deletions quantlib/models/calibration_helper.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
FOR A PARTICULAR PURPOSE. See the license for more details.
"""

include '../types.pxi'

from quantlib.types cimport Real, Size, Volatility
from quantlib.handle cimport shared_ptr
from cython.operator cimport dereference as deref

cimport quantlib.pricingengines._pricing_engine as _pe
from quantlib.pricingengines.engine cimport PricingEngine


Expand Down
2 changes: 1 addition & 1 deletion quantlib/pricingengines/_pricing_engine.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cdef extern from 'ql/pricingengine.hpp' namespace 'QuantLib':
cdef extern from 'ql/pricingengine.hpp' namespace 'QuantLib' nogil:

cdef cppclass PricingEngine:
pass
5 changes: 2 additions & 3 deletions quantlib/pricingengines/credit/isda_cds_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ cdef class IsdaCdsEngine(PricingEngine):
<_ice.ForwardsInCouponPeriod>forwards_in_coupon_period)
)

cdef _ice.IsdaCdsEngine* _get_cds_engine(self):
cdef _ice.IsdaCdsEngine* ref = <_ice.IsdaCdsEngine*>(self._thisptr.get())
return ref
cdef inline _ice.IsdaCdsEngine* _get_cds_engine(self) nogil:
return <_ice.IsdaCdsEngine*>(self._thisptr.get())

@property
def isda_rate_curve(self):
Expand Down
1 change: 0 additions & 1 deletion quantlib/pricingengines/credit/midpoint_cds_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ from cython.operator cimport dereference as deref
from libcpp cimport bool

from quantlib.handle cimport Handle, shared_ptr, optional
cimport quantlib.pricingengines._pricing_engine as _pe
from . cimport _midpoint_cds_engine as _mce

from quantlib.pricingengines.engine cimport PricingEngine
Expand Down
2 changes: 0 additions & 2 deletions quantlib/pricingengines/engine.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ cimport quantlib.pricingengines._pricing_engine as _pe

cdef class PricingEngine:
cdef shared_ptr[_pe.PricingEngine] _thisptr


1 change: 0 additions & 1 deletion quantlib/pricingengines/swap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ from quantlib.pricingengines.vanilla.vanilla cimport PricingEngine
from quantlib.termstructures.yield_term_structure cimport YieldTermStructure

cimport quantlib.pricingengines._swap as _swap
cimport quantlib.pricingengines._pricing_engine as _pe
cimport quantlib.termstructures._yield_term_structure as _yts
from quantlib.time.date cimport Date

Expand Down
2 changes: 0 additions & 2 deletions quantlib/pricingengines/vanilla/mceuropeanhestonengine.pyx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from quantlib.types cimport BigNatural, Integer, Real, Size
from libcpp cimport bool
from cython.operator cimport dereference as deref
from quantlib.handle cimport shared_ptr, static_pointer_cast
from quantlib.utilities.null cimport Null
cimport quantlib.pricingengines._pricing_engine as _pe
from quantlib.processes.heston_process cimport HestonProcess
cimport quantlib.processes._heston_process as _hp
from .mcvanillaengine cimport MCVanillaEngine
Expand Down

0 comments on commit 6598046

Please sign in to comment.