All Questions
Tagged with matlab or programming
1,852 questions
0 votes
0 answers
32 views
Interactive Brokers API - Wrong date for historical data for weekly and monthly bars
I'm currently trying to fetch historical data from Interactive Brokers using the ib_async package. Depending on the exchange I use, the weekly and monthly bars will ...
-2 votes
1 answer
55 views
QuantLib issue with creating a FixedRateBond
When trying to construct a simple bond object using QuantLib using the example from the docs, I get the following error: ...
0 votes
1 answer
55 views
Convergence of Numerical Methods on Lookback Options in R
I have been practicing using R code for my Quant course and I came across an issue when testing the convergence of numerical methods for lookback options to the analytical solutions provided by Hull ...
0 votes
1 answer
99 views
How to design an effective reward function for RL-based FX hedging strategy?
I'm working on an Reinforcement learning (RL) algorithm for optimizing a foreign exchange (FX) hedging strategy, specifically for the USD/AZN (Azerbaijani manat ₼) pair in the context of Azerbaijan's ...
1 vote
1 answer
92 views
Discrepancy in Ulcer Index calculation with the Riskfolio-Lib library
I am using the Riskfolio-Lib Python library to calculate the Ulcer Index. When I run the function, the values I get are on the order of hundredths (for example, 0.0X). My issue is that, based on other ...
2 votes
1 answer
144 views
BusinessDayConvention failing to obtain correct accured or correct coupons in ql.FixedRateBond()
I am trying to price a fixed rate bond with Quantlib (BFCM 4 3/8 01/11/34 Corp or FR001400N3I5) Coupon 4.375% Freq : Annual Day Cnt (Bloom) : ACT/ACT Issue date 11-Jan-24 First CPn Date 11-Jan-25 Mty ...
3 votes
1 answer
135 views
Shifts in SABR model in QuantLib Python ql.SabrSwaptionVolatilityCube()
I'm able to build Swaption vol cube using ql.SabrSwaptionVolatilityCube(), but I don't see this function accepts shifts input. I did some research understand that we can apply shifts to ATM volsurface ...
1 vote
2 answers
367 views
Girsanov Theorem: how to implement it with code?
I'm trying to visualize the path transformations coming from the application of the Girsanov Theorem in a Monte Carlo Simulation. Below the (Python) code where I'm trying to "adjust" the ...
0 votes
0 answers
82 views
EasyLanguage to Python conversion
Im trying to recreate this autocorrelation indicator from John Ehlers book Cycle Analytics for Traders but am getting a slightly different result. Any ideas? Below is the EasyLanguage code from the ...
3 votes
1 answer
132 views
QuantLib Bootstrapped Curve Tallies With Bloomberg Only Up to 1Y Tenor
I'm trying to reconstruct Bloomberg's SORA curve and have noticed that the bootstrapped curve for some reason is only accurate up to the 1Y tenor (out of 30Y), and have no idea what could be causing ...
3 votes
0 answers
104 views
How is polymorphism treated in production code?
What are the key-concepts on Polymorphism wrt derivative products? For example, if we have a collection of equity options with spot underlying and we are generating surfaces across multiple levels on ...
3 votes
1 answer
101 views
QuantLib `RangeAccrualFloatersCoupon` instanciation fails
Instanciation of RangeAccrualFloatersCoupon in Python fails with the following error, even though the 12th argument is a QuantLib schedule. ...
1 vote
1 answer
100 views
PaymentLag in ql.OvernightIndexedSwap()
How do I use maturity date of an ois instead of its tenor, I am using the following QuantLib function: ois = ql.MakeOIS(ql.Period('3Y'), index, 0.1, nominal=1000000, settlementDays=0, effectiveDate=ql....
2 votes
1 answer
123 views
rateslib curves: Why does changing day count convention affect discount factors?
I'm using the rateslib Python package to build a yield curve from Brazilian DI1 futures using piecewise/spline interpolation. My expectation was that changing the day count convention of the curve ...
0 votes
0 answers
68 views
Implementation of standard stretched Brownian motion in Python
I am trying to implement a standard stretched Brownian motion 1,2in Python. This requires finding a fixed point of the equation $\mathcal{A}:CDF \to CDF$, $\mathcal{A}F = F_\mu \circ(\phi*(Q_\nu \circ(...